MCPcopy Create free account
hub / github.com/MrKepzie/Natron / setActiveInputAndRefresh

Method setActiveInputAndRefresh

Engine/Node.cpp:11656–11686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11654}
11655
11656void
11657InspectorNode::setActiveInputAndRefresh(int inputNb,
11658 bool isASide)
11659{
11660 assert( QThread::currentThread() == qApp->thread() );
11661
11662 int maxInputs = getMaxInputCount();
11663 if ( ( inputNb > (maxInputs - 1) ) || (inputNb < 0) || ( !getInput(inputNb) ) ) {
11664 return;
11665 }
11666
11667 bool creatingNodeTree = getApp()->isCreatingNodeTree();
11668 if (!creatingNodeTree) {
11669 ///Recompute the hash
11670 computeHash();
11671 }
11672
11673 Q_EMIT inputChanged(inputNb);
11674 onInputChanged(inputNb, isASide);
11675
11676 runInputChangedCallback(inputNb);
11677
11678
11679 if ( isOutputNode() ) {
11680 OutputEffectInstance* oei = dynamic_cast<OutputEffectInstance*>( getEffectInstance().get() );
11681 assert(oei);
11682 if (oei) {
11683 oei->renderCurrentFrame(true);
11684 }
11685 }
11686}
11687
11688void
11689InspectorNode::refreshActiveInputs(int inputNbChanged,

Callers 3

redoMethod · 0.80
connectToInputMethod · 0.80

Calls 4

getAppFunction · 0.85
isCreatingNodeTreeMethod · 0.80
getMethod · 0.45
renderCurrentFrameMethod · 0.45

Tested by

no test coverage detected