Nuke Knowledge Base

Nuke stuff I need the interwebs to remember for me.

Disable knobs on a certain node with python

To do this for all knobs, just put it in a loop:

 

Execute writenode via python

 

Set keyframes in knobs with python

This example sets a knob to a defined value  in all frames .
nuke.Root()[‘first_frame’].getValue() returns float whyever…
So thats the reason i put it in “int()”

 

Create knobs with python

Syntax to create knobs (in this example a text-knob):

And here a short list of the most-needed knobs:

 

Hide unconnected inputs on selected nodes

Just a few lines to hide all not connected inputs. In this example the script touches all Beziers.

Export Nuke’s LUT to FrameCycler

FrameCycler can be a bitch to work with. In order to get the colours right, you can do the following: (more…)

Colour blend modes in Photoshop

Comprehensive info:

http://stackoverflow.com/questions/5919663/how-does-photoshop-blend-two-images-together

Sample image from within the expression node

To sample the incoming colour values, in an expression node type the following for the required channels:

Split file path in TCL

To split the contents of a file value field in read or write nodes, you can type this expression:

Convert rgb to hex colour in python

For some things, like the tile colour of a node, you can’t work with rgb but need to use hex values instead. You can use the following code to convert rgb to hex:

So, to set a random tile colour for the selected node, type:

Previous Posts Next posts