| 5481 | } |
| 5482 | |
| 5483 | bool |
| 5484 | Node::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 | |
| 5517 | bool |
| 5518 | Node::checkIfConnectingInputIsOk(Node* input) const |