Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-08 20:46:40 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-08 20:46:40 +0400
commita0a67d298416946fff9ac824c9d9d7907a903fb5 (patch)
treee123e6950d3ca2bd66c8c4f14982939180e19e4c /source/blender/blenkernel/intern/sequencer.c
parent2a78c2d30405d17d804125e903e3fbec0f10d582 (diff)
Sequencer: initial support of refreshing only changed sequences
Before this the the whole sequencer cache would be invalidated when hanging sequence settings. This was completely annoying because changing color balance settings would re-load image file for which color balance is happening on every change, In fact it's still an issue if color balance is changing for image strip itself, but if this strip has got effect and color balance is changing for it file wouldn't be reloaded.
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index d5a766ef97e..1488c1c2188 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -2711,6 +2711,33 @@ static void free_anim_seq(Sequence *seq)
}
}
+void BKE_sequence_invalidate_cache(Scene *scene, Sequence *seq)
+{
+ Editing *ed = scene->ed;
+ Sequence *cur;
+ int left = seq->start, right = seq->start + seq->len;
+
+ /* invalidate cache for current sequence */
+ BKE_sequencer_cache_cleanup_sequence(seq);
+
+ /* invalidate cache for all dependent sequences */
+ SEQ_BEGIN (ed, cur)
+ {
+ int cur_left = cur->start, cur_right = cur->start + cur->len;
+
+ /* sequence is outside of changed one, shouldn't be invalidated */
+ if (cur_right < left || cur_left > right)
+ continue;
+
+ /* sequence is below changed one, not dependent on it */
+ if (cur->machine < seq->machine)
+ continue;
+
+ BKE_sequencer_cache_cleanup_sequence(cur);
+ }
+ SEQ_END
+}
+
void BKE_sequencer_free_imbuf(Scene *scene, ListBase *seqbase, int check_mem_usage, int keep_file_handles)
{
Sequence *seq;