Blender V4.5
strip_time.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 * SPDX-FileCopyrightText: 2003-2009 Blender Authors
3 * SPDX-FileCopyrightText: 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later */
6
10
11#include <algorithm>
12
13#include "DNA_scene_types.h"
14#include "DNA_sequence_types.h"
15
16#include "BLI_listbase.h"
17#include "BLI_math_base.h"
18
19#include "BKE_movieclip.h"
20#include "BKE_sound.h"
21
22#include "DNA_sound_types.h"
23
24#include "MOV_read.hh"
25
26#include "SEQ_animation.hh"
27#include "SEQ_channels.hh"
28#include "SEQ_iterator.hh"
29#include "SEQ_render.hh"
30#include "SEQ_retiming.hh"
31#include "SEQ_sequencer.hh"
32#include "SEQ_time.hh"
33#include "SEQ_transform.hh"
34
35#include "sequencer.hh"
36#include "strip_time.hh"
37#include "utils.hh"
38
39namespace blender::seq {
40
41float time_media_playback_rate_factor_get(const Strip *strip, const float scene_fps)
42{
43 if ((strip->flag & SEQ_AUTO_PLAYBACK_RATE) == 0) {
44 return 1.0f;
45 }
46 if (strip->media_playback_rate == 0.0f) {
47 return 1.0f;
48 }
49 return strip->media_playback_rate / scene_fps;
50}
51
52float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
53{
54 float frame_index;
55 float sta = time_start_frame_get(strip);
56 float end = time_content_end_frame_get(scene, strip) - 1;
57 float frame_index_max = strip->len - 1;
58
59 if (strip->type & STRIP_TYPE_EFFECT) {
60 end = time_right_handle_frame_get(scene, strip);
61 frame_index_max = end - sta;
62 }
63
64 if (end < sta) {
65 return -1;
66 }
67
68 if (strip->type == STRIP_TYPE_IMAGE && transform_single_image_check(strip)) {
69 return 0;
70 }
71
72 if (strip->flag & SEQ_REVERSE_FRAMES) {
73 frame_index = end - timeline_frame;
74 }
75 else {
76 frame_index = timeline_frame - sta;
77 }
78
79 frame_index = max_ff(frame_index, 0);
80
81 const float scene_fps = float(scene->r.frs_sec) / float(scene->r.frs_sec_base);
82 frame_index *= time_media_playback_rate_factor_get(strip, scene_fps);
83
84 if (retiming_is_active(strip)) {
85 const float retiming_factor = strip_retiming_evaluate(strip, frame_index);
86 frame_index = retiming_factor * frame_index_max;
87 }
88 /* Clamp frame index to strip content frame range. */
89 frame_index = clamp_f(frame_index, 0, frame_index_max);
90
91 if (strip->strobe > 1.0f) {
92 frame_index -= fmodf(double(frame_index), double(strip->strobe));
93 }
94
95 return frame_index;
96}
97
98static int metastrip_start_get(Strip *strip_meta)
99{
100 return strip_meta->start + strip_meta->startofs;
101}
102
103static int metastrip_end_get(Strip *strip_meta)
104{
105 return strip_meta->start + strip_meta->len - strip_meta->endofs;
106}
107
109 Strip *strip_meta,
110 int start,
111 int end)
112{
113 /* For sound we go over full meta tree to update bounds of the sound strips,
114 * since sound is played outside of evaluating the image-buffers (#ImBuf). */
115 LISTBASE_FOREACH (Strip *, strip, &strip_meta->seqbase) {
116 if (strip->type == STRIP_TYPE_META) {
118 strip,
119 max_ii(start, metastrip_start_get(strip)),
120 min_ii(end, metastrip_end_get(strip)));
121 }
122 else if (ELEM(strip->type, STRIP_TYPE_SOUND_RAM, STRIP_TYPE_SCENE)) {
123 if (strip->scene_sound) {
124 int startofs = strip->startofs;
125 int endofs = strip->endofs;
126 if (strip->startofs + strip->start < start) {
127 startofs = start - strip->start;
128 }
129
130 if (strip->start + strip->len - strip->endofs > end) {
131 endofs = strip->start + strip->len - end;
132 }
133
134 double offset_time = 0.0f;
135 if (strip->sound != nullptr) {
136 offset_time = strip->sound->offset_time + strip->sound_offset;
137 }
138
140 strip->scene_sound,
141 strip->start + startofs,
142 strip->start + strip->len - endofs,
143 startofs + strip->anim_startofs,
144 offset_time);
145 }
146 }
147 }
148}
149
150void strip_update_sound_bounds_recursive(const Scene *scene, Strip *strip_meta)
151{
153 scene, strip_meta, metastrip_start_get(strip_meta), metastrip_end_get(strip_meta));
154}
155
156void time_update_meta_strip_range(const Scene *scene, Strip *strip_meta)
157{
158 if (strip_meta == nullptr) {
159 return;
160 }
161
162 if (BLI_listbase_is_empty(&strip_meta->seqbase)) {
163 return;
164 }
165
166 const int strip_start = time_left_handle_frame_get(scene, strip_meta);
167 const int strip_end = time_right_handle_frame_get(scene, strip_meta);
168
169 int min = MAXFRAME * 2;
170 int max = -MAXFRAME * 2;
171 LISTBASE_FOREACH (Strip *, strip, &strip_meta->seqbase) {
172 min = min_ii(time_left_handle_frame_get(scene, strip), min);
173 max = max_ii(time_right_handle_frame_get(scene, strip), max);
174 }
175
176 strip_meta->start = min + strip_meta->anim_startofs;
177 strip_meta->len = max - min;
178 strip_meta->len -= strip_meta->anim_startofs;
179 strip_meta->len -= strip_meta->anim_endofs;
180
181 /* Functions `SEQ_time_*_handle_frame_set()` can not be used here, because they are clamped, so
182 * change must be done at once. */
183 strip_meta->startofs = strip_start - strip_meta->start;
184 strip_meta->startdisp = strip_start; /* Only to make files usable in older versions. */
185 strip_meta->endofs = strip_meta->start + time_strip_length_get(scene, strip_meta) - strip_end;
186 strip_meta->enddisp = strip_end; /* Only to make files usable in older versions. */
187
188 strip_update_sound_bounds_recursive(scene, strip_meta);
189 blender::Span<Strip *> effects = SEQ_lookup_effects_by_strip(scene->ed, strip_meta);
191 time_update_meta_strip_range(scene, lookup_meta_by_strip(scene->ed, strip_meta));
192}
193
194void strip_time_effect_range_set(const Scene *scene, Strip *strip)
195{
196 if (strip->input1 == nullptr && strip->input2 == nullptr) {
197 return;
198 }
199
200 if (strip->input1 && strip->input2) { /* 2 - input effect. */
201 strip->startdisp = max_ii(time_left_handle_frame_get(scene, strip->input1),
202 time_left_handle_frame_get(scene, strip->input2));
203 strip->enddisp = min_ii(time_right_handle_frame_get(scene, strip->input1),
204 time_right_handle_frame_get(scene, strip->input2));
205 }
206 else if (strip->input1) { /* Single input effect. */
207 strip->startdisp = time_right_handle_frame_get(scene, strip->input1);
208 strip->enddisp = time_left_handle_frame_get(scene, strip->input1);
209 }
210 else if (strip->input2) { /* Strip may be missing one of inputs. */
211 strip->startdisp = time_right_handle_frame_get(scene, strip->input2);
212 strip->enddisp = time_left_handle_frame_get(scene, strip->input2);
213 }
214
215 if (strip->startdisp > strip->enddisp) {
216 std::swap(strip->startdisp, strip->enddisp);
217 }
218
219 /* Values unusable for effects, these should be always 0. */
220 strip->startofs = strip->endofs = strip->anim_startofs = strip->anim_endofs = 0;
221 strip->start = strip->startdisp;
222 strip->len = strip->enddisp - strip->startdisp;
223}
224
226 const blender::Span<Strip *> effects)
227{
228 /* First pass: Update length of immediate effects. */
229 for (Strip *strip : effects) {
230 strip_time_effect_range_set(scene, strip);
231 }
232
233 /* Second pass: Recursive call to update effects in chain and in order, so they inherit length
234 * correctly. */
235 for (Strip *strip : effects) {
236 blender::Span<Strip *> effects_recurse = SEQ_lookup_effects_by_strip(scene->ed, strip);
237 strip_time_update_effects_strip_range(scene, effects_recurse);
238 }
239}
240
242 int timeline_frame,
243 const short side,
244 const bool do_skip_mute,
245 const bool do_center,
246 const bool do_unselected)
247{
248 Editing *ed = editing_get(scene);
250
251 int dist, best_dist, best_frame = timeline_frame;
252 int strip_frames[2], strip_frames_tot;
253
254 /* In case where both is passed,
255 * frame just finds the nearest end while frame_left the nearest start. */
256
257 best_dist = MAXFRAME * 2;
258
259 if (ed == nullptr) {
260 return timeline_frame;
261 }
262
263 LISTBASE_FOREACH (Strip *, strip, ed->seqbasep) {
264 int i;
265
266 if (do_skip_mute && render_is_muted(channels, strip)) {
267 continue;
268 }
269
270 if (do_unselected && (strip->flag & SELECT)) {
271 continue;
272 }
273
274 if (do_center) {
275 strip_frames[0] = (time_left_handle_frame_get(scene, strip) +
276 time_right_handle_frame_get(scene, strip)) /
277 2;
278 strip_frames_tot = 1;
279 }
280 else {
281 strip_frames[0] = time_left_handle_frame_get(scene, strip);
282 strip_frames[1] = time_right_handle_frame_get(scene, strip);
283
284 strip_frames_tot = 2;
285 }
286
287 for (i = 0; i < strip_frames_tot; i++) {
288 const int strip_frame = strip_frames[i];
289
290 dist = MAXFRAME * 2;
291
292 switch (side) {
293 case SIDE_LEFT:
294 if (strip_frame < timeline_frame) {
295 dist = timeline_frame - strip_frame;
296 }
297 break;
298 case SIDE_RIGHT:
299 if (strip_frame > timeline_frame) {
300 dist = strip_frame - timeline_frame;
301 }
302 break;
303 case SIDE_BOTH:
304 dist = abs(strip_frame - timeline_frame);
305 break;
306 }
307
308 if (dist < best_dist) {
309 best_frame = strip_frame;
310 best_dist = dist;
311 }
312 }
313 }
314
315 return best_frame;
316}
317
318float time_strip_fps_get(Scene *scene, Strip *strip)
319{
320 switch (strip->type) {
321 case STRIP_TYPE_MOVIE: {
322 strip_open_anim_file(scene, strip, true);
323 if (BLI_listbase_is_empty(&strip->anims)) {
324 return 0.0f;
325 }
326 StripAnim *strip_anim = static_cast<StripAnim *>(strip->anims.first);
327 if (strip_anim->anim == nullptr) {
328 return 0.0f;
329 }
330 return MOV_get_fps(strip_anim->anim);
331 }
333 if (strip->clip != nullptr) {
334 return BKE_movieclip_get_fps(strip->clip);
335 }
336 break;
337 case STRIP_TYPE_SCENE:
338 if (strip->scene != nullptr) {
339 return float(strip->scene->r.frs_sec) / strip->scene->r.frs_sec_base;
340 }
341 break;
342 }
343 return 0.0f;
344}
345
346void timeline_init_boundbox(const Scene *scene, rctf *r_rect)
347{
348 r_rect->xmin = scene->r.sfra;
349 r_rect->xmax = scene->r.efra + 1;
350 r_rect->ymin = 1.0f; /* The first strip is drawn at y == 1.0f */
351 r_rect->ymax = 8.0f;
352}
353
354void timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
355{
356 if (seqbase == nullptr) {
357 return;
358 }
359
360 LISTBASE_FOREACH (Strip *, strip, seqbase) {
361 rect->xmin = std::min<float>(rect->xmin, time_left_handle_frame_get(scene, strip) - 1);
362 rect->xmax = std::max<float>(rect->xmax, time_right_handle_frame_get(scene, strip) + 1);
363 /* We do +1 here to account for the channel thickness. Channel n has range of <n, n+1>. */
364 rect->ymax = std::max(rect->ymax, strip->channel + 1.0f);
365 }
366}
367
368void timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *r_rect)
369{
370 timeline_init_boundbox(scene, r_rect);
371 timeline_expand_boundbox(scene, seqbase, r_rect);
372}
373
374static bool strip_exists_at_frame(const Scene *scene,
376 const int timeline_frame)
377{
378 for (Strip *strip : strips) {
379 if (time_strip_intersects_frame(scene, strip, timeline_frame)) {
380 return true;
381 }
382 }
383 return false;
384}
385
386void seq_time_gap_info_get(const Scene *scene,
387 ListBase *seqbase,
388 const int initial_frame,
389 GapInfo *r_gap_info)
390{
391 rctf rectf;
392 /* Get first and last frame. */
393 timeline_boundbox(scene, seqbase, &rectf);
394 const int sfra = int(rectf.xmin);
395 const int efra = int(rectf.xmax);
396 int timeline_frame = initial_frame;
397 r_gap_info->gap_exists = false;
398
399 blender::VectorSet strips = query_all_strips(seqbase);
400
401 if (!strip_exists_at_frame(scene, strips, initial_frame)) {
402 /* Search backward for gap_start_frame. */
403 for (; timeline_frame >= sfra; timeline_frame--) {
404 if (strip_exists_at_frame(scene, strips, timeline_frame)) {
405 break;
406 }
407 }
408 r_gap_info->gap_start_frame = timeline_frame + 1;
409 timeline_frame = initial_frame;
410 }
411 else {
412 /* Search forward for gap_start_frame. */
413 for (; timeline_frame <= efra; timeline_frame++) {
414 if (!strip_exists_at_frame(scene, strips, timeline_frame)) {
415 r_gap_info->gap_start_frame = timeline_frame;
416 break;
417 }
418 }
419 }
420 /* Search forward for gap_end_frame. */
421 for (; timeline_frame <= efra; timeline_frame++) {
422 if (strip_exists_at_frame(scene, strips, timeline_frame)) {
423 const int gap_end_frame = timeline_frame;
424 r_gap_info->gap_length = gap_end_frame - r_gap_info->gap_start_frame;
425 r_gap_info->gap_exists = true;
426 break;
427 }
428 }
429}
430
431bool time_strip_intersects_frame(const Scene *scene, const Strip *strip, const int timeline_frame)
432{
433 return (time_left_handle_frame_get(scene, strip) <= timeline_frame) &&
434 (time_right_handle_frame_get(scene, strip) > timeline_frame);
435}
436
437bool time_has_left_still_frames(const Scene *scene, const Strip *strip)
438{
439 return time_left_handle_frame_get(scene, strip) < time_start_frame_get(strip);
440}
441
442bool time_has_right_still_frames(const Scene *scene, const Strip *strip)
443{
444 return time_right_handle_frame_get(scene, strip) > time_content_end_frame_get(scene, strip);
445}
446
447bool time_has_still_frames(const Scene *scene, const Strip *strip)
448{
449 return time_has_right_still_frames(scene, strip) || time_has_left_still_frames(scene, strip);
450}
451
452int time_strip_length_get(const Scene *scene, const Strip *strip)
453{
454 const float scene_fps = float(scene->r.frs_sec) / float(scene->r.frs_sec_base);
455 if (retiming_is_active(strip)) {
456 const int last_key_frame = retiming_key_timeline_frame_get(
457 scene, strip, retiming_last_key_get(strip));
458 /* Last key is mapped to last frame index. Numbering starts from 0. */
459 const int sound_offset = time_get_rounded_sound_offset(strip, scene_fps);
460 return last_key_frame + 1 - time_start_frame_get(strip) - sound_offset;
461 }
462
463 return strip->len / time_media_playback_rate_factor_get(strip, scene_fps);
464}
465
466float time_start_frame_get(const Strip *strip)
467{
468 return strip->start;
469}
470
471void time_start_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
472{
473 strip->start = timeline_frame;
477}
478
479float time_content_end_frame_get(const Scene *scene, const Strip *strip)
480{
481 return time_start_frame_get(strip) + time_strip_length_get(scene, strip);
482}
483
484int time_left_handle_frame_get(const Scene * /*scene*/, const Strip *strip)
485{
486 if (strip->input1 || strip->input2) {
487 return strip->startdisp;
488 }
489
490 return strip->start + strip->startofs;
491}
492
493int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
494{
495 if (strip->input1 || strip->input2) {
496 return strip->enddisp;
497 }
498
499 return time_content_end_frame_get(scene, strip) - strip->endofs;
500}
501
502void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
503{
504 const float right_handle_orig_frame = time_right_handle_frame_get(scene, strip);
505
506 if (timeline_frame >= right_handle_orig_frame) {
507 timeline_frame = right_handle_orig_frame - 1;
508 }
509
510 float offset = timeline_frame - time_start_frame_get(strip);
511
512 if (transform_single_image_check(strip)) {
513 /* This strip has only 1 frame of content, that is always stretched to whole strip length.
514 * Therefore, strip start should be moved instead of adjusting offset. */
515 time_start_frame_set(scene, strip, timeline_frame);
516 strip->endofs += offset;
517 }
518 else {
519 strip->startofs = offset;
520 }
521
522 strip->startdisp = timeline_frame; /* Only to make files usable in older versions. */
523
527}
528
529void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
530{
531 const float left_handle_orig_frame = time_left_handle_frame_get(scene, strip);
532
533 if (timeline_frame <= left_handle_orig_frame) {
534 timeline_frame = left_handle_orig_frame + 1;
535 }
536
537 strip->endofs = time_content_end_frame_get(scene, strip) - timeline_frame;
538 strip->enddisp = timeline_frame; /* Only to make files usable in older versions. */
539
543}
544
545void strip_time_translate_handles(const Scene *scene, Strip *strip, const int offset)
546{
547 strip->startofs += offset;
548 strip->endofs -= offset;
549 strip->startdisp += offset; /* Only to make files usable in older versions. */
550 strip->enddisp -= offset; /* Only to make files usable in older versions. */
551
555}
556
557static void strip_time_slip_strip_ex(const Scene *scene,
558 Strip *strip,
559 int delta,
560 float subframe_delta,
561 bool slip_keyframes,
562 bool recursed)
563{
564 if (strip->type == STRIP_TYPE_SOUND_RAM && subframe_delta != 0.0f) {
565 strip->sound_offset += subframe_delta / FPS;
566 }
567
568 if (delta == 0 && (!slip_keyframes || subframe_delta == 0.0f)) {
569 return;
570 }
571
572 /* Skip effect strips where the length is dependent on another strip,
573 * as they are calculated with #strip_time_update_effects_strip_range. */
574 if (strip->input1 != nullptr || strip->input2 != nullptr) {
575 return;
576 }
577
578 /* Effects only have a start frame and a length, so unless we're inside
579 * a meta strip, there's no need to do anything. */
580 if (!recursed && (strip->type & STRIP_TYPE_EFFECT)) {
581 return;
582 }
583
584 /* Move strips inside meta strip. */
585 if (strip->type == STRIP_TYPE_META) {
586 /* If the meta strip has no contents, don't do anything. */
587 if (BLI_listbase_is_empty(&strip->seqbase)) {
588 return;
589 }
590
591 LISTBASE_FOREACH (Strip *, strip_child, &strip->seqbase) {
592 /* The keyframes of strips inside meta strips should always be moved. */
593 strip_time_slip_strip_ex(scene, strip_child, delta, subframe_delta, true, true);
594 }
595 }
596
597 strip->start = strip->start + delta;
598
599 if (slip_keyframes) {
600 float anim_offset = delta;
601 if (strip->type == STRIP_TYPE_SOUND_RAM) {
602 anim_offset += subframe_delta;
603 }
604 offset_animdata(scene, strip, anim_offset);
605 }
606
607 if (!recursed) {
608 strip->startofs = strip->startofs - delta;
609 strip->endofs = strip->endofs + delta;
610 }
611
612 /* Only to make files usable in older versions. */
613 strip->startdisp = time_left_handle_frame_get(scene, strip);
614 strip->enddisp = time_right_handle_frame_get(scene, strip);
615
618}
619
621 const Scene *scene, Strip *strip, int frame_delta, float subframe_delta, bool slip_keyframes)
622{
623 strip_time_slip_strip_ex(scene, strip, frame_delta, subframe_delta, slip_keyframes, false);
624}
625
626int time_get_rounded_sound_offset(const Strip *strip, const float frames_per_second)
627{
628 if (strip->type == STRIP_TYPE_SOUND_RAM && strip->sound != nullptr) {
629 return round_fl_to_int((strip->sound->offset_time + strip->sound_offset) * frames_per_second);
630 }
631 return 0;
632}
633
634} // namespace blender::seq
float BKE_movieclip_get_fps(struct MovieClip *clip)
void BKE_sound_move_scene_sound(const struct Scene *scene, void *handle, int startframe, int endframe, int frameskip, double audio_offset)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE int max_ii(int a, int b)
#define ELEM(...)
#define FPS
#define MAXFRAME
@ STRIP_TYPE_SCENE
@ STRIP_TYPE_MOVIECLIP
@ STRIP_TYPE_SOUND_RAM
@ STRIP_TYPE_IMAGE
@ STRIP_TYPE_MOVIE
@ STRIP_TYPE_EFFECT
@ STRIP_TYPE_META
@ SEQ_REVERSE_FRAMES
@ SEQ_AUTO_PLAYBACK_RATE
#define SELECT
#define fmodf(x, y)
#define abs
float MOV_get_fps(const MovieReader *anim)
bool render_is_muted(const ListBase *channels, const Strip *strip)
Definition render.cc:2081
Strip * lookup_meta_by_strip(Editing *ed, const Strip *key)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
VectorSet< Strip * > query_all_strips(ListBase *seqbase)
Definition iterator.cc:118
ListBase * channels_displayed_get(const Editing *ed)
Definition channels.cc:28
float time_content_end_frame_get(const Scene *scene, const Strip *strip)
bool time_has_right_still_frames(const Scene *scene, const Strip *strip)
float time_media_playback_rate_factor_get(const Strip *strip, const float scene_fps)
Definition strip_time.cc:41
void timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *r_rect)
bool time_has_left_still_frames(const Scene *scene, const Strip *strip)
static int metastrip_end_get(Strip *strip_meta)
int retiming_key_timeline_frame_get(const Scene *scene, const Strip *strip, const SeqRetimingKey *key)
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
Definition strip_time.cc:52
Editing * editing_get(const Scene *scene)
Definition sequencer.cc:272
static bool strip_exists_at_frame(const Scene *scene, blender::Span< Strip * > strips, const int timeline_frame)
blender::Span< Strip * > SEQ_lookup_effects_by_strip(Editing *ed, const Strip *key)
float time_strip_fps_get(Scene *scene, Strip *strip)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void offset_animdata(const Scene *scene, Strip *strip, float ofs)
Definition animation.cc:42
void seq_time_gap_info_get(const Scene *scene, ListBase *seqbase, const int initial_frame, GapInfo *r_gap_info)
void strip_open_anim_file(Scene *scene, Strip *strip, bool openfile)
int time_get_rounded_sound_offset(const Strip *strip, const float frames_per_second)
float time_start_frame_get(const Strip *strip)
void strip_time_update_effects_strip_range(const Scene *scene, const blender::Span< Strip * > effects)
bool transform_single_image_check(const Strip *strip)
int time_strip_length_get(const Scene *scene, const Strip *strip)
bool retiming_is_active(const Strip *strip)
void timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
void time_update_meta_strip_range(const Scene *scene, Strip *strip_meta)
bool time_strip_intersects_frame(const Scene *scene, const Strip *strip, const int timeline_frame)
void time_slip_strip(const Scene *scene, Strip *strip, int frame_delta, float subframe_delta, bool slip_keyframes)
void strip_time_translate_handles(const Scene *scene, Strip *strip, const int offset)
void time_start_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
void strip_update_sound_bounds_recursive(const Scene *scene, Strip *strip_meta)
static void strip_time_slip_strip_ex(const Scene *scene, Strip *strip, int delta, float subframe_delta, bool slip_keyframes, bool recursed)
void timeline_init_boundbox(const Scene *scene, rctf *r_rect)
bool time_has_still_frames(const Scene *scene, const Strip *strip)
static void strip_update_sound_bounds_recursive_impl(const Scene *scene, Strip *strip_meta, int start, int end)
void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
static int metastrip_start_get(Strip *strip_meta)
Definition strip_time.cc:98
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
SeqRetimingKey * retiming_last_key_get(const Strip *strip)
float strip_retiming_evaluate(const Strip *strip, const float frame_index)
int time_find_next_prev_edit(Scene *scene, int timeline_frame, const short side, const bool do_skip_mute, const bool do_center, const bool do_unselected)
void strip_time_effect_range_set(const Scene *scene, Strip *strip)
#define min(a, b)
Definition sort.cc:36
void * first
struct Editing * ed
struct RenderData r
struct MovieReader * anim
struct Strip * input1
struct Scene * scene
struct MovieClip * clip
struct bSound * sound
ListBase seqbase
float media_playback_rate
float sound_offset
struct Strip * input2
ListBase anims
double offset_time
float xmax
float xmin
float ymax
float ymin
i
Definition text_draw.cc:230
max
Definition text_draw.cc:251