Working with effects
layer.Effectsorlayer.property("Effects")is the Effects group.Effects.property(effectName | index)returns an effect group;effect.property(paramName | index)returns its parameter.Effects.addProperty(matchName | name)adds an effect and returns its group.effect.name = "…"renames it. Expressions find effects by name —effect("Bounce")("Slider").effect.remove()removes it.
Parameters of a just-added effect can be set in the same run only for the Expression Controls (Slider, Angle, Checkbox, Point, Color).
Parameter values: 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.
AE matchNames that addProperty knows
| AE matchName | Brio effect |
|---|---|
ADBE Slider Control | Slider Control (param Slider) |
ADBE Angle Control | Angle Control (Angle) |
ADBE Checkbox Control | Checkbox Control (Checkbox) |
ADBE Point Control | Point Control (Point) |
ADBE Color Control | Color Control (Color) |
ADBE Gaussian Blur 2 | Gaussian Blur |
ADBE Glo2 | Glow |
ADBE Drop Shadow | Drop Shadow |
ADBE HUE SATURATION | Hue/Saturation |
ADBE Easy Levels2, ADBE Pro Levels2 | Levels |
ADBE CurvesCustom | Curves |
ADBE Exposure2 | Exposure |
ADBE Invert | Invert |
ADBE Fractal Noise | Fractal Noise |
ADBE Posterize Time | Frame Rate |
Brio's own effect names work too (for example "Bloom", "Roughen Edges", "Bend"). Other AE effects are not available.
Example
var fx = layer.Effects.addProperty("ADBE Slider Control");
fx.name = "Bounce";
fx.property("Slider").setValue(40);
layer.transform.rotation.expression = 'effect("Bounce")("Slider")';