Tutorials of the month: Nuke Customization

So if you have set up everything correctly you can now start to do some customization. The first thing I want to set up in Nuke is a default Format, a default FPS and a default ColorSpace. To do this simply add the following code to your menu.tcl, that is located in your “nuke_plugins” folder:

# Sets images to linear colorspace *****************

knob_default Root.transfer 1
knob_default Read.transfer 1
knob_default Write.transfer 1

# Sets FPS to 25 ***********************************
knob_default Root.fps 25

# Sets the default full and proxy formats to PAL:
knob_default Root.format PAL
knob_default Root.proxy_format PAL

When starting Nuke now, then pressing S you will access your Root Settings. They should look like the image below.

default settings

Your Default FPS is now 25, the Format is PAL and under LUT you will see that your preset curve is to linear.

As you see, the command “knob_default” followed by the Node name and the function you want to change, will set up your nodes with a custom setting.

So you can use this also for standard nodes, like the Blur node. Simply add

knob_default Blur.size 10

and you will get a Blur node with the size set to 10 everytime you create it. You can even tell a node which channels to output. For example

knob_default Write.channels rgba

will set up your Write node to output Red Green Blue and Alpha Channels as a standard. You can mess around with this sort of customization to set default values for your desired nodes.

So now let’s create some custom hotkeys !! I found it really annoying that there is no hotkey for the options: hide_input and postage_stamp , that are found in every node.

hide and postagestamp

so with the help of TCL you can easily create them on your own. Open a text editor and type in the following code:

proc HideInput {} {
foreach cur_node [selected_nodes] {
knob $cur_node.hide_input !$cur_node.hide_input
}
}

Save it as “HideInput.tcl” inside your “nuke_plugins” folder. Then add the following line to your menu.tcl:

menu “Other/HideInput” “+h” HideInput

When you start Nuke now, you can hide the input of a selected node by pressing Shift + h ! Your first selfmade hotkey is done!! Now you can try to create the hotkey for Postage_Stamp on your own. It is basically the same as we have done before, simply change your proc name (be aware to not use the word Postage_Stamp, because this command is already in use! so name it something like: PostageST !!) and use postage_stamp instead of hide_input. Finally save it to the right folder and set up your menu.tcl. One important thing to mention is, that your proc name should be the same as your TCL file name.
If you have problems creating it you can also download it here

So that’s it for now, hope you enjoyed this little programming tips and as you know I’m always happy to get some feedback.
Take care!

1 Comment so far

  1. Nand kishor August 20th, 2008 7:04 pm

    Really great, the hot key script is really useful
    thanks

Leave a reply

Franz