Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-05-20 02:19:32 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-05-20 02:27:12 +0300
commit47e88345a154d2bd14bde57227e3efad7d1fff52 (patch)
treed41fdafb59cb6efc1ecccec9a04e4740304a2585 /source/blender/sequencer
parentd1c9a99c07b1160b01710577ea0109addceac97c (diff)
VSE: Fix animation duplication in split operator
Due to misunderstanding of how strip duplication works, animation data was duplicated on all strips when any strip was split. `SEQ_sequence_base_dupli_recursive()` duplicated data on strip that was being split, and `SEQ_ensure_unique_name()` duplicated animation on all strips. Only duplication should be done with `SEQ_ensure_unique_name()` and only on right side split strips, because only these strips are duplicated.
Diffstat (limited to 'source/blender/sequencer')
-rw-r--r--source/blender/sequencer/intern/strip_edit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/strip_edit.c b/source/blender/sequencer/intern/strip_edit.c
index 18f99272ee7..4de6ec3583c 100644
--- a/source/blender/sequencer/intern/strip_edit.c
+++ b/source/blender/sequencer/intern/strip_edit.c
@@ -411,8 +411,7 @@ Sequence *SEQ_edit_strip_split(Main *bmain,
/* Duplicate ListBase. */
ListBase right_strips = {NULL, NULL};
- SEQ_sequence_base_dupli_recursive(
- scene, scene, &right_strips, &left_strips, SEQ_DUPE_ANIM | SEQ_DUPE_ALL, 0);
+ SEQ_sequence_base_dupli_recursive(scene, scene, &right_strips, &left_strips, SEQ_DUPE_ALL, 0);
/* Split strips. */
Sequence *left_seq = left_strips.first;
@@ -424,11 +423,12 @@ Sequence *SEQ_edit_strip_split(Main *bmain,
right_seq = right_seq->next;
}
- /* Move strips back to seqbase. Move right strips first, so left strips don't change name. */
- BLI_movelisttolist(seqbase, &right_strips);
+ seq = right_strips.first;
BLI_movelisttolist(seqbase, &left_strips);
- LISTBASE_FOREACH (Sequence *, seq_iter, seqbase) {
- SEQ_ensure_unique_name(seq_iter, scene);
+ BLI_movelisttolist(seqbase, &right_strips);
+
+ for (; seq; seq = seq->next) {
+ SEQ_ensure_unique_name(seq, scene);
}
return return_seq;