Lock A Node From Being Deleted?

I have some animators that have requested "a way so that we can't accidentally delete the contollers" on their character rigs. If they do delete a controller on the rig (NURBS Curve), when you press Undo, the rig gets wrecked and so does their work. They have to reopen a previous save.

Is there a way to make an attribute for nodes to be locked from deletion?

Maybe a toggle mode where Delete Key is disabled?

Any help on this crazy request would be great!

Thanks!

maybe setup a scriptJob that controlls the selection. If there is an object selected "blablaController*" disable the deleteHotkey...

NoNo! There seems to be a maya proc being called on delete: doDelete

CODE
whatIs doDelete;
// Result: Mel procedure found in: C:/Programme/Alias/Maya7.0/scripts/others/doDelete.mel //

You could easily override this by defining a new doDelete-proc.

or overload delete

CODE
global proc delete(){
print "dont do this, ever! again";
}

Seroisly guys dont do any of the above,

use lockNode

snipet quoted form the oh so wonderful mel reference:

QUOTE
// create a sphere, lock it, then try to delete it.
sphere -n sphere1;
lockNode sphere1;
delete sphere1;

ahh cool! That sure looks slightly smarter ;]

good to know that! Thanks joojaa!

Awesome!

I can write a script to search for NURBS Curves and lock them!

Thanks!

lockNode ls -et nurbsCurve; //locks all nurbs curves