| 754 | |
| 755 | |
| 756 | void |
| 757 | Node::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 |
nothing calls this directly
no test coverage detected