MCPcopy Create free account
hub / github.com/MrKepzie/Natron / hasOutputConnected

Method hasOutputConnected

Engine/Node.cpp:5483–5515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5481}
5482
5483bool
5484Node::hasOutputConnected() const
5485{
5486 ////Only called by the main-thread
5487 NodePtr parent = _imp->multiInstanceParent.lock();
5488
5489 if (parent) {
5490 return parent->hasOutputConnected();
5491 }
5492 if ( isOutputNode() ) {
5493 return true;
5494 }
5495 if ( QThread::currentThread() == qApp->thread() ) {
5496 if (_imp->outputs.size() == 1) {
5497 NodePtr output = _imp->outputs.front().lock();
5498
5499 return !( output->isTrackerNodePlugin() && output->isMultiInstance() );
5500 } else if (_imp->outputs.size() > 1) {
5501 return true;
5502 }
5503 } else {
5504 QMutexLocker l(&_imp->outputsMutex);
5505 if (_imp->outputs.size() == 1) {
5506 NodePtr output = _imp->outputs.front().lock();
5507
5508 return !( output->isTrackerNodePlugin() && output->isMultiInstance() );
5509 } else if (_imp->outputs.size() > 1) {
5510 return true;
5511 }
5512 }
5513
5514 return false;
5515}
5516
5517bool
5518Node::checkIfConnectingInputIsOk(Node* input) const

Callers 4

connectNodesMethod · 0.45
disconnectNodesMethod · 0.45
getConnectedMethod · 0.45
checkForHintsMethod · 0.45

Calls 4

isMultiInstanceMethod · 0.80
lockMethod · 0.45
sizeMethod · 0.45
isTrackerNodePluginMethod · 0.45

Tested by 2

connectNodesMethod · 0.36
disconnectNodesMethod · 0.36