diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-06-29 13:45:59 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-06-29 13:48:34 +0300 |
commit | 302b04a5a3fc0e767ac784424f78ce2edf5d2844 (patch) | |
tree | def4de621fbb0a194b350da781f054c6aefbab35 /source/blender/sequencer/intern/utils.c | |
parent | c51b8ec86364585c4088837c603b39752065bc34 (diff) |
VSE: Improved Retiming system
Patch implements better way to control playback speed than it is
possible to do with speed effect. Speed factor property can be set in
Time panel.
There are 2 layers of control:
Option to retime movie to match scene FPS rate.
Custom speed factor to control playback rate.
Since playback rate is strip property, it is now possible to manipulate
strip as normal one even if it is retimed.
To facilitate manipulation, some functions need to consider speed factor
and apply necessary corrections to strip offset or strip start. These
corrections may need to be float numbers, so start and offsets must be
float as well.
Sound strips now use speed factor instead of pitch. This means, that
strips will change length to match usable length. In addition, it is
possible to group movie and sound strip and change speed of meta strip.
Diffstat (limited to 'source/blender/sequencer/intern/utils.c')
-rw-r--r-- | source/blender/sequencer/intern/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/sequencer/intern/utils.c b/source/blender/sequencer/intern/utils.c index 3cfe63e284f..2026e322763 100644 --- a/source/blender/sequencer/intern/utils.c +++ b/source/blender/sequencer/intern/utils.c @@ -187,7 +187,7 @@ ListBase *SEQ_get_seqbase_from_sequence(Sequence *seq, ListBase **r_channels, in case SEQ_TYPE_META: { seqbase = &seq->seqbase; *r_channels = &seq->channels; - *r_offset = seq->start; + *r_offset = SEQ_time_start_frame_get(seq); break; } case SEQ_TYPE_SCENE: { @@ -347,7 +347,8 @@ const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame) } for (seq = ed->seqbasep->first; seq; seq = seq->next) { - if (SEQ_render_is_muted(channels, seq) || !SEQ_time_strip_intersects_frame(seq, frame)) { + if (SEQ_render_is_muted(channels, seq) || + !SEQ_time_strip_intersects_frame(scene, seq, frame)) { continue; } /* Only use strips that generate an image, not ones that combine |