diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-21 14:42:21 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-21 14:42:21 +0400 |
commit | 08417318cd37b3f20c67b6062e604735a12b1179 (patch) | |
tree | fa96ff114db37739f0632cedafadc1b6aca72a2b /source/blender | |
parent | 9a776daca8fa0aa9bfa22c0c4dd9b6e649acdb84 (diff) |
Sequencer: invalidate current frame cache on sequence transform
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/seqcache.c | 9 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 11 |
3 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 7a5c45e4800..7bd1d178296 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -246,6 +246,7 @@ void BKE_sequencer_cache_cleanup_sequence(struct Sequence *seq); struct ImBuf *BKE_sequencer_preprocessed_cache_get(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type); void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, struct Sequence *seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf *ibuf); +void BKE_sequencer_preprocessed_cache_cleanup(void); void BKE_sequencer_preprocessed_cache_cleanup_sequence(struct Sequence *seq); /* ********************************************************************** diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index 57db188472c..e3f0226c863 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -68,7 +68,6 @@ static struct MovieCache *moviecache = NULL; static struct SeqPreprocessCache *preprocess_cache = NULL; static void preprocessed_cache_destruct(void); -static void preprocessed_cache_clean(void); static int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b) { @@ -193,7 +192,7 @@ void BKE_sequencer_cache_cleanup(void) moviecache = IMB_moviecache_create("seqcache", sizeof(SeqCacheKey), seqcache_hashhash, seqcache_hashcmp); } - preprocessed_cache_clean(); + BKE_sequencer_preprocessed_cache_cleanup(); } static int seqcache_key_check_seq(void *userkey, void *userdata) @@ -246,7 +245,7 @@ void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, s IMB_moviecache_put(moviecache, &key, i); } -static void preprocessed_cache_clean(void) +void BKE_sequencer_preprocessed_cache_cleanup(void) { SeqPreprocessCacheElem *elem; @@ -266,7 +265,7 @@ static void preprocessed_cache_destruct(void) if (!preprocess_cache) return; - preprocessed_cache_clean(); + BKE_sequencer_preprocessed_cache_cleanup(); MEM_freeN(preprocess_cache); preprocess_cache = NULL; @@ -308,7 +307,7 @@ void BKE_sequencer_preprocessed_cache_put(SeqRenderData context, Sequence *seq, } else { if (preprocess_cache->cfra != cfra) - preprocessed_cache_clean(); + BKE_sequencer_preprocessed_cache_cleanup(); } elem = MEM_callocN(sizeof(SeqPreprocessCacheElem), "sequencer preprocessed cache element"); diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8e73fb8b8cb..bcebca52ce8 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -71,6 +71,7 @@ #include "BKE_mesh.h" #include "BKE_nla.h" #include "BKE_context.h" +#include "BKE_sequencer.h" #include "BKE_tessmesh.h" #include "BKE_tracking.h" #include "BKE_mask.h" @@ -890,6 +891,14 @@ static void recalcData_view3d(TransInfo *t) } } +/* helper for recalcData() - for sequencer transforms */ +static void recalcData_sequencer(TransInfo *t) +{ + BKE_sequencer_preprocessed_cache_cleanup(); + + flushTransSeq(t); +} + /* called for updating while transform acts, once per redraw */ void recalcData(TransInfo *t) { @@ -897,7 +906,7 @@ void recalcData(TransInfo *t) flushTransNodes(t); } else if (t->spacetype == SPACE_SEQ) { - flushTransSeq(t); + recalcData_sequencer(t); } else if (t->spacetype == SPACE_ACTION) { recalcData_actedit(t); |