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

Method hasOutputConnected

Engine/NodeInputs.cpp:540–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540bool
541Node::hasOutputConnected() const
542{
543 ////Only called by the main-thread
544 NodePtr parent = _imp->multiInstanceParent.lock();
545
546 if (parent) {
547 return parent->hasOutputConnected();
548 }
549 if ( isOutputNode() ) {
550 return true;
551 }
552 if ( QThread::currentThread() == qApp->thread() ) {
553 if (_imp->outputs.size() == 1) {
554 NodePtr output = _imp->outputs.front().lock();
555
556 return !( output->isTrackerNodePlugin() && output->isMultiInstance() );
557 } else if (_imp->outputs.size() > 1) {
558 return true;
559 }
560 } else {
561 QMutexLocker l(&_imp->outputsMutex);
562 if (_imp->outputs.size() == 1) {
563 NodePtr output = _imp->outputs.front().lock();
564
565 return !( output->isTrackerNodePlugin() && output->isMultiInstance() );
566 } else if (_imp->outputs.size() > 1) {
567 return true;
568 }
569 }
570
571 return false;
572}
573
574bool
575Node::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