From 9f3edfecfc20766df107a0c19d883bbd895ffeec Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Fri, 17 Dec 2010 08:08:35 +0000 Subject: [PATCH] This fixes [#25011] Opacity IPO not refreshing with still images (should be better named: animation of any prefiltering parameters using still images didn't work out as expected) And this issue by private mail by Ton: "I tried to debug a memory-free error; very simple case: - add image strip - click on strip at 2 places - quit blender" --- source/blender/blenkernel/intern/sequencer.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index fac773b2c6f..74a38d785e4 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1683,8 +1683,7 @@ static ImBuf * copy_from_ibuf_still(SeqRenderData context, Sequence * seq, ibuf = seq_stripelem_cache_get( context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL); - } - if (nr == seq->len - 1) { + } else if (nr == seq->len - 1) { ibuf = seq_stripelem_cache_get( context, seq, seq->start, SEQ_STRIPELEM_IBUF_ENDSTILL); @@ -1705,7 +1704,8 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, seq_stripelem_cache_put( context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); - } + } + if (nr == seq->len - 1) { seq_stripelem_cache_put( context, seq, seq->start, @@ -1969,13 +1969,14 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr ibuf = seq_stripelem_cache_get(context, seq, cfra, SEQ_STRIPELEM_IBUF); - if (ibuf == NULL) - ibuf = copy_from_ibuf_still(context, seq, nr); - - /* currently, we cache preprocessed images */ + /* currently, we cache preprocessed images in SEQ_STRIPELEM_IBUF, + but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ if (ibuf) use_preprocess = FALSE; + if (ibuf == NULL) + ibuf = copy_from_ibuf_still(context, seq, nr); + if (ibuf == NULL) ibuf = seq_proxy_fetch(context, seq, cfra);