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

Method disconnectOutput

Engine/NodeInputs.cpp:1250–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1248} // Node::disconnectInput
1249
1250int
1251Node::disconnectOutput(bool useGuiValues,
1252 const Node* output)
1253{
1254 assert(output);
1255 int ret = -1;
1256 {
1257 QMutexLocker l(&_imp->outputsMutex);
1258 if (!useGuiValues) {
1259 int ret = 0;
1260 for (NodesWList::iterator it = _imp->outputs.begin(); it != _imp->outputs.end(); ++it, ++ret) {
1261 if (it->lock().get() == output) {
1262 _imp->outputs.erase(it);
1263 break;
1264 }
1265 }
1266 }
1267 int ret = 0;
1268 for (NodesWList::iterator it = _imp->guiOutputs.begin(); it != _imp->guiOutputs.end(); ++it, ++ret) {
1269 if (it->lock().get() == output) {
1270 _imp->guiOutputs.erase(it);
1271 break;
1272 }
1273 }
1274 }
1275
1276 //Will just refresh the gui
1277 Q_EMIT outputsChanged();
1278
1279 return ret;
1280}
1281
1282int
1283Node::inputIndex(const NodePtr& n) const

Callers 4

replaceInputInternalMethod · 0.80
disconnectInputMethod · 0.80
deactivateMethod · 0.80

Calls 5

beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
lockMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected