Sequencer: proper cache invalidation when deleting sequences
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 27 Aug 2012 09:01:36 +0000 (09:01 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 27 Aug 2012 09:01:36 +0000 (09:01 +0000)
Solves issue with effects not being recalculated when deleting their input.

source/blender/blenkernel/intern/sequencer.c

index 3bcef50a3b457ec32766efd765c8b2790391952e..8aab622148b8620a9a99b48f99c7388e0c2dcdeb 100644 (file)
@@ -207,8 +207,10 @@ void BKE_sequence_free(Scene *scene, Sequence *seq)
        /* free modifiers */
        BKE_sequence_modifier_clear(seq);
 
-       BKE_sequencer_cache_cleanup_sequence(seq);
-       BKE_sequencer_preprocessed_cache_cleanup_sequence(seq);
+       /* free cached data used by this strip,
+        * also invalidate cache for all dependent sequences
+        */
+       BKE_sequence_invalidate_cache(scene, seq);
 
        MEM_freeN(seq);
 }
@@ -2936,6 +2938,9 @@ static void free_anim_seq(Sequence *seq)
 /* check whether sequence cur depends on seq */
 int BKE_sequence_check_depend(Sequence *seq, Sequence *cur)
 {
+       if (cur->seq1 == seq || cur->seq2 == seq || cur->seq3 == seq)
+               return TRUE;
+
        /* sequences are not intersecting in time, assume no dependency exists between them */
        if (cur->enddisp < seq->startdisp || cur->startdisp > seq->enddisp)
                return FALSE;