Sequencer: don't cache frames during proxy rebuild job
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Jan 2014 14:03:48 +0000 (20:03 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Jan 2014 14:04:47 +0000 (20:04 +0600)
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/intern/seqcache.c
source/blender/blenkernel/intern/sequencer.c

index 0ca1d904d6fa6549089dbf071ac4baf960e8e192..c723797ac2b370a9d9b28031781b7008d5c815ce 100644 (file)
@@ -98,6 +98,7 @@ typedef struct SeqRenderData {
        int preview_render_size;
        int motion_blur_samples;
        float motion_blur_shutter;
+       bool skip_cache;
 } SeqRenderData;
 
 SeqRenderData BKE_sequencer_new_render_data(struct EvaluationContext *eval_ctx, struct Main *bmain,
index 919d38be9e0911d12b40007c8da207b36f160900..38d3d46ee6b643bb216cdd1a3a08a88c5b05b44e 100644 (file)
@@ -229,7 +229,7 @@ void BKE_sequencer_cache_put(SeqRenderData context, Sequence *seq, float cfra, s
 {
        SeqCacheKey key;
 
-       if (!i) {
+       if (i == NULL || context.skip_cache) {
                return;
        }
 
index d1d88002c96ad8201f17b5810491c7e81d1cfce2..337d9756296a511e5af667161dbe21043539df49 100644 (file)
@@ -513,6 +513,7 @@ SeqRenderData BKE_sequencer_new_render_data(EvaluationContext *eval_ctx,
        rval.motion_blur_samples = 0;
        rval.motion_blur_shutter = 0;
        rval.eval_ctx = eval_ctx;
+       rval.skip_cache = false;
 
        return rval;
 }
@@ -1535,6 +1536,7 @@ void BKE_sequencer_proxy_rebuild(SeqIndexBuildContext *context, short *stop, sho
        render_context = BKE_sequencer_new_render_data(bmain->eval_ctx, bmain, context->scene,
                                            (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f,
                                            (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f, 100);
+       render_context.skip_cache = true;
 
        for (cfra = seq->startdisp + seq->startstill;  cfra < seq->enddisp - seq->endstill; cfra++) {
                if (context->size_flags & IMB_PROXY_25) {