Hello,
I'm a bit confused here.
I have set up 2 callbacks in a plug-in. This plug-in also registers a bunch of locators.
One is MSceneMessage::kMayaExiting, and the other one is a MDGMessage::addNodeRemovedCallback
I have set up asserts in both callbacks, as well as one in the uninitializePlugin function. I use them to halt Maya to see the order in which these three functions are called.
When I have a scene containing locators from the plug-in, and close Maya by pressing the top-right "X" widget which is on the right of the minimize/maximize widget, then I only get a pop up from the kMayaExiting callback.
Shouldn't I first receive a couple of assertions in NodeRemoved (one for each node), then one for uninitializePlugin, and finally one for kMayaExiting.
My problem is that I need to unload the plug-in cleanly because else I do get a crash caused by some threading issues.
I know that I can use kMayaExiting in order to notify the plug-in that it should perform cleanup tasks and shut down any running thread immediately before kMayaExiting returns, but I also need to unload the entire scene cleanly (so that NodeRemoved gets called for each node); can this be done in the kMayaExiting callback?
Thanks in advance,
Daniel