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-19 00:38:33 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-05-19 00:41:47 +0300
commitd373b43f07f5403826035b5dee71b09f433b0540 (patch)
tree88bfe141f78f611a891e868f0dccb5a5fe31cbe0 /source/blender/editors/space_sequencer
parentf7a14c116c4de9a0ac2a07d7c6fa3097a018a668 (diff)
VSE: Better handling of effect strip splitting
Splitting of effect strip alone wasn't handled properly. Previously this resulted in duplicating effect strip, and it was broken at least from 2.79. Change in rB8ec6b34b8eb2 was intended to allow splitting strips individually, so it can be used as RNA API function but also so it requires as little glue logic as possible. This is fixed by splitting all dependent strips at once in 2 separate ListBases for left and right strips. Strips can be finally moved into original `ListBase`. With this fix it is still possible to split strips individually with little glue logic. RNA API function could return list of split strips as well, currently at least one strip in chain will be provided so chain can be reconstructed on python side. Reviewed By: sergey Differential Revision: https://developer.blender.org/D10209
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 1a1ba5a0754..4d87f0300e7 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1577,17 +1577,6 @@ void SEQUENCER_OT_split(struct wmOperatorType *ot)
/** \name Duplicate Strips Operator
* \{ */
-static int apply_unique_name_fn(Sequence *seq, void *arg_pt)
-{
- Scene *scene = (Scene *)arg_pt;
- char name[sizeof(seq->name) - 2];
-
- BLI_strncpy_utf8(name, seq->name + 2, sizeof(name));
- SEQ_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq);
- SEQ_dupe_animdata(scene, name, seq->name + 2);
- return 1;
-}
-
static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
@@ -1608,7 +1597,7 @@ static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
BLI_movelisttolist(ed->seqbasep, &nseqbase);
for (; seq; seq = seq->next) {
- SEQ_recursive_apply(seq, apply_unique_name_fn, scene);
+ SEQ_ensure_unique_name(seq, scene);
}
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
@@ -2465,7 +2454,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *op)
for (iseq = iseq_first; iseq; iseq = iseq->next) {
/* Make sure, that pasted strips have unique names. */
- SEQ_recursive_apply(iseq, apply_unique_name_fn, scene);
+ SEQ_ensure_unique_name(iseq, scene);
/* Translate after name has been changed, otherwise this will affect animdata of original
* strip. */
SEQ_transform_translate_sequence(scene, iseq, ofs);