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

Method destroyNode

Engine/Node.cpp:6702–6734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6700} // Node::doDestroyNodeInternalEnd
6701
6702void
6703Node::destroyNode(bool blockingDestroy, bool autoReconnect)
6704{
6705 if (!_imp->effect) {
6706 return;
6707 }
6708
6709 {
6710 QMutexLocker k(&_imp->activatedMutex);
6711 _imp->isBeingDestroyed = true;
6712 }
6713
6714 bool allProcessingQuit = areAllProcessingThreadsQuit();
6715 if (allProcessingQuit || blockingDestroy) {
6716 if (!allProcessingQuit) {
6717 quitAnyProcessing_blocking(false);
6718 }
6719 doDestroyNodeInternalEnd(false);
6720 } else {
6721 NodeGroup* isGrp = dynamic_cast<NodeGroup*>( _imp->effect.get() );
6722 NodesList nodesToWatch;
6723 nodesToWatch.push_back( shared_from_this() );
6724 if (isGrp) {
6725 isGrp->getNodes_recursive(nodesToWatch, false);
6726 }
6727 _imp->renderWatcher.reset( new NodeRenderWatcher(nodesToWatch) );
6728 QObject::connect( _imp->renderWatcher.get(), SIGNAL(taskFinished(int,WatcherCallerArgsPtr)), this, SLOT(onProcessingQuitInDestroyNodeInternal(int,WatcherCallerArgsPtr)) );
6729 boost::shared_ptr<NodeDestroyNodeInternalArgs> args( new NodeDestroyNodeInternalArgs() );
6730 args->autoReconnect = autoReconnect;
6731 _imp->renderWatcher->scheduleBlockingTask(NodeRenderWatcher::eBlockingTaskQuitAnyProcessing, args);
6732
6733 }
6734} // Node::destroyNodeInternal
6735
6736
6737KnobPtr

Callers 10

destroyReadNodeMethod · 0.80
createNodeInternalMethod · 0.80
destroyMethod · 0.80
clearNodesInternalMethod · 0.80
destroyWriteNodeMethod · 0.80
createReadNodeMethod · 0.80
deletePreviewProviderMethod · 0.80

Calls 5

getNodes_recursiveMethod · 0.80
scheduleBlockingTaskMethod · 0.80
getMethod · 0.45
push_backMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected