From 24762eadaff40108fa2230322d66dc970c691ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Devernay?= Date: Tue, 24 Jan 2017 14:03:52 +0100 Subject: [PATCH] Node/EffectInstance: fix setting the frame range from readers --- Engine/EffectInstance.cpp | 7 ++----- Engine/Node.cpp | 11 ----------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Engine/EffectInstance.cpp b/Engine/EffectInstance.cpp index e079d03f16..aefa44c109 100644 --- a/Engine/EffectInstance.cpp +++ b/Engine/EffectInstance.cpp @@ -4767,11 +4767,8 @@ EffectInstance::onKnobValueChanged_public(KnobI* k, // for image readers, image writers, and video writers, frame range must be updated before kOfxActionInstanceChanged is called on kOfxImageEffectFileParamName bool mustCallOnFileNameParameterChanged = false; if ( (reason != eValueChangedReasonTimeChanged) && ( isReader() || isWriter() ) && (k->getName() == kOfxImageEffectFileParamName) ) { - if ( isVideoReader() ) { - mustCallOnFileNameParameterChanged = true; - } else { - node->onFileNameParameterChanged(k); - } + node->computeFrameRangeForReader(k); + mustCallOnFileNameParameterChanged = true; } bool ret = false; diff --git a/Engine/Node.cpp b/Engine/Node.cpp index 82f8a19dfe..b4682b7017 100644 --- a/Engine/Node.cpp +++ b/Engine/Node.cpp @@ -900,15 +900,6 @@ Node::load(const CreateNodeArgs& args) assert(_imp->effect); } - - // For readers, set their original frame range when creating them - if ( !serialization && ( _imp->effect->isReader() || _imp->effect->isWriter() ) ) { - KnobPtr filenameKnob = getKnobByName(kOfxImageEffectFileParamName); - if (filenameKnob) { - onFileNameParameterChanged( filenameKnob.get() ); - } - } - _imp->effect->initializeOverlayInteract(); @@ -8058,8 +8049,6 @@ void Node::onFileNameParameterChanged(KnobI* fileKnob) { if ( _imp->effect->isReader() ) { - computeFrameRangeForReader(fileKnob); - ///Refresh the preview automatically if the filename changed incrementKnobsAge(); //< since evaluate() is called after knobChanged we have to do this by hand //computePreviewImage( getApp()->getTimeLine()->currentFrame() );