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

Method notifyNodeActivated

Engine/NodeGroup.cpp:1390–1424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1388} // NodeGroup::notifyNodeDeactivated
1389
1390void
1391NodeGroup::notifyNodeActivated(const NodePtr& node)
1392{
1393 if ( getIsActivatingGroup() ) {
1394 return;
1395 }
1396
1397 NodePtr thisNode = getNode();
1398
1399 {
1400 QMutexLocker k(&_imp->nodesLock);
1401 GroupInput* isInput = dynamic_cast<GroupInput*>( node->getEffectInstance().get() );
1402 if (isInput) {
1403 _imp->inputs.push_back(node);
1404 _imp->guiInputs.push_back(node);
1405 thisNode->initializeInputs();
1406 }
1407 GroupOutput* isOutput = dynamic_cast<GroupOutput*>( node->getEffectInstance().get() );
1408 if (isOutput) {
1409 _imp->outputs.push_back(node);
1410 _imp->guiOutputs.push_back(node);
1411 }
1412 }
1413 ///Notify outputs of the group nodes that their inputs may have changed
1414 const NodesWList& outputs = thisNode->getOutputs();
1415 for (NodesWList::const_iterator it = outputs.begin(); it != outputs.end(); ++it) {
1416 NodePtr output = it->lock();
1417 if (!output) {
1418 continue;
1419 }
1420 int idx = output->getInputIndex( thisNode.get() );
1421 assert(idx != -1);
1422 output->onInputChanged(idx);
1423 }
1424}
1425
1426void
1427NodeGroup::notifyInputOptionalStateChanged(const NodePtr& /*node*/)

Callers 2

activateMethod · 0.45
loadMethod · 0.45

Calls 10

getEffectInstanceMethod · 0.80
getInputIndexMethod · 0.80
getNodeFunction · 0.70
getMethod · 0.45
push_backMethod · 0.45
initializeInputsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
lockMethod · 0.45
onInputChangedMethod · 0.45

Tested by

no test coverage detected