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

Method doDestroyNodeInternalEnd

Engine/NodeMain.cpp:756–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754
755
756void
757Node::doDestroyNodeInternalEnd(bool autoReconnect)
758{
759 ///Remove the node from the project
760 deactivate(NodesList(),
761 true,
762 autoReconnect,
763 true,
764 false);
765
766
767 {
768 NodeGuiIPtr guiPtr = _imp->guiPointer.lock();
769 if (guiPtr) {
770 guiPtr->destroyGui();
771 }
772 }
773
774 ///If its a group, clear its nodes
775 NodeGroup* isGrp = dynamic_cast<NodeGroup*>( _imp->effect.get() );
776 if (isGrp) {
777 isGrp->clearNodesBlocking();
778 }
779
780
781 ///Quit any rendering
782 OutputEffectInstance* isOutput = dynamic_cast<OutputEffectInstance*>( _imp->effect.get() );
783 if (isOutput) {
784 isOutput->getRenderEngine()->quitEngine(true);
785 }
786
787 ///Remove all images in the cache associated to this node
788 ///This will not remove from the disk cache if the project is closing
789 removeAllImagesFromCache(false);
790
791 AppInstancePtr app = getApp();
792 if (app) {
793 app->recheckInvalidExpressions();
794 }
795
796 ///Remove the Python node
797 deleteNodeVariableToPython( getFullyQualifiedName() );
798
799 ///Disconnect all inputs
800 /*int maxInputs = getNInputs();
801 for (int i = 0; i < maxInputs; ++i) {
802 disconnectInput(i);
803 }*/
804
805 ///Kill the effect
806 if (_imp->effect) {
807 _imp->effect->clearPluginMemoryChunks();
808 }
809 _imp->effect.reset();
810
811 ///If inside the group, remove it from the group
812 ///the use_count() after the call to removeNode should be 2 and should be the shared_ptr held by the caller and the
813 ///thisShared ptr

Callers

nothing calls this directly

Calls 10

getAppFunction · 0.85
destroyGuiMethod · 0.80
clearNodesBlockingMethod · 0.80
quitEngineMethod · 0.80
lockMethod · 0.45
getMethod · 0.45
resetMethod · 0.45
removeNodeMethod · 0.45

Tested by

no test coverage detected