Hey,

More an API question than a Python-specific question but this is the most
technical list I'm in :)
Also posted on CgTalk

- - - - -

I'm having a custom node which has some treatments when it's created and
when it's deleted.
The creation treatment has been added to the postConstructor method
(inherited from MpxNode) and the deletion treatment throught the
MNodeMessage::addNodeAboutToDeleteCallback mechanism

So far so good.

The thing is, I just discovered that, if the node is deleted, the deletion
treatment is called but if the undo is used the node gets readded to the
scene but the postConstructor code is not called anymore (and thus the
creation treatment is not called neither). From what I read, when the node
is deleted, it's added to the undo queue and hidden from the DG and if an
undo is done, it's readded in the scene from the undo (and thus not
recreated)...

This is where i'm stuck : is there any way to know the status of the node
(within the undo queue) or hook to a callback when it's delete-undoed ?

I found a really similar topic here (
http://forums.cgsociety.org/showthread.php?t=986113) but the self found
answer does not look correct to me (even in the undo queue, userNode() on
the deleted node returns something valid)

Anyone has an idea about how this could be solved ?

Cheers,

---
[image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA]

+33 (0)2 99 27 21 44
http://www.golaem.com

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCZhGiryR3ZXTi0FCzuazOi2UjewptuOLBDctGJSiM-0-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to