Graphics Programs Reference
In-Depth Information
3. Click the Run button at the top of the Script Editor to execute this command.
You should be very proud of yourself here. Pat yourself on your back. But one
problem is that if you quit Nuke and restart it, all this disappears, which is a
shame. But there is a remedy.
Making Customization Stick with the Menu.py File
When Nuke loads, it looks for a file called menu.py in the .nuke directory. This is a text
file with a .py (for Python) extension instead of the default .txt extension. This file will
hold all the customization you want to add to Nuke.
YoucanuseNuke'sScriptEditortocreatethisfile—butit'sbestforquicklytestingthings
as you write them, not for long coding sessions. You can use any text editor you prefer in-
stead.Irecommendusingverysimpletexteditors(likeNotepadonWindowsandTextEdit
on the Mac) or code-oriented text editors (such as ConTEXT on Windows and TextMate
or TextWrangler on the Mac). Whatever you do, don't use big word processing software
because it adds all sorts of styling and formatting code to your text file, which Nuke can't
read. The text that displays in your file is what should be in your file when Nuke reads it.
This is not the case with Microsoft Word's .doc files, for example.
Note
If you're not sure where the .nuke directory is on your system, see Chapter
12 to refresh your memory.
In this case, you already created all the code inside Nuke's Script Editor. You just need to
save it in your .nuke directory and call it menu.py.
1. Click the Previous Script button to bring back the three previous lines of com-
mands (including the hot key part of the code as well).
2. Click the Save Script button. This is the Save Script button in the Script Editor,
not the Save Script menu item.
3. Inthebrowserwindownavigatetoyour.nukedirectory(ifyoucan'tseethe.nuke
directory in your home directory, start typing .n and it will come up).
4. Name the file menu.py and click Save.
Yourmenu.pyfileisnowsavedwiththecommandsforcreatingtheUsermenuin
the Nodes Toolbar and adding a link to the SafeAreas Gizmo in it.
5. Quit Nuke, then open it again.
The User menu is now there.
Search WWH ::




Custom Search