| 538 | } |
| 539 | |
| 540 | bool |
| 541 | Node::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 | |
| 574 | bool |
| 575 | Node::checkIfConnectingInputIsOk(Node* input) const |