MANUAL / SCRIPTING & EXPRESSIONS

Project, comps and footage (scripting)

app.project, CompItem and FootageItem in Brio Script — comps, layers collections, import and footage.

app.project

MemberNotes
activeItemThe open comp (CompItem), or null.
numItems, item(i)The project's comps, then its footage, 1-based.
importFile(new ImportOptions(file))Imports a file and returns its FootageItem. Set sequence = true for a numbered image sequence. A file picked in a dialog imports straight away; a path the script names asks you first.
importFileWithDialog()Brio's import dialog; returns the imported items, or null.
items.addComp(name, width, height, pixelAspect, duration, frameRate)A new comp. It is not opened, but its layers can still be added and edited.

CompItem

MemberNotes
name, width, height, duration, frameRate, frameDurationGet/set on any comp, open or not. 29.97, 23.976 and 59.94 are kept exact.
bgColor[r, g, b] 0–1, get/set.
workAreaStart, workAreaDurationSeconds, get/set (kept inside the comp).
motionBlur, motionBlurSamplesPerFrameGet/set.
threeDGet/set — Brio's 2D/3D comp mode.
id, pixelAspect (1), shutterAngle (180), displayStartTime (0)Read-only.
timeThe playhead. Set it to move it (open comp; not undoable, as in AE).
numLayers
layer(index) / layer(name)1-based, top first; throws if missing. Works on closed comps too (the run restarts once while Brio reads them).
layers[index]1-based.
layers.byName(name)null if missing.
layers.addNull()A new null at the comp centre, on top.
layers.addSolid([r, g, b], name, width, height)Colour 0–1.
layers.addText(text)A string or a TextDocument (its font, size and colours apply).
layers.addBoxText(size, text)Makes point text.
layers.add(item)Places a FootageItem, or nests another comp, in the open comp.
layers.addShape()A shape layer. See Shape layers.
layers.addCamera(name)A camera; the comp turns 3D and it becomes the active camera.
layers.addLight(name)A spot light. Set lightType in the same run for another type.
layers.precompose()Throws — not available yet.
selectedLayersArray (0-based), primary first — open comp only.
openInViewer()Opens another comp. The script can't edit further after it.
markerPropertyComp markers. See Markers.

FootageItem

MemberNotes
name, id
width, height
duration, frameRate0 for stills.
frameDuration, pixelAspect (1)
hasVideo, hasAudio
fileIts path; not readable.
mainSource.isStill

Removing or replacing footage from a script isn't supported yet. An import is its own undo step, and pauses the run while Brio asks — the script then runs again from the top.