diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-06-14 22:55:59 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-06-14 22:55:59 +0300 |
commit | 20ba130315f3308907df463bb0a5d2676410921f (patch) | |
tree | 0e8d3c28dbaebb75139cd6bafc55cfedf69c655c /source/blender/sequencer | |
parent | a59fedb0bf7eb9215eb864a3772d922be4780138 (diff) |
Fix T72831: Incorrect animation handling when strips overlap
Function `SEQ_transform_seqbase_shuffle_time` did not have access to
strip effects, and therefore could not handle their animation. Since
now transformation knows what strips can't be directly moved, but their
position depends on other strips, this collection of strips is passed as
argument, so animation can be offset correctly.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r-- | source/blender/sequencer/SEQ_transform.h | 2 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_transform.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/sequencer/SEQ_transform.h b/source/blender/sequencer/SEQ_transform.h index 93ce6873d3b..31a7399f844 100644 --- a/source/blender/sequencer/SEQ_transform.h +++ b/source/blender/sequencer/SEQ_transform.h @@ -46,6 +46,7 @@ bool SEQ_transform_seqbase_shuffle(struct ListBase *seqbasep, struct Sequence *test, struct Scene *evil_scene); bool SEQ_transform_seqbase_shuffle_time(struct SeqCollection *strips_to_shuffle, + struct SeqCollection *time_dependent_strips, struct ListBase *seqbasep, struct Scene *evil_scene, struct ListBase *markers, @@ -54,6 +55,7 @@ bool SEQ_transform_seqbase_shuffle_time(struct SeqCollection *strips_to_shuffle, void SEQ_transform_handle_overlap(struct Scene *scene, struct ListBase *seqbasep, struct SeqCollection *transformed_strips, + struct SeqCollection *time_dependent_strips, bool use_sync_markers); /** * Check if the selected seq's reference unselected seq's. diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c index ebf317eff05..a6dd41d72df 100644 --- a/source/blender/sequencer/intern/strip_transform.c +++ b/source/blender/sequencer/intern/strip_transform.c @@ -307,6 +307,7 @@ static int shuffle_seq_time_offset_get(SeqCollection *strips_to_shuffle, } bool SEQ_transform_seqbase_shuffle_time(SeqCollection *strips_to_shuffle, + SeqCollection *time_dependent_strips, ListBase *seqbasep, Scene *evil_scene, ListBase *markers, @@ -323,6 +324,12 @@ bool SEQ_transform_seqbase_shuffle_time(SeqCollection *strips_to_shuffle, seq->flag &= ~SEQ_OVERLAP; } + if (time_dependent_strips != NULL) { + SEQ_ITERATOR_FOREACH (seq, time_dependent_strips) { + SEQ_offset_animdata(evil_scene, seq, offset); + } + } + if (use_sync_markers && !(evil_scene->toolsettings->lock_markers) && (markers != NULL)) { TimeMarker *marker; /* affect selected markers - it's unlikely that we will want to affect all in this way? */ |