Nuke Knowledge Base

Nuke stuff I need the interwebs to remember for me.

Random colour values in python

To create random values in python, type:

(randint returns an integer between (x, y). float invokes a floating-point number.)

ZBlur – Focal Plane Setup

In the zBlur node’s focus plane setup, blue is in front of the focus plane, red is behind it.

knobChanged callback for custom gizmos

If you, for example, want to change the appearance of a gizmo’s UI based on user input, you’ll need to incorporate callbacks, most probably the knobChanged callback. This is way easier than I would have expected after googling for hours and not getting it to work.

Select the node you are working on and want to apply the callback to. Head over to the script editor and enter this:

What this does: addresses the pseudo knob knobChanged and sets its value to a line of python code. It will output the value of knob, whenever knob is changed.

Next posts