Execute operation
ae_doExecute an After Effects operation by catalog name with argument validation and automatic single undo group. Use batch.run to combine multiple steps in one call.
Instructions
Execute an atomic operation by name (from ae_catalog). Arguments are validated against the operation's declared parameters before anything reaches AE. Have more than one operation to run? Wrap them in ONE batch.run instead of several ae_do calls — read/verify steps (comp.info, layer.info, render.frame) can ride in the same batch. Every call is automatically wrapped in ONE undo group: a single Ctrl+Z (or project.undo) reverts the entire call, and a batch.run counts as one call. Never call app.beginUndoGroup/endUndoGroup in eval.run code — the wrapper already did. The exception is undo/redo itself (project.undo, command.execute id 16/2035): those run outside the group and cannot ride inside a batch.run. Response includes ambient context (active comp, selected layers, project state) at zero extra round trips. Example: ae_do({ operation: 'keyframe.add', args: { comp: 'Main', layer: 1, property: ['Transform','Position'], time: 2, value: [960,540] } })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments for the operation. Validated against ae_catalog's declared params: missing required args, wrong types, and unknown keys are rejected before AE is contacted. Omit for zero-param operations. | |
| operation | Yes | Operation name from ae_catalog (e.g. 'layer.create_solid', 'keyframe.add'). | |
| timeoutMs | No | Per-call timeout in milliseconds (default 60000). Raise for long operations like render.start or big batch.run calls. |