run-script
Run built-in After Effects commands to create compositions, add layers, set properties, and return results. Cannot execute arbitrary code.
Instructions
Run one of the bridge's built-in After Effects commands and return its result. Only these commands exist; it cannot run arbitrary code.
Read: listCompositions, getProjectInfo, getLayerInfo (layers of the ACTIVE composition). Compositions: createComposition {name, width, height, frameRate, duration, pixelAspect, backgroundColor:{r,g,b 0-255}}; setCompositionProperties {compName, duration, frameRate, width, height}. Layers (compName = target composition; colours are [r,g,b] from 0 to 1; position is [x,y] in pixels; times in seconds):
createTextLayer {compName, text, position, fontSize, color, fontFamily, alignment: left|center|right, startTime, duration}
createShapeLayer {compName, shapeType: rectangle|ellipse|polygon|star, name, position, size:[w,h], fillColor, strokeColor, strokeWidth, points, startTime, duration}
createSolidLayer {compName, name, color, size:[w,h], position, isAdjustment, startTime, duration}
createCamera {compName, name, position:[x,y,z], pointOfInterest:[x,y,z], zoom, oneNode}
setLayerProperties {compName, layerName or layerIndex, position, scale:[x,y], rotation, opacity, startTime, duration, enabled, blendMode, threeDLayer, text, fontSize, fontFamily, fillColor, trackMatteType}
batchSetLayerProperties {compName, operations:[{layerName or layerIndex, ...same properties}]}
duplicateLayer {compName, layerName or layerIndex, newName}; deleteLayer {compName, layerName or layerIndex}
setLayerMask {compName, layerName or layerIndex, maskRect:{top,left,width,height} or maskPath, maskMode, maskFeather, maskOpacity, maskExpansion, maskName, maskIndex} Prefer the dedicated tools for keyframes, expressions and effects (they use compIndex/layerIndex). After changing anything visual, call view-comp to check the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The command to run | |
| parameters | No | Arguments for the command, as listed in the description |