Nuke Expressions

=Expressions=

time

 * linking time curves:
 * To get a simple increase or decrease animation over time you can use the following expression: frame*a  With a being the speed. The higher the number the faster the value rises. Negative numbers will decrease the value over time. With a=1 the value will increase by 1 every frame.

animation

 * wave expressions: []

Parenting
Go to the knob you want to be the child and select Add Expression in the right-click menu. nodeName.knobName or nodeName.knob.knobname Example: FrameHold2.knob.first_frame or FrameHold2.first_frame

Expressions for labels
These are expressions for displaying things in labels of nodes or backdrops.

Node Icon


display value
[value nodeName.knob] When you want to display a value of a knob from the node which label you are altering you can just type the knob name.

display expression
[knob knob] So expression value of the knob will be printed on the label.

Format
put the format information in a no-op node:
 * 1) create a no-op and connect it to a source you want to get the format of.
 * 2) add a 2d position knob to the no-op.
 * 3) add the following expression to the x-expression: input.format.w

Now the 2d position knob on the no-op represents the image format. Now the format can be stored in python by getting the value of the knob. This is useful when making gizmos because you can't know what format will be inputted.
 * 1) add the following expression to the y-expression: input.format.h

=Expression Node= This node can use expressions to describe channels. It can easily swap channels around or make things like ramps and circles.
 * input options (foundry documentation):
 * examples:
 * you can use values from other nodes in your expression node. Just type: nodeName.knobName ,for example transform1.scale

wave
sin(x/100)+y/10-100