diff options
4 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 0a2a2c7131f..11f2d0e0816 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -314,6 +314,7 @@ void BKE_sequence_tx_set_final_left(struct Sequence *seq, int val); void BKE_sequence_tx_set_final_right(struct Sequence *seq, int val); void BKE_sequence_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag); bool BKE_sequence_tx_test(struct Sequence *seq); +bool BKE_sequence_tx_fullupdate_test(struct Sequence *seq); bool BKE_sequence_single_check(struct Sequence *seq); void BKE_sequence_single_fix(struct Sequence *seq); bool BKE_sequence_test_overlap(struct ListBase *seqbasep, struct Sequence *test); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 633f0232516..a87935ae23b 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -4252,6 +4252,17 @@ bool BKE_sequence_tx_test(Sequence *seq) return !(seq->type & SEQ_TYPE_EFFECT) || (BKE_sequence_effect_get_num_inputs(seq->type) == 0); } +/** + * Return \a true if given \a seq needs a complete cleanup of its cache when it is transformed. + * + * Some (effect) strip types need a complete recache of themselves when they are transformed, because + * they do not 'contain' anything and do not have any explicit relations to other strips. + */ +bool BKE_sequence_tx_fullupdate_test(Sequence *seq) +{ + return BKE_sequence_tx_test(seq) && ELEM(seq->type, SEQ_TYPE_ADJUSTMENT, SEQ_TYPE_MULTICAM); +} + static bool seq_overlap(Sequence *seq1, Sequence *seq2) { return (seq1 != seq2 && seq1->machine == seq2->machine && diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index e9a4bc81e14..09560bfdd61 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1206,6 +1206,7 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) BKE_sequence_tx_set_final_right(seq, snap_frame); } BKE_sequence_tx_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); + BKE_sequence_single_fix(seq); } BKE_sequence_calc(scene, seq); } @@ -2516,6 +2517,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) #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_single_fix(seq); BKE_sequence_calc(scene, ms->parseq); #else if (BKE_sequence_test_overlap(ed->seqbasep, ms->parseq)) diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index baafaece2e5..8d64b5f7577 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -951,7 +951,13 @@ static void recalcData_sequencer(TransInfo *t) Sequence *seq = tdsq->seq; if (seq != seq_prev) { - BKE_sequence_invalidate_dependent(t->scene, seq); + if (BKE_sequence_tx_fullupdate_test(seq)) { + /* A few effect strip types need a complete recache on transform. */ + BKE_sequence_invalidate_cache(t->scene, seq); + } + else { + BKE_sequence_invalidate_dependent(t->scene, seq); + } } seq_prev = seq; |