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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-07-31 12:53:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-07-31 12:53:22 +0300
commitdb24e289b25e6110265110aa4bf3009541e9fae9 (patch)
treee4d9b4eeecbbc18b4163b0e85ee33327989c0910 /source/blender/editors/space_sequencer
parentf379bb368bf57b97eb6b10a009ecb80cbc57159f (diff)
parentde68880e792085aaef1372b023c70c363ed025d0 (diff)
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 8be7c7b4fb6..2f85eb10e77 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2475,7 +2475,8 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
if (nseqbase.first) {
Sequence *seq = nseqbase.first;
- /* Rely on the nseqbase list being added at the end. */
+ /* Rely on the nseqbase list being added at the end.
+ * Their UUIDs has been re-generated by the BKE_sequence_base_dupli_recursive(), */
BLI_movelisttolist(ed->seqbasep, &nseqbase);
for (; seq; seq = seq->next) {
@@ -2845,6 +2846,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
if (seq != seqm && (seq->flag & SELECT)) {
BKE_sequence_invalidate_cache_composite(scene, seq);
channel_max = max_ii(seq->machine, channel_max);
+ /* Sequence is moved within the same edit, no need to re-generate the UUID. */
BLI_remlink(ed->seqbasep, seq);
BLI_addtail(&seqm->seqbase, seq);
}
@@ -2921,6 +2923,9 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
BKE_sequence_invalidate_cache_composite(scene, seq);
}
+ /* This moves strips from meta to parent, sating within same edit and no new strips are
+ * allocated. If the UUID was unique already (as it should) it will stay unique. Nn need to
+ * re-generate the UUIDs.*/
BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase);
BLI_listbase_clear(&last_seq->seqbase);
@@ -3260,8 +3265,15 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- BKE_sequence_base_dupli_recursive(
- scene, scene, &seqbase_clipboard, ed->seqbasep, 0, LIB_ID_CREATE_NO_USER_REFCOUNT);
+ /* NOTE: The UUID is re-generated on paste, so we can keep UUID in the clipboard since
+ * nobody can reach them anyway.
+ * This reduces chance or running out of UUIDs if a cat falls asleep on Ctrl-C. */
+ BKE_sequence_base_dupli_recursive(scene,
+ scene,
+ &seqbase_clipboard,
+ ed->seqbasep,
+ 0,
+ (LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_FREE_NO_MAIN));
seqbase_clipboard_frame = scene->r.cfra;
@@ -3319,6 +3331,8 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
iseq_first = nseqbase.first;
+ /* NOTE: BKE_sequence_base_dupli_recursive() takes care of generating new UUIDs for sequences
+ * in the new list. */
BLI_movelisttolist(ed->seqbasep, &nseqbase);
for (iseq = iseq_first; iseq; iseq = iseq->next) {