MANUAL / SCRIPTING & EXPRESSIONS

Properties and keyframes (scripting)

Reading and setting values, keyframes, easing and expressions on a Property from Brio Script.

Property

MemberNotes
name, matchName
valueAt the playhead, in AE units.
valueAtTime(t, preExpression)The keyframed value. Expressions run in the render, not in scripts.
setValue(v)Throws if the property has keyframes (AE's rule).
setValueAtTime(t, v), setValuesAtTimes(times, values)Add or replace keys.
numKeys, keyTime(i), keyValue(i), nearestKeyIndex(t)1-based.
addKey(t)Returns the new key's index.
removeKey(i)
setInterpolationTypeAtKey(i, inType, outType)Brio eases per segment: the out type wins.
keyInInterpolationType(i), keyOutInterpolationType(i)
setTemporalEaseAtKey(i, inEase[], outEase[])Becomes one curve for the segment leaving key i.
expressionGet/set the property's expression. "" removes it.
expressionEnabledGet/set.
isTimeVarying, canSetExpression

Units

AE units throughout: position in top-left, Y-down comp pixels; scale and opacity in percent; rotation in degrees clockwise.

Effect parameters: numbers as numbers, checkboxes as 1/0, points as [x, y], colours as [r, g, b, a] 0–1, menus as their 1-based choice. Only number parameters can be keyframed from a script.

Example

var p = app.project.activeItem.layer(1).transform.opacity;
p.setValueAtTime(0, 0);
p.setValueAtTime(1, 100);
p.setInterpolationTypeAtKey(1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.BEZIER);
p.setTemporalEaseAtKey(1, [new KeyframeEase(0, 33)], [new KeyframeEase(0, 75)]);

Expressions from a script

layer.transform.rotation.expression = "time * 90";