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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-24 09:01:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-24 09:01:22 +0400
commitab8e2cb900277366e55d592da85355e1e8c3a0b5 (patch)
treee3cf7f8bf294573e79f8b5c30ec0400ff8b435c7 /source/blender/editors/space_sequencer
parent017d7b5447039419d784303e8c66087add8b0a99 (diff)
pasting strips in the sequencer didn't check if they overlap existing strips.
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index c13dc118de5..8981a28834e 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2794,7 +2794,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
Editing *ed = BKE_sequencer_editing_get(scene, TRUE); /* create if needed */
ListBase nseqbase = {NULL, NULL};
int ofs;
- Sequence *iseq;
+ Sequence *iseq, *iseq_first;
ED_sequencer_deselect_all(scene);
ofs = scene->r.cfra - seqbase_clipboard_frame;
@@ -2809,15 +2809,22 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- iseq = nseqbase.first;
+ iseq_first = nseqbase.first;
BLI_movelisttolist(ed->seqbasep, &nseqbase);
/* make sure the pasted strips have unique names between them */
- for (; iseq; iseq = iseq->next) {
+ for (iseq = iseq_first; iseq; iseq = iseq->next) {
BKE_sequencer_recursive_apply(iseq, apply_unique_name_cb, scene);
}
+ /* ensure pasted strips don't overlap */
+ for (iseq = iseq_first; iseq; iseq = iseq->next) {
+ if (BKE_sequence_test_overlap(ed->seqbasep, iseq)) {
+ BKE_sequence_base_shuffle(ed->seqbasep, iseq, scene);
+ }
+ }
+
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
return OPERATOR_FINISHED;