diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 4 |
4 files changed, 30 insertions, 9 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 5a201dbc962..69e10d1426b 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -297,6 +297,7 @@ int BKE_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char int BKE_sequence_check_depend(struct Sequence *seq, struct Sequence *cur); void BKE_sequence_invalidate_cache(struct Scene *scene, struct Sequence *seq); +void BKE_sequence_invalidate_deendent(struct Scene *scene, struct Sequence *seq); void BKE_sequence_invalidate_cache_for_modifier(struct Scene *scene, struct Sequence *seq); void BKE_sequencer_update_sound_bounds_all(struct Scene *scene); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 7d0c080a918..b191b25be62 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2948,13 +2948,18 @@ int BKE_sequence_check_depend(Sequence *seq, Sequence *cur) return TRUE; } -static void sequence_invalidate_cache(Scene *scene, Sequence *seq, int invalidate_preprocess) +static void sequence_invalidate_cache(Scene *scene, Sequence *seq, int invalidate_self, int invalidate_preprocess) { Editing *ed = scene->ed; Sequence *cur; /* invalidate cache for current sequence */ - BKE_sequencer_cache_cleanup_sequence(seq); + if (invalidate_self) + BKE_sequencer_cache_cleanup_sequence(seq); + + /* if invalidation is invoked from sequence free routine, effectdata would be NULL here */ + if (seq->effectdata && seq->type == SEQ_TYPE_SPEED) + BKE_sequence_effect_speed_rebuild_map(scene, seq, TRUE); if (invalidate_preprocess) BKE_sequencer_preprocessed_cache_cleanup_sequence(seq); @@ -2975,12 +2980,17 @@ static void sequence_invalidate_cache(Scene *scene, Sequence *seq, int invalidat void BKE_sequence_invalidate_cache(Scene *scene, Sequence *seq) { - sequence_invalidate_cache(scene, seq, TRUE); + sequence_invalidate_cache(scene, seq, TRUE, TRUE); +} + +void BKE_sequence_invalidate_deendent(Scene *scene, Sequence *seq) +{ + sequence_invalidate_cache(scene, seq, FALSE, TRUE); } void BKE_sequence_invalidate_cache_for_modifier(Scene *scene, Sequence *seq) { - sequence_invalidate_cache(scene, seq, FALSE); + sequence_invalidate_cache(scene, seq, TRUE, FALSE); } void BKE_sequencer_free_imbuf(Scene *scene, ListBase *seqbase, int check_mem_usage, int keep_file_handles) diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 06b508cc488..828376654be 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1141,12 +1141,16 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if ((seq->flag & SEQ_LOCK) == 0) { if (selected) { /* mute unselected */ - if (seq->flag & SELECT) + if (seq->flag & SELECT) { seq->flag |= SEQ_MUTE; + BKE_sequence_invalidate_deendent(scene, seq); + } } else { - if ((seq->flag & SELECT) == 0) + if ((seq->flag & SELECT) == 0) { seq->flag |= SEQ_MUTE; + BKE_sequence_invalidate_deendent(scene, seq); + } } } } @@ -1188,12 +1192,16 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) for (seq = ed->seqbasep->first; seq; seq = seq->next) { if ((seq->flag & SEQ_LOCK) == 0) { if (selected) { /* unmute unselected */ - if (seq->flag & SELECT) + if (seq->flag & SELECT) { seq->flag &= ~SEQ_MUTE; + BKE_sequence_invalidate_deendent(scene, seq); + } } else { - if ((seq->flag & SELECT) == 0) + if ((seq->flag & SELECT) == 0) { seq->flag &= ~SEQ_MUTE; + BKE_sequence_invalidate_deendent(scene, seq); + } } } } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 5dd6b08b99c..325dbe639b4 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -900,7 +900,9 @@ static void recalcData_sequencer(TransInfo *t) SEQ_BEGIN(ed, seq) { - BKE_sequencer_cache_cleanup_sequence(seq); + if (seq->flag & SELECT) { + BKE_sequence_invalidate_deendent(t->scene, seq); + } } SEQ_END |