Skip to content

Commit

Permalink
Viewer should not be connected to a Writer that can only render seque…
Browse files Browse the repository at this point in the history
…ntially

fixes NatronGitHub#507
  • Loading branch information
devernay committed Apr 10, 2021
1 parent 7f86ff4 commit 342aa71
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Engine/WriteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,22 @@ WriteNode::knobChanged(KnobI* k,
return ret;
} // WriteNode::knobChanged


SequentialPreferenceEnum
WriteNode::getSequentialPreference() const
{
NodePtr writer = _imp->embeddedPlugin.lock();

if (writer) {
EffectInstancePtr effect = writer->getEffectInstance();
if (effect) {
return effect->getSequentialPreference();
}
}
return EffectInstance::getSequentialPreference();
}


bool
WriteNode::isViewAware() const
{
Expand Down
1 change: 1 addition & 0 deletions Engine/WriteNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON
void renderSequenceStarted();
void renderSequenceEnd();

virtual SequentialPreferenceEnum getSequentialPreference() const OVERRIDE FINAL WARN_UNUSED_RETURN;
virtual bool isViewAware() const OVERRIDE FINAL WARN_UNUSED_RETURN;

public Q_SLOTS:
Expand Down

0 comments on commit 342aa71

Please sign in to comment.