- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a node that uses MNodeMessage::addAttributeChangedCallback in postConstructor to recompute some internal values when its attributes change.
Since there is a separate callback registered for each instance of the node, I want to remove it when the node is deleted.
To do so, I also added a callback with MNodeMessage::addNodePreRemovalCallback which deletes all the callbacks registered for this instance of the node.
This works well when the node is deleted manually, but I noticed that the pre-removal callback is not called when I open a new scene so the callback stays around and is causing problems.
What would be the proper place to remove the callback?
I found this unanswered post which might be related.
Solved! Go to Solution.