diff --git a/app/node/color/ociolut/ociolut.cpp b/app/node/color/ociolut/ociolut.cpp index ed025aa7c..17c4b24b1 100644 --- a/app/node/color/ociolut/ociolut.cpp +++ b/app/node/color/ociolut/ociolut.cpp @@ -24,6 +24,8 @@ #include #include "node/color/colormanager/colormanager.h" +#include "render/previewautocacher.h" +#include "render/rendermanager.h" namespace olive { @@ -179,6 +181,15 @@ void OCIOLutNode::GenerateProcessor() last_direction_ = direction; last_processor_ = processor; set_processor(processor); + + // The processor has changed. Cancel any background caching first so the + // preview autocacher doesn't try to re-cache the entire timeline, then + // invalidate the cache so the current frame re-renders with the new LUT. + PreviewAutoCacher *cacher = RenderManager::instance()->GetCacher(); + if (cacher) { + cacher->CancelVideoTasks(true); + } + InvalidateAll(kTextureInput); } } // namespace olive