hi all,

i'm trying to monitor user deletions. using OpenMaya.MNodeMessage.addNodeAboutToDeleteCallback()

I'm trying to protect afew nodes from deletion, if somthing down the line in a chain is selected for deletion.

problem is because maya deletes from child to selected node i can never get to say unparent the children so they dont delete. and then allow maya to run its course and delete only selected nodes.

is there a way of muting or destorying a deletion callback before it happens? it seems maya is commited once cmds.delete() or "doDelete;" is called. even if i say try to lockNode or anything like that.

i though i might be able to use OpenMaya.MCommandMessage.addCommandCallback("delete", myfunction()) but it seems to bug out for me. so i cant test this option. just get alot of warning. anyone used this option before.

i want to try some changes befor maya commits to deleting nodes.
not sure what my option might be here. can i perhaps undo on say a MDGModifier or something?

i guess the only other option which id rather not do it to overwrite the "doDelete;" mel function but then that dosent account for cmds.delete().

anyway insights would be great.


john

--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to