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

Function hasNodeInputsInList

Gui/NodeGraphUndoRedo.cpp:949–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

947}
948
949static bool
950hasNodeInputsInList(const std::list<NodeGuiPtr> & nodes,
951 const NodeGuiPtr& node)
952{
953 const std::vector<NodeWPtr>& inputs = node->getNode()->getGuiInputs();
954 bool foundInput = false;
955
956 for (std::list<NodeGuiPtr> ::const_iterator it = nodes.begin(); it != nodes.end(); ++it) {
957 if (*it != node) {
958 NodePtr n = (*it)->getNode();
959
960 for (std::size_t i = 0; i < inputs.size(); ++i) {
961 if (inputs[i].lock() == n) {
962 foundInput = true;
963 break;
964 }
965 }
966 if (foundInput) {
967 break;
968 }
969 }
970 }
971
972 return foundInput;
973}
974
975NATRON_NAMESPACE_ANONYMOUS_EXIT
976

Callers 1

addTreeInputsFunction · 0.70

Calls 5

getNodeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected