In this written tutorial, we will be using Python code within Nuke to manipulate nodes and strings. We will go through the different commands used in the code and explain what they do.
Example: 1 The first part of the code manipulates a string. The string represents a file path
Example: 3 Here, we select the same node as before, and access the “clamp” knob, setting its value to 0. This is a boolean value, meaning it can only be either true or false (1 or 0, respectively)
Example: 4 This line selects the “Transform1” node and accesses the “center” knob, which is a two-dimensional array of values. Here, we set the value of this knob to [5, 10], which means that the center of the node will be at coordinates (5, 10) in the viewer
Example: 5 This line selects the “Transform1” node and accesses the “translate” knob, which is also a two-dimensional array of values. Here, we set the value of this knob to [5, 10], which means that the node will be translated (moved) by 5 pixels in the x direction and 10 pixels in the y direction