Rescuing Broken Nuke Scripts

Written by Sebastian Elsner on .

Especially when using the Roto/Paint nodes it sometimes happens that scripts get broken. You then get messages like: "Missing close brace" or "Variable XY not defined" when opening files. There are some general things you can do about this:

* Save lots of versions

* use my autosave backup script

* use a version tracking software like Subversion, Mercurial or GIT and commit often

What you will always need for a rescue trip is a good text editor with TCL support, because .nk is essentially TCL.


This is the way I deal with broken scripts:

1) Check if last version has a significantly bigger filesize. If yes, Nuke probably did not correcly write the current file. There is nothing you can do about it. The information is just lost (Check the autosaves, thought!)

2) Load it in a texteditor with TCL support, if the editor supports folding, fold all and you should get an good overview of what is there and what is missing. You can copy all contents until that point and paste into nuke. Hopefully the stuff you are loking for is already there.

3)  For "Variable XY not defined" search for the name and remove that line if it starts with set .... or remove the whole node "nodename { ...stuff...}". Then again paste it to nuke.

4) Install an advanced TCL parser IDE like Kommodo Edit. Open the script there. Notice the scroll with the green check at the bottom. If it is showing a warning sign or a exclamation mark click the sign and jump to the location where the error is. This way you can find undefined variables or unclosed braces and remove the variables or close the brace.


I hope this helps somehow....


0 # Martin Malmqvist 2011-07-04 00:32
Sweet, this will surely help me in the future!

You have no rights to post comments

We have 3251 guests and 124 members online