MANUAL / SCRIPTING & EXPRESSIONS

Expression syntax

The parts of the AE expression language Brio supports — values, operators, variables, if/else, arrays and strings.

Built-in names

NameWhat it is
timeThe current time in seconds.
valueThe property's own value now, before the expression.
thisLayerThe layer the expression is on.
thisCompThe comp.
thisPropertyThe property the expression drives.
MathMath functions and constants. See Math and conversion.

Layer members can also be used bare, as in AE: transform, position, scale, rotation, opacity, anchorPoint, xRotation, yRotation, zRotation, inPoint, outPoint, startTime, index, name, width, height, effect, hasParent, parent.

Statements

  • var x = …; (let and const work the same). Assign with =, +=, -=, *=, /=.
  • if (…) { … } else { … }.
  • The last line's value is the result.
  • Comments: // … and /* … */.

Operators

Arithmetic + - * / %, comparison == != < <= > >= (also === / !==), logic && || !, and the conditional a ? b : c.

Values

  • Numbers and true/false.
  • Arrays as vectors — up to four items (positions, scales, colours). [100, 200] + [10, 10] adds item by item; a number with an array applies to each item. .length gives the count; v[0] an item.
  • Strings in "…" or '…', joined with +; .length, .toUpperCase(), .toLowerCase(). Numbers have .toFixed(n) (0–20 decimals).

Result shape

A number fills every dimension of the property. A short array is padded with the property's own value (AE's rule); a long one is cut.

Not supported

for, while, do, function, return, new, this, class, and ++ / -- (write x = x + 1).