What it does
Brio Script runs JavaScript written the way After Effects scripts are: app.project.activeItem is the open comp, layers and properties have AE's names, and values are in AE units:
- position in top-left, Y-down comp pixels
- scale and opacity in percent
- rotation in degrees clockwise
Scripts run from File ▸ Scripts. One undo takes back the whole run. AE scripts can be brought over with File ▸ Scripts ▸ Convert AE Script….
How a run works
- Sandboxed. A script reads and edits the project and nothing else. It can't read or write files, reach the network, run shell commands or AE menu commands. A file it imports or a render it queues goes through Brio, which asks you first when the script didn't get the file from a dialog you answered.
- Snapshot reads. The script reads a snapshot taken just before it starts, so reads are synchronous and a read after a write sees the write.
- All or nothing. Changes are applied when the script finishes. A script that throws changes nothing.
- Non-strict mode, as in ExtendScript.
- Approval. The first time a given script (by content) runs, Brio asks before running it. It won't ask again for that script unless the script changes.
- Re-runs. A file dialog, an import, a dialog window, or touching a closed comp's layers for the first time pauses the run; Brio then runs the script again from the top with the answer. Code before that point runs twice, so keep it free of side effects.
Example
var comp = app.project.activeItem;
var layer = comp.layer(1);
layer.position.setValueAtTime(0, [100, 100]);
layer.position.setValueAtTime(1, [500, 300]);
$.writeln("Keyed " + layer.name);
Reference
- Globals and app
- Project, comps and footage
- Layers
- Properties and keyframes
- Effects
- Text and text animators
- Shape layers
- Masks
- Cameras and lights
- Markers
- Render queue
- ScriptUI panels and dialogs
Not available (yet)
Anything not listed in this reference is not available. In particular: keying a different number of path points on an animated path, shape group scale/rotation, per-character text styles, mask expansion and the Intersect/Lighten/Darken mask modes, file access, and ScriptUI custom graphics. system.callSystem, $.evalFile and #include at run time are not available.