Globals & parameters

Built-in names available in any Expression: time, frame, the parameter's own value, and a way to grow your own slider.

Inside an The Expression language, @name reads a per-element attribute. Globals are the other half: names starting with $, always available, re-read every frame.

$T and $F

$T is the current animation time in seconds. $F is the current frame number. These two turn a static formula into a moving one.

sin($T * 2.0) * 10.0

That sways a value back and forth forever, twice per second. Drive a position, a colour channel, a radius, anything.

$F % 8

Counts 0,1,2…7 and repeats, for stepping through frames or cycling a pattern.

The rest, and this is all of them:

A name outside that list is a compile error.

$T follows the Time & playback transport, so scrubbing the The timeline scrubs the animation with it. Use $T for motion that should hold up at any frame rate, and $F when counting frames is the point.

value

In an Expression written on a parameter rather than in an Expression node, value is that parameter's own current value, including any keyframes or connections feeding it. Adding to it modifies the existing animation instead of replacing it.

value + sin($T) * 0.1

That adds a wobble on top of whatever the parameter is already doing. Parameter expressions covers where these live.

param("name", default)

param("name", default) reads a value, and if no control by that name exists yet it adds a slider to the node. The default is the starting value.

@P.y = @P.y + sin($T) * param("wave_height", 5.0)

On the first cook a wave_height slider appears on the node, set to 5.0. Dragging it changes the motion live, and the formula never needs editing again. Expose the one or two numbers worth playing with, then animate the slider or Recording live input onto it like any other control.

The default has to be a plain number such as 5.0 or -0.5, not another formula. A literal default is what allows the slider to be found and added automatically.

See also