diff options
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r-- | source/blender/sequencer/SEQ_time.h | 1 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_time.c | 4 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_transform.c | 10 |
3 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/sequencer/SEQ_time.h b/source/blender/sequencer/SEQ_time.h index 67d3a2e5960..593a8fe7bf2 100644 --- a/source/blender/sequencer/SEQ_time.h +++ b/source/blender/sequencer/SEQ_time.h @@ -46,6 +46,7 @@ void SEQ_time_update_sequence(struct Scene *scene, struct Sequence *seq); void SEQ_time_update_sequence_bounds(struct Scene *scene, struct Sequence *seq); int SEQ_time_cmp_time_startdisp(const void *a, const void *b); bool SEQ_time_strip_intersects_frame(const struct Sequence *seq, const int timeline_frame); +void SEQ_time_update_meta_strip_range(struct Scene *scene, struct Sequence *seq_meta); #ifdef __cplusplus } diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index b8b6f62c7aa..65756006fa9 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -184,7 +184,7 @@ static void seq_time_update_meta_strip(Scene *scene, Sequence *seq_meta) seq_update_sound_bounds_recursive(scene, seq_meta); } -static void seq_time_update_meta_strip_range(Scene *scene, Sequence *seq_meta) +void SEQ_time_update_meta_strip_range(Scene *scene, Sequence *seq_meta) { seq_time_update_meta_strip(scene, seq_meta); @@ -250,7 +250,7 @@ void SEQ_time_update_sequence(Scene *scene, Sequence *seq) Editing *ed = SEQ_editing_get(scene, false); MetaStack *ms = SEQ_meta_stack_active_get(ed); if (ms != NULL) { - seq_time_update_meta_strip_range(scene, ms->parseq); + SEQ_time_update_meta_strip_range(scene, ms->parseq); } SEQ_time_update_sequence_bounds(scene, seq); diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index a02d8a1428e..b969f531e68 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -233,14 +233,22 @@ void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delt SEQ_offset_animdata(evil_scene, seq, delta); seq->start += delta; + /* Meta strips requires special handling: their content is to be translated, and then frame range + * of the meta is to be updated for the updated content. */ if (seq->type == SEQ_TYPE_META) { Sequence *seq_child; for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { SEQ_transform_translate_sequence(evil_scene, seq_child, delta); } + /* Ensure that meta bounds are updated, but this function prevents resets seq->start and + * start/end point in timeline. */ + SEQ_time_update_meta_strip_range(evil_scene, seq); + /* Move meta start/end points. */ + SEQ_transform_set_left_handle_frame(seq, seq->startdisp + delta); + SEQ_transform_set_right_handle_frame(seq, seq->enddisp + delta); } - SEQ_time_update_sequence_bounds(evil_scene, seq); + SEQ_time_update_sequence(evil_scene, seq); } /* return 0 if there weren't enough space */ |