diff --git a/source/blender/editors/space_sequencer/sequencer_preview_draw.cc b/source/blender/editors/space_sequencer/sequencer_preview_draw.cc index 5a1aa6287e8..2809ba5e5bd 100644 --- a/source/blender/editors/space_sequencer/sequencer_preview_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_preview_draw.cc @@ -775,7 +775,8 @@ static void sequencer_draw_scopes(const SpaceSeq &space_sequencer, ARegion ®i static bool sequencer_calc_scopes(const SpaceSeq &space_sequencer, const ColorManagedViewSettings &view_settings, const ColorManagedDisplaySettings &display_settings, - const ImBuf &ibuf) + const ImBuf &ibuf, + const int timeline_frame) { if (space_sequencer.mainb == SEQ_DRAW_IMG_IMBUF && space_sequencer.zebra == 0) { @@ -783,7 +784,7 @@ static bool sequencer_calc_scopes(const SpaceSeq &space_sequencer, } SeqScopes *scopes = &space_sequencer.runtime->scopes; - if (scopes->reference_ibuf != &ibuf) { + if (scopes->reference_ibuf != &ibuf || scopes->timeline_frame != timeline_frame) { scopes->cleanup(); } @@ -1494,7 +1495,8 @@ static void sequencer_preview_draw_overlays(const bContext *C, bool has_scopes = false; if (overlay_ibuf && - sequencer_calc_scopes(space_sequencer, view_settings, display_settings, *overlay_ibuf)) + sequencer_calc_scopes( + space_sequencer, view_settings, display_settings, *overlay_ibuf, timeline_frame)) { /* Draw scope. */ sequencer_draw_scopes(space_sequencer, region); diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.cc b/source/blender/editors/space_sequencer/sequencer_scopes.cc index 344cf6ac7c5..11cd0c60de8 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.cc +++ b/source/blender/editors/space_sequencer/sequencer_scopes.cc @@ -50,6 +50,8 @@ void SeqScopes::cleanup() vector_ibuf = nullptr; } histogram.data.reinitialize(0); + reference_ibuf = nullptr; + timeline_frame = 0; } static blender::float2 rgb_to_uv_normalized(const float rgb[3]) diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.hh b/source/blender/editors/space_sequencer/sequencer_scopes.hh index 0c2752d3af8..07b58f40d2d 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.hh +++ b/source/blender/editors/space_sequencer/sequencer_scopes.hh @@ -43,6 +43,7 @@ struct SeqScopes : public NonCopyable { static constexpr float VECSCOPE_V_SCALE = 0.5f / 0.615f; const ImBuf *reference_ibuf = nullptr; + int timeline_frame = 0; ImBuf *zebra_ibuf = nullptr; ImBuf *waveform_ibuf = nullptr; ImBuf *sep_waveform_ibuf = nullptr;