MANUAL / SCRIPTING & EXPRESSIONS

Shape layers (scripting)

Building and editing shape layer contents — groups, rectangles, ellipses, stars, fills, strokes, paths, Repeaters and Trim Paths — from Brio Script.

New shape layers

comp.layers.addShape() makes a shape layer. layer.property("Contents").addProperty(matchName) builds AE's contents:

matchNameProperties
ADBE Vector GroupIts property("Contents"), and property("Transform"): Position, Anchor Point
ADBE Vector Shape - RectSize, Position, Roundness
ADBE Vector Shape - EllipseSize, Position
ADBE Vector Shape - StarType (1 star / 2 polygon), Points, Position, Rotation, Inner Radius, Outer Radius
ADBE Vector Graphic - FillColor, Opacity
ADBE Vector Graphic - StrokeColor, Opacity, Stroke Width

A group's Fill and Stroke paint every path in it and in its subgroups. Set values with setValue. Contents of a new layer can't be keyframed in the same run, except Repeaters and Trim Paths.

var comp = app.project.activeItem;
var sl = comp.layers.addShape();
var g = sl.property("Contents").addProperty("ADBE Vector Group");
var r = g.property("Contents").addProperty("ADBE Vector Shape - Rect");
r.property("Size").setValue([200, 120]);
g.property("Contents").addProperty("ADBE Vector Graphic - Fill").property("Color").setValue([1, 0.5, 0]);

Existing shape layers

  • layer.property("Contents") lists the layer's groups (ADBE Vector Group, by name or 1-based index).
  • Each group's property("Contents") holds its paths (Rectangle / Ellipse / Polystar Path, named as in AE or by the name you gave them), then Fill 1 and Stroke 1 when the group shows them.
  • Read and setValue or setValueAtTime: Rect Size, Position, Roundness; Ellipse Size, Position; Polystar Points, Position, Rotation, Outer/Inner Radius; Fill Color, Opacity; Stroke Color, Opacity, Stroke Width.
  • addProperty adds a group to the layer, and rectangles, ellipses, polystars, a Fill or a Stroke to a group. Brio's groups don't nest.
  • remove() removes a group, a path or a Fill/Stroke. Groups and paths can be renamed. A group's enabled hides it. Moving a group's Transform Position moves its shapes.
  • Keyframes already on contents aren't read (numKeys is 0).

Repeaters and Trim Paths

ADBE Vector Filter - Repeater and ADBE Vector Filter - Trim become Brio's group Shape Ops, on new and existing layers. All their values can be keyframed with setValueAtTime, on a new layer too.

RepeaterNotes
Copies
Transform ▸ Anchor Point, Position, Rotation
Transform ▸ ScaleEven x and y.
Transform ▸ End OpacityA fade per copy.
Offset, Composite, Start OpacityOnly at their defaults (0, Below, 100%).
Trim PathsNotes
Start, End, OffsetMeasured along AE's outline (an ellipse from the top, a rectangle from the top of its right edge), so the same values trim the same part.
Trim Multiple ShapesAccepted, but Brio always trims each path on its own (AE's Individually). A group uses its first Trim Paths.

One added to a group works on that group; one added to the layer's Contents works on every group under it. Brio's own Grid and Transform Shape Ops list as BRIO Shape Op - Grid / - Transform (on/off and remove() only).

Drawn paths

ADBE Vector Shape - Group ("Path 1"): property("Path").value is an AE Shape — vertices, inTangents, outTangents (offsets from their vertex) and closed, Y-down and relative to the group, at the playhead.

  • setValue(shape) replaces the points (any number). A path with keyframes needs setValueAtTime.
  • setValueAtTime(t, shape) keys the pose with the same number of points as the path has; a still path can take a different count.
  • new Shape() makes one. addProperty("ADBE Vector Shape - Group") adds a drawn path to a group.
  • A path made of several subpaths shows its first one; the others are kept.

Not available

Shape group scale/rotation; keying a different number of points on an animated path.