Skip to content

Commit

Permalink
Node/EffectInstance: fix setting the frame range from readers
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jan 24, 2017
1 parent 7cc47d0 commit 24762ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
7 changes: 2 additions & 5 deletions Engine/EffectInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 0 additions & 11 deletions Engine/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();


Expand Down Expand Up @@ -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() );
Expand Down

0 comments on commit 24762ea

Please sign in to comment.