when making a metastrip use active strip for the channel when available.

This commit is contained in:
Campbell Barton
2010-07-05 10:12:24 +00:00
parent 58778d41e2
commit 0f58a4c798

View File

@@ -1892,8 +1892,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE); Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq, *seqm, *next; Sequence *seq, *seqm, *next, *last_seq = seq_active_get(scene);
int channel_max= 1; int channel_max= 1;
if(seqbase_isolated_sel_check(ed->seqbasep)==FALSE) { if(seqbase_isolated_sel_check(ed->seqbasep)==FALSE) {
@@ -1918,7 +1917,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
} }
seq= next; seq= next;
} }
seqm->machine= channel_max; seqm->machine= last_seq ? last_seq->machine : channel_max;
calc_sequence(scene, seqm); calc_sequence(scene, seqm);
seqm->strip= MEM_callocN(sizeof(Strip), "metastrip"); seqm->strip= MEM_callocN(sizeof(Strip), "metastrip");