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

Method setActiveInputAndRefresh

Engine/NodeInputs.cpp:1817–1847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1815}
1816
1817void
1818InspectorNode::setActiveInputAndRefresh(int inputNb,
1819 bool isASide)
1820{
1821 assert( QThread::currentThread() == qApp->thread() );
1822
1823 int maxInputs = getNInputs();
1824 if ( ( inputNb > (maxInputs - 1) ) || (inputNb < 0) || ( !getInput(inputNb) ) ) {
1825 return;
1826 }
1827
1828 bool creatingNodeTree = getApp()->isCreatingNodeTree();
1829 if (!creatingNodeTree) {
1830 ///Recompute the hash
1831 computeHash();
1832 }
1833
1834 Q_EMIT inputChanged(inputNb);
1835 onInputChanged(inputNb, isASide);
1836
1837 runInputChangedCallback(inputNb);
1838
1839
1840 if ( isOutputNode() ) {
1841 OutputEffectInstance* oei = dynamic_cast<OutputEffectInstance*>( getEffectInstance().get() );
1842 assert(oei);
1843 if (oei) {
1844 oei->renderCurrentFrame(true);
1845 }
1846 }
1847}
1848
1849void
1850InspectorNode::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