Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_convert_sequencer.c
| Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | if (seq->depth == 0) { | ||||
| else { | else { | ||||
| *r_recursive = false; | *r_recursive = false; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* Nested, different rules apply */ | /* Nested, different rules apply */ | ||||
| #ifdef SEQ_TX_NESTED_METAS | |||||
campbellbarton: Tsk (this wasn't working as intended), define happened below (not an issue with this patch… | |||||
Done Inline ActionsI haven't even noticed this, Original commit was OK. I just read commit and said that I won't need this really so I have removed the code. ISS: I haven't even noticed this, Original commit was OK. I just read commit and said that I won't… | |||||
| *r_flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); | *r_flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); | ||||
| *r_count = 1; /* ignore the selection for nested */ | *r_count = 1; /* ignore the selection for nested */ | ||||
| *r_recursive = (seq->type == SEQ_TYPE_META); | *r_recursive = (seq->type == SEQ_TYPE_META); | ||||
| #else | |||||
| if (seq->type == SEQ_TYPE_META) { | |||||
| /* Meta's can only directly be moved between channels since they | |||||
| * don't have their start and length set directly (children affect that) | |||||
| * since this Meta is nested we don't need any of its data in fact. | |||||
| * SEQ_time_update_sequence() will update its settings when run on the top-level meta. */ | |||||
| *r_flag = 0; | |||||
| *r_count = 0; | |||||
| *r_recursive = true; | |||||
| } | |||||
| else { | |||||
| *r_flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); | |||||
| *r_count = 1; /* ignore the selection for nested */ | |||||
| *r_recursive = false; | |||||
| } | |||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static int SeqTransCount(TransInfo *t, Sequence *parent, ListBase *seqbase, int depth) | static int SeqTransCount(TransInfo *t, Sequence *parent, ListBase *seqbase, int depth) | ||||
| { | { | ||||
| Sequence *seq; | Sequence *seq; | ||||
| int tot = 0, recursive, count, flag; | int tot = 0, recursive, count, flag; | ||||
| ▲ Show 20 Lines • Show All 419 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name UVs Transform Flush | /** \name UVs Transform Flush | ||||
| * | * | ||||
| * \{ */ | * \{ */ | ||||
| /* commented _only_ because the meta may have animation data which | /* commented _only_ because the meta may have animation data which | ||||
| * needs moving too T28158. */ | * needs moving too T28158. */ | ||||
| #define SEQ_TX_NESTED_METAS | |||||
| BLI_INLINE void trans_update_seq(Scene *sce, Sequence *seq, int old_start, int sel_flag) | BLI_INLINE void trans_update_seq(Scene *sce, Sequence *seq, int old_start, int sel_flag) | ||||
| { | { | ||||
| if (seq->depth == 0) { | if (seq->depth == 0) { | ||||
| /* Calculate this strip and all nested strips. | /* Calculate this strip and all nested strips. | ||||
| * Children are ALWAYS transformed first so we don't need to do this in another loop. | * Children are ALWAYS transformed first so we don't need to do this in another loop. | ||||
| */ | */ | ||||
| SEQ_time_update_sequence(sce, seq); | SEQ_time_update_sequence(sce, seq); | ||||
| } | } | ||||
| Show All 30 Lines | for (a = 0, td = tc->data, td2d = tc->data_2d; a < tc->data_len; a++, td++, td2d++) { | ||||
| int old_start; | int old_start; | ||||
| tdsq = (TransDataSeq *)td->extra; | tdsq = (TransDataSeq *)td->extra; | ||||
| seq = tdsq->seq; | seq = tdsq->seq; | ||||
| old_start = seq->start; | old_start = seq->start; | ||||
| new_frame = round_fl_to_int(td2d->loc[0]); | new_frame = round_fl_to_int(td2d->loc[0]); | ||||
| switch (tdsq->sel_flag) { | switch (tdsq->sel_flag) { | ||||
| case SELECT: | case SELECT: | ||||
| #ifdef SEQ_TX_NESTED_METAS | |||||
| if ((seq->depth != 0 || SEQ_transform_sequence_can_be_translated(seq))) { | if ((seq->depth != 0 || SEQ_transform_sequence_can_be_translated(seq))) { | ||||
| /* for meta's, their children move */ | /* for meta's, their children move */ | ||||
| seq->start = new_frame - tdsq->start_offset; | seq->start = new_frame - tdsq->start_offset; | ||||
| } | } | ||||
| #else | |||||
| if (seq->type != SEQ_TYPE_META && (seq->depth != 0 || seq_tx_test(seq))) { | |||||
| /* for meta's, their children move */ | |||||
| seq->start = new_frame - tdsq->start_offset; | |||||
| } | |||||
| #endif | |||||
| if (seq->depth == 0) { | if (seq->depth == 0) { | ||||
| seq->machine = round_fl_to_int(td2d->loc[1]); | seq->machine = round_fl_to_int(td2d->loc[1]); | ||||
| CLAMP(seq->machine, 1, MAXSEQ); | CLAMP(seq->machine, 1, MAXSEQ); | ||||
| } | } | ||||
| break; | break; | ||||
| case SEQ_LEFTSEL: /* no vertical transform */ | case SEQ_LEFTSEL: /* no vertical transform */ | ||||
| SEQ_transform_set_left_handle_frame(seq, new_frame); | SEQ_transform_set_left_handle_frame(seq, new_frame); | ||||
| SEQ_transform_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); | SEQ_transform_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); | ||||
| ▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines | |||||
Tsk (this wasn't working as intended), define happened below (not an issue with this patch though).