Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/strip_time.c
| Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | |||||
| * Define boundary rectangle of sequencer timeline and fill in rect data | * Define boundary rectangle of sequencer timeline and fill in rect data | ||||
| * | * | ||||
| * \param scene: Scene in which strips are located | * \param scene: Scene in which strips are located | ||||
| * \param seqbase: ListBase in which strips are located | * \param seqbase: ListBase in which strips are located | ||||
| * \param rect: data structure describing rectangle, that will be filled in by this function | * \param rect: data structure describing rectangle, that will be filled in by this function | ||||
| */ | */ | ||||
| void SEQ_timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect) | void SEQ_timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect) | ||||
| { | { | ||||
| float min[2], max[2]; | rect->xmin = scene->r.sfra; | ||||
| min[0] = scene->r.sfra; | rect->xmax = scene->r.efra + 1; | ||||
| max[0] = scene->r.efra + 1; | rect->ymin = 0.0f; | ||||
| min[1] = 0.0; | rect->ymax = 8.0f; | ||||
| max[1] = 8.0; | |||||
| if (seqbase == NULL) { | |||||
| return; | |||||
| } | |||||
| LISTBASE_FOREACH (Sequence *, seq, seqbase) { | LISTBASE_FOREACH (Sequence *, seq, seqbase) { | ||||
| if (min[0] > seq->startdisp - 1) { | if (rect->xmin > seq->startdisp - 1) { | ||||
| min[0] = seq->startdisp - 1; | rect->xmin = seq->startdisp - 1; | ||||
| } | } | ||||
| if (max[0] < seq->enddisp + 1) { | if (rect->xmax < seq->enddisp + 1) { | ||||
| max[0] = seq->enddisp + 1; | rect->xmax = seq->enddisp + 1; | ||||
| } | } | ||||
| if (max[1] < seq->machine + 2) { | if (rect->ymax < seq->machine + 2) { | ||||
| max[1] = seq->machine + 2; | rect->ymax = seq->machine + 2; | ||||
| } | } | ||||
| } | } | ||||
| rect->xmin = min[0]; | |||||
| rect->xmax = max[0]; | |||||
| rect->ymin = min[1]; | |||||
| rect->ymax = max[1]; | |||||
| } | } | ||||
| /** | /** | ||||
| * Find first gap between strips after initial_frame and describe it by filling data of r_gap_info | * Find first gap between strips after initial_frame and describe it by filling data of r_gap_info | ||||
| * | * | ||||
| * \param scene: Scene in which strips are located | * \param scene: Scene in which strips are located | ||||
| * \param seqbase: ListBase in which strips are located | * \param seqbase: ListBase in which strips are located | ||||
| * \param initial_frame: frame on timeline from where gaps are searched for | * \param initial_frame: frame on timeline from where gaps are searched for | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||