The Root class doesn't override .setName(), so the name validation by that
method is (almost certainly) the same logic used for standard nodes.
Try using root['name'].setValue('/new/script/path.nk').
-Nathan
-----Original Message-----
From: Francois Lord
Sent: Thursday, March 26, 2015 11:41 AM
To: [email protected]
Subject: [Nuke-python] Force changing the name of the current comp
Hi.
Is there a way in a OnScriptSave() event to change the name of the comp
to be written on disk? We want to enforce our naming convention and
instead of just cancelling the save when the user didn't name his comp
properly, we would like to auto-name it when possible.
I tried using the nuke.root().setName() method, but it errors out as
soon as I put slashes in the name to define the path.
Any ideas?
Thanks
Francois
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python