diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-16 13:44:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-16 14:02:12 +0400 |
commit | 22eb748162be36f812fde0cca0d111535d6b35d0 (patch) | |
tree | d6e60de55c46b4b9bc318af66b604879cce6513d /source/blender | |
parent | 6a8d0fd8de1f3d4adb5d3b778e3d7b5742998ba3 (diff) |
Sequencer: maintain start/end when exiting a meta
Old behavior of shuffling the meta made it hard to use metas
in a complex edit since you couldn't be sure if exiting a meta would move it in the stack.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 14 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_sequence_types.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 9c43d22ae2f..e19cd3e51df 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1993,6 +1993,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) BLI_addtail(&ed->metastack, ms); ms->parseq = last_seq; ms->oldbasep = ed->seqbasep; + copy_v2_v2_int(ms->disp_range, &ms->parseq->startdisp); ed->seqbasep = &last_seq->seqbase; @@ -2012,12 +2013,25 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) ed->seqbasep = ms->oldbasep; + /* for old files, update from meta */ + if (ms->disp_range[0] == ms->disp_range[1]) { + copy_v2_v2_int(ms->disp_range, &ms->parseq->startdisp); + } + /* recalc all: the meta can have effects connected to it */ for (seq = ed->seqbasep->first; seq; seq = seq->next) BKE_sequence_calc(scene, seq); + /* 2.73+, keeping endpoings is important! + * moving them around means you can't usefully use metas in a complex edit */ +#if 1 + BKE_sequence_tx_set_final_left(ms->parseq, ms->disp_range[0]); + BKE_sequence_tx_set_final_right(ms->parseq, ms->disp_range[1]); + BKE_sequence_calc(scene, ms->parseq); +#else if (BKE_sequence_test_overlap(ed->seqbasep, ms->parseq)) BKE_sequence_base_shuffle(ed->seqbasep, ms->parseq, scene); +#endif BKE_sequencer_active_set(scene, ms->parseq); diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 4795048d346..af33ae80ed9 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -193,6 +193,8 @@ typedef struct MetaStack { struct MetaStack *next, *prev; ListBase *oldbasep; Sequence *parseq; + /* the startdisp/enddisp when entering the meta */ + int disp_range[2]; } MetaStack; typedef struct Editing { |