Expressions

This chapter is intended as a primer on how to apply expressions (programmatic commands) to Nuke parameters. It explains how to perform some common tasks with expressions (for example, how to link the values of one parameter to another), and concludes with a table all the functions that you may include as part of an expression.

Quick Start

Here's a quick overview of the workflow:

1.   You enter Nuke expressions in the Expression dialog, which you can open either by pressing the equals sign (=) on a parameter or by right-clicking on it and selecting Add expression.
2.   In the Expression dialog, enter text that either references values from other parameters (creating a linking expression - see Linking Expressions) or applies mathematical functions of some kind to the current values (see Adding Mathematical Functions to Expressions). An example of the former would be parent.Transform1.rotate, which indicates that this control takes its values from the parent control, Transform node’s rotate control.
3.   If necessary, you can also convert expressions between scripting languages (that is, between Nuke expressions, Tcl, and Python). See Converting Expressions Between Scripting Languages.