| 947 | } |
| 948 | |
| 949 | static bool |
| 950 | hasNodeInputsInList(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 | |
| 975 | NATRON_NAMESPACE_ANONYMOUS_EXIT |
| 976 | |