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

Function addTreeInputs

Gui/NodeGraphUndoRedo.cpp:1246–1277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1244}
1245
1246static void
1247addTreeInputs(const std::list<NodeGuiPtr> & nodes,
1248 const NodeGuiPtr& node,
1249 ExtractedTree& tree,
1250 std::list<NodeGuiPtr> & markedNodes)
1251{
1252 if ( std::find(markedNodes.begin(), markedNodes.end(), node) != markedNodes.end() ) {
1253 return;
1254 }
1255
1256 if ( std::find(nodes.begin(), nodes.end(), node) == nodes.end() ) {
1257 return;
1258 }
1259
1260 if ( !hasNodeInputsInList(nodes, node) ) {
1261 ExtractedInput input;
1262 input.node = node;
1263 input.inputs = node->getNode()->getGuiInputs();
1264 tree.inputs.push_back(input);
1265 markedNodes.push_back(node);
1266 } else {
1267 tree.inbetweenNodes.push_back(node);
1268 markedNodes.push_back(node);
1269 const std::vector<Edge*>& inputs = node->getInputsArrows();
1270 for (std::vector<Edge*>::const_iterator it2 = inputs.begin(); it2 != inputs.end(); ++it2) {
1271 NodeGuiPtr input = (*it2)->getSource();
1272 if (input) {
1273 addTreeInputs(nodes, input, tree, markedNodes);
1274 }
1275 }
1276 }
1277}
1278
1279static void
1280extractTreesFromNodes(const std::list<NodeGuiPtr> & nodes,

Callers 1

extractTreesFromNodesFunction · 0.70

Calls 6

getSourceMethod · 0.80
hasNodeInputsInListFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
getNodeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected