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

Method destroyNode

Engine/NodeMain.cpp:861–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859
860
861void
862Node::destroyNode(bool blockingDestroy, bool autoReconnect)
863{
864 if (!_imp->effect) {
865 return;
866 }
867
868 {
869 QMutexLocker k(&_imp->activatedMutex);
870 _imp->isBeingDestroyed = true;
871 }
872
873 bool allProcessingQuit = areAllProcessingThreadsQuit();
874 if (allProcessingQuit || blockingDestroy) {
875 if (!allProcessingQuit) {
876 quitAnyProcessing_blocking(false);
877 }
878 doDestroyNodeInternalEnd(false);
879 } else {
880 NodeGroup* isGrp = dynamic_cast<NodeGroup*>( _imp->effect.get() );
881 NodesList nodesToWatch;
882 nodesToWatch.push_back( shared_from_this() );
883 if (isGrp) {
884 isGrp->getNodes_recursive(nodesToWatch, false);
885 }
886 _imp->renderWatcher = std::make_shared<NodeRenderWatcher>(nodesToWatch);
887 QObject::connect( _imp->renderWatcher.get(), SIGNAL(taskFinished(int,GenericWatcherCallerArgsPtr)), this, SLOT(onProcessingQuitInDestroyNodeInternal(int,GenericWatcherCallerArgsPtr)) );
888 NodeDestroyNodeInternalArgsPtr args = std::make_shared<NodeDestroyNodeInternalArgs>();
889 args->autoReconnect = autoReconnect;
890 _imp->renderWatcher->scheduleBlockingTask(NodeRenderWatcher::eBlockingTaskQuitAnyProcessing, args);
891
892 }
893} // Node::destroyNodeInternal
894
895
896bool

Callers 10

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

Calls 4

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

Tested by

no test coverage detected