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

Method findNodeInternal

Engine/NodeGroup.cpp:756–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754} // autoConnectNodes
755
756NodePtr
757NodeCollectionPrivate::findNodeInternal(const std::string& name,
758 const std::string& recurseName) const
759{
760 QMutexLocker k(&nodesMutex);
761
762 for (NodesList::const_iterator it = nodes.begin(); it != nodes.end(); ++it) {
763 if ( (*it)->isActivated() && (*it)->getScriptName_mt_safe() == name ) {
764 if ( !recurseName.empty() ) {
765 NodeGroup* isGrp = (*it)->isEffectGroup();
766 if (isGrp) {
767 return isGrp->getNodeByFullySpecifiedName(recurseName);
768 } else {
769 NodesList children;
770 (*it)->getChildrenMultiInstance(&children);
771 for (NodesList::iterator it2 = children.begin(); it2 != children.end(); ++it2) {
772 if ( (*it2)->isActivated() && (*it2)->getScriptName_mt_safe() == recurseName ) {
773 return *it2;
774 }
775 }
776 }
777 } else {
778 return *it;
779 }
780 }
781 }
782
783 return NodePtr();
784}
785
786NodePtr
787NodeCollection::getNodeByName(const std::string & name) const

Callers 2

getNodeByNameMethod · 0.80

Calls 7

emptyMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
isActivatedMethod · 0.45
getScriptName_mt_safeMethod · 0.45

Tested by

no test coverage detected