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>2009-12-13 06:20:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-13 06:20:29 +0300
commita224803fb7c3b3a69f9ac63aaac593532432202a (patch)
treef768c1333a15704389f996616bc7df180d04b82b /source/blender/editors/space_sequencer/sequencer_edit.c
parentb6bf852670ce802a61feabde9e16b7e51c97cd88 (diff)
Sequencer unique names for duplicates & metas and name new strips when the operator doesnt set them.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index c8f47e1a3e8..660cb0d8cc6 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -925,7 +925,9 @@ static Sequence *dupli_seq(struct Scene *scene, Sequence *seq)
"handled in duplicate!\nExpect a crash"
" now...\n");
}
-
+
+ seqUniqueName(scene->ed->seqbasep, seqn);
+
return seqn;
}
@@ -1963,6 +1965,8 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
shuffle_seq(ed->seqbasep, seq_new);
}
+ seqUniqueName(scene->ed->seqbasep, seq_new);
+
cfra++;
start_ofs += step;
}
@@ -2085,7 +2089,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
Sequence *seq, *seqm, *next;
- int tot;
+ int tot, channel_max= 1;
if(ed==NULL)
return OPERATOR_CANCELLED;
@@ -2106,6 +2110,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
seq= ed->seqbasep->first;
while(seq) {
if(seq->flag & SELECT) {
+ channel_max= MAX2(seq->machine, channel_max);
if(seq->type & SEQ_EFFECT) {
if(seq->seq1 &&
(seq->seq1->flag & SELECT)==0) tot= 0;
@@ -2134,7 +2139,8 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
/* remove all selected from main list, and put in meta */
- seqm= alloc_sequence(ed->seqbasep, 1, 1);
+ seqm= alloc_sequence(ed->seqbasep, 1, channel_max);
+ strcpy(seqm->name+2, "MetaStrip");
seqm->type= SEQ_META;
seqm->flag= SELECT;
@@ -2158,6 +2164,9 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
if( seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm);
seq_update_muting(ed);
+
+ seqUniqueName(scene->ed->seqbasep, seqm);
+
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
return OPERATOR_FINISHED;