The only thing that came to mind for me was adding an onDestroy callback to check whether the node is one we're not supposed to delete:

def showError():
    nuke.message("You deleted the wrong node!")
nuke.addOnDestroy(showError, nodeClass='Dot')

I tried triggering an undo during the callback, but unfortunately it undoes the previous action, because the node deletion hasn't been registered yet at that point. From a quick glance I also wasn't sure how to see what node was being deleted, other than the class.

May be food for thought, anyway...

- Chris

On 08/02/12 19:55, J Bills wrote:
is there any way to essentially lock a node so it can't accidentally be
deleted?

I'm making a template and for organizational sake, some of the
expressions rely on certain dots and noop nodes being in place.  without
them, my script looks like a rats nest, but with them it's gold.  but I
don't want someone who's not all that down with dots or whatever to
start deleting things.

other than putting a "do not delete" in the label, is there anything
scripty I could do here?


This body part will be downloaded on demand.

--
Chris Bevan, Senior Software Engineer
The Foundry, 6th Floor, The Communications Building
48 Leicester Square, London, WC2H 7LT
Tel: +44 (0)20 7968 6828 | Fax: +44 (0)20 7930 8906
Web: www.thefoundry.co.uk

The Foundry Visionmongers Ltd
Registered in England and Wales No: 4642027
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to