Skip to content

ExpressionVariables Layer

The ExpressionVariables layer defines variables for use in expressions later in the composition on a given frame.

Variables defined by the ExpressionVariables layer are only valid for layers composited after the layer, and are also only valid for the duration of the layer on the timeline. They are useful in ‘control’ style transports in multi-transport workflows, and for animating common values on the timeline.

ExpressionVariables layer properties

The layer is split into two sections, representing the different phases of use:

  1. Configure - define which variables the layer should be responsible for creating, and information about what they are and how they are edited.
  2. Control - sequence and otherwise manipulate the variables defined in the first phase.

The intent is that users are able to collapse the ‘Config’ section after defining the variables they need, and focus entirely on controlling the values of those variables by editing or animating their values.

configured layer

Config

This section of the layer editor allows the user to create new variables for use elsewhere.

Variables are added, removed and edited in the usual array management workflows.

Editing variable properties

By adding a new item to the ‘container variables’ list in the editor, the metadata associated with a variable definition can be edited.

All variables have a name and a type. The name is the name of the variable as used elsewhere, and the type determines how and where the variable can be used.

Defining numeric variables

editing a numeric variable

Numeric variables store a number, and can be used with numeric expressions or string formatting. The definition of the metadata for numeric variables includes setting minimum and maximum values for the expected range the variable should take, as well as a step to aid in editing the variable value. The numeric variable also includes a default value which can be used to reset the value of the variable to a default in the control portion of the user interface.

Defining string variables

editing a string variable

String variables store text, and can be used with string formatting expressions or other text fields, such as in a text layer. The metadata for string variables only includes the default value which can be used to reset the control portion of the interface, if required.

Defining function variables

editing a function variable

Function variables store an expression which can be evaluated in another expression. This can be used for more complex behaviour changes. When using a function variable, the expression which uses the variable should use the call syntax () (e.g. myFunc().) Function variables also has metadata for the default value which users can reset the function text to, if required in the control section.

Variables

Every variable defined in the Config section appears as an editable, animatable value in the Variables section.

Variables can be edited and animated as with any other layer field.

The value in the editor shows the active value the variable resolves to at any given time.