After Effects MCP Server
v0.1.0Drive Adobe After Effects from any MCP client: compositions, layers, animation and rendering.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_project_info Get Project Info
Describe the open project: file, unsaved changes, bit depth, working colour space, expression engine, item counts by type, the active item and the render queue
list_items List Items
List project items (compositions, footage, folders) with their id, type, folder and size. Ids are what other tools take
| Parameter | Type | Description |
|---|---|---|
folder | integer | Only items inside this folder (id) |
type | string | Only this type |
import_files Import Files
Import files into the project (File > Import): footage, image sequences, layered Photoshop or Illustrator files as footage or compositions, another After Effects or Premiere Pro project, data files (JSON, mgJSON, CSV, TSV), or a .jsx expression library that expressions call through footage("name.jsx"), optionally into a folder
| Parameter | Type | Description |
|---|---|---|
files * | array | Absolute paths |
folder | integer | Put the items in this folder (id) |
importAs | string | Default footage |
sequence | boolean | Import the numbered files after each as an image sequence. Default false |
create_folder Create Folder
Add a folder to the Project panel, optionally inside another folder, and move items into it
| Parameter | Type | Description |
|---|---|---|
name * | string | |
items | array | Item ids to move into the new folder |
parent | integer | Parent folder id |
manage_items Manage Items
Rename, move to a folder, set the label colour of, or delete project items
| Parameter | Type | Description |
|---|---|---|
items * | array | Item ids |
delete | boolean | Delete the items. Default false |
folder | integer | Move into this folder (id); 0 for the root |
label | integer | Label colour number, 0 = none |
rename | string | New name (one item only) |
save_project Save Project
Save the project in place, or as a new .aep file (the project then refers to it)
| Parameter | Type | Description |
|---|---|---|
filePath | string | Absolute .aep path. Omit to save in place |
open_project Open Project
Open an .aep project, an .aet template (which opens as an untitled copy) or a .mogrt Motion Graphics template as a project, or start a new empty one. Unsaved changes in the current project are discarded, so save first
| Parameter | Type | Description |
|---|---|---|
filePath | string | Absolute .aep, .aepx, .aet or .mogrt path. Omit for a new project |
tidy_project Tidy Project
Remove unused footage, consolidate duplicate footage, or reduce the project to the chosen compositions and what they use (File > Dependencies)
| Parameter | Type | Description |
|---|---|---|
operation * | string | |
keep | array | reduce_project: composition ids to keep |
save_project_copy Save Project Copy
Save a copy of the project while it keeps its own file (File > Save As > Save a Copy), or a copy in the text-based XML format (Save a Copy As XML, .aepx). The project must have been saved; saveFirst saves it in place first
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Absolute path of the copy: .aep, or .aepx for XML |
saveFirst | boolean | Save unsaved changes in place first, so the copy includes them. Default false |
run_project_command Run Project Command
Project file commands: close the project (File > Close Project), revert to the last saved version (File > Revert), open the most recent project (File > Open Recent), or save a numbered copy and continue in it (File > Increment and Save). Close, revert and open_most_recent can lose unsaved work
| Parameter | Type | Description |
|---|---|---|
command * | string | The command |
unsaved | string | close, open_most_recent: what to do with unsaved changes. Required when there are any |
set_project_settings Set Project Settings
Read or change project settings (File > Project Settings): time display style (timecode or frames), footage start time, feet + frames and film type, frame count start, colour depth, expression engine, and the transparency grid in Project panel thumbnails. With no changes it returns the current settings
| Parameter | Type | Description |
|---|---|---|
bitsPerChannel | integer | Colour depth in bits per channel |
expressionEngine | string | Expressions engine |
feetAndFrames | boolean | Frames: Use Feet + Frames |
filmType | string | Feet + Frames film |
footageStart | string | Timecode: Footage Start Time from the source media or 00:00:00:00 |
frameCount | string | Frames: Frame Count |
timeDisplay | string | Time Display Style |
transparencyGridThumbnails | boolean | Thumbnail Transparency Grid in the Project panel |
find_project_items Find Project Items
Search the project like the Project panel search field (File > Find): items whose name or comment contains text, and items that are missing, unused or used, optionally of one type
| Parameter | Type | Description |
|---|---|---|
status | string | missing: footage whose file cannot be found; unused or used in any composition |
text | string | Text to find in names and comments (case-insensitive) |
type | string | Only this type |
select_project_items Select Project Items
Select items in the Project panel: replace the selection, add to it (extend the selection), remove from it, or clear it; optionally show the Project panel. Menu commands act on this selection
| Parameter | Type | Description |
|---|---|---|
items | array | Item ids. Omit or leave empty with mode replace to clear the selection |
mode | string | Default replace |
showPanel | boolean | Show the Project panel. Default false |
set_item_comment Set Item Comment
Set the Comment column text of project items; an empty comment clears it
| Parameter | Type | Description |
|---|---|---|
comment * | string | Comment text |
items * | array | Item ids |
find_missing_dependencies Find Missing Dependencies
Find missing footage, effects or fonts (File > Dependencies > Find Missing Footage, Find Missing Effects, Find Missing Fonts). Footage and fonts are listed; reveal also runs the menu command, which shows them in the Project or Timeline panel. Missing effects can only be revealed
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to look for |
reveal | boolean | Run the Find Missing menu command too. Default false; always true for effects |
resolve_project_fonts Resolve Project Fonts
List the fonts the project uses, marking ones that are missing and substituted (as in the Resolve Fonts dialog), or replace fonts across every text layer
| Parameter | Type | Description |
|---|---|---|
replace | array | Replacements to make, by PostScript name. Omit to list fonts |
edit_project_metadata Edit Project Metadata
Read or replace the project's XMP metadata (shown in the Metadata panel and in Adobe Bridge). showPanel toggles Window > Metadata
| Parameter | Type | Description |
|---|---|---|
showPanel | boolean | Toggle the Metadata panel. Default false |
xmp | string | A complete XMP packet (x:xmpmeta) that replaces the project's. Omit to read it |
get_footage_info Get Footage Info
Describe footage items (Project panel, Interpret Footage): source kind (file, solid, placeholder), file and missing path, alpha, frame rates, fields and pulldown, pixel aspect, loop, proxy and the compositions that use each item
| Parameter | Type | Description |
|---|---|---|
items | array | Footage item ids. Omit for every footage item |
missingOnly | boolean | Only items whose source file is missing. Default false |
interpret_footage Interpret Footage
Change how footage is interpreted (File > Interpret Footage > Main or Proxy): alpha (ignore, straight, premultiplied with a matte colour, or guess), invert alpha, frame rate, field order, Preserve Edges, pulldown removal or guessing, pixel aspect ratio and loop count. copyFrom applies another item's interpretation first (Remember Interpretation, then Apply Interpretation)
| Parameter | Type | Description |
|---|---|---|
items * | array | Footage item ids (from list_items or get_footage_info) |
alpha | string | Alpha: Ignore, Straight - Unmatted, Premultiplied - Matted With Color, or Guess |
copyFrom | integer | Footage item id whose main interpretation is copied first: alpha, matte colour, invert alpha, frame rate, fields, Preserve Edges, pulldown, loop and pixel aspect |
fields | string | Separate Fields: off, upper field first, lower field first |
frameRate | number | Conform to this frame rate (Assume This Frame Rate for stills); 0 returns to the file's own rate |
invertAlpha | boolean | Invert Alpha |
loop | integer | Loop the footage this many times |
matteColor | string | Matte colour for premultiplied alpha: "#RRGGBB" or "rgb(r,g,b)" |
pixelAspect | number | Pixel aspect ratio, e.g. 1 (square), 0.9091 (D1/DV NTSC), 1.0940 (D1/DV PAL), 2 (anamorphic 2:1), 1.3333 (HDV 1080). Main footage only |
preserveEdges | boolean | Preserve Edges (Best Quality Only) for separated fields |
pulldown | string | Remove pulldown: a phase (W = whole frame, S = split frame; _24P_ADVANCE for 24Pa), OFF, or guess_3_2 / guess_24pa to let After Effects pick. Needs separated fields |
source | string | Interpret the main footage or the item's proxy. Default main |
replace_footage Replace Footage
Replace a footage item's source everywhere it is used, keeping layer changes (File > Replace Footage): with another file or image sequence, a colour-bar placeholder, a solid, or a composition built from a layered Photoshop or Illustrator file (With Layered Comp)
| Parameter | Type | Description |
|---|---|---|
item * | integer | Footage item id |
with * | string | What replaces it |
color | string | solid: colour, "#RRGGBB" or "rgb(r,g,b)" |
duration | number | placeholder: seconds. Default the item's duration, or 10 |
file | string | file, sequence: absolute path (for a sequence, its first file) |
forceAlphabetical | boolean | sequence: Force alphabetical order, so gaps in the numbering do not become placeholder frames. Default false |
frameRate | number | placeholder: frames per second. Default the item's rate, or 30 |
height | integer | placeholder, solid: pixels. Default the item's height |
name | string | placeholder, solid: name. Default the item's name |
pixelAspect | number | solid: pixel aspect ratio. Default the item's |
width | integer | placeholder, solid: pixels. Default the item's width |
set_proxy Set Proxy
Give footage items or compositions a proxy (File > Set Proxy): a file or image sequence, a solid or a placeholder, or remove it (None). useProxy switches between the proxy and the original (the proxy indicator in the Project panel)
| Parameter | Type | Description |
|---|---|---|
items * | array | Footage or composition item ids |
color | string | solid: colour, "#RRGGBB" or "rgb(r,g,b)" |
duration | number | placeholder: seconds. Default the item's duration, or 10 |
file | string | file, sequence: absolute path (one item only) |
forceAlphabetical | boolean | sequence: Force alphabetical order. Default false |
frameRate | number | placeholder: frames per second. Default the item's rate, or 30 |
height | integer | solid, placeholder: pixels. Default the item's height |
name | string | solid, placeholder: name. Default the item's name |
pixelAspect | number | solid: pixel aspect ratio. Default the item's |
proxy | string | What becomes the proxy; none removes it. Omit to only switch useProxy |
useProxy | boolean | Use the proxy (true) or the original (false) everywhere in the project |
width | integer | solid, placeholder: pixels. Default the item's width |
create_proxy Create Proxy
Queue a composition to render as its own proxy (File > Create Proxy > Still or Movie): adds a Render Queue item whose post-render action is Set Proxy. Render it with render_queue
| Parameter | Type | Description |
|---|---|---|
kind * | string | still: one frame; movie: the whole composition |
outputFile * | string | Absolute path of the proxy file; the extension should match the output module |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
outputModule | string | Output module template. Default "Photoshop" for a still when it exists, otherwise the default template |
renderSettings | string | Render settings template, e.g. "Draft Settings" |
time | number | still: the frame, in seconds. Default the current time |
create_footage_item Create Footage Item
Add a footage item without adding a layer: a colour-bar placeholder for footage that is not available yet (File > Import > Placeholder) or a solid (File > Import > Solid), optionally into a folder
| Parameter | Type | Description |
|---|---|---|
kind * | string | What to add |
name * | string | Item name |
color | string | solid: colour, "#RRGGBB" or "rgb(r,g,b)" |
duration | number | placeholder: seconds. Default 10 |
folder | integer | Put the item in this folder (id) |
frameRate | number | placeholder: frames per second. Default 30 |
height | integer | Pixels. Default 1080 |
pixelAspect | number | solid: pixel aspect ratio. Default 1 |
width | integer | Pixels. Default 1920 |
reload_footage Reload Footage
Re-read footage items from disk so changes made in other applications appear (File > Reload Footage)
| Parameter | Type | Description |
|---|---|---|
items * | array | Footage item ids (from list_items or get_footage_info) |
open_footage Open Footage
Open a footage item in the Footage panel, reveal its file in Finder or Explorer (Reveal in Finder / Reveal in Explorer) or in Adobe Bridge (File > Reveal in Bridge), or open it in the application that made it (Edit > Edit Original). With target bridge and no item, opens Adobe Bridge (File > Browse in Bridge)
| Parameter | Type | Description |
|---|---|---|
target * | string | Where to open it |
item | integer | Footage item id. Optional only for target bridge |
detect_scene_edits Detect Scene Edits
Find the cuts in video footage layers (Layer > Scene Edit Detection) and add a marker at each, split the layer at each cut, or split and pre-compose each scene; none only returns the cut times
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
mode | string | markers: Create Layer Markers; split: Split Layer; split_precomp: Split Layer and Create Pre-comps; none: report the cuts only. Default markers |
paste_svg_as_shapes Paste SVG As Shapes
Paste SVG artwork from the clipboard (for example copied from Illustrator) into a composition as shape layers (Edit > Paste). Opens the composition first
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
create_comp Create Comp
Create a composition (Composition > New Composition) with a size, pixel aspect, duration, frame rate and background colour, optionally in a folder, and open it
| Parameter | Type | Description |
|---|---|---|
duration * | number | Seconds |
frameRate * | number | Frames per second |
height * | integer | Pixels |
name * | string | |
width * | integer | Pixels |
adaptiveSampleLimit | integer | Motion blur Adaptive Sample Limit |
backgroundColor | string | "#RRGGBB" or "rgb(r,g,b)" (0-255) |
dropFrame | boolean | Drop Frame timecode (29.97 and 59.94 fps); false is Non-Drop Frame |
folder | integer | Folder id |
frameBlending | boolean | Timeline switch: Enable Frame Blending for the composition |
hideShyLayers | boolean | Timeline switch: Hide Shy Layers |
motionBlur | boolean | Enable motion blur for the composition |
pixelAspect | number | Default 1 |
preserveNestedFrameRate | boolean | Preserve frame rate when nested or in render queue |
preserveNestedResolution | boolean | Preserve resolution when nested |
resolution | string | Resolution: full, half, third or quarter |
resolutionFactor | array | Custom resolution: render every [x, y]th pixel |
samplesPerFrame | integer | Motion blur Samples Per Frame |
shutterAngle | number | |
shutterPhase | number | Motion blur Shutter Phase, degrees |
startFrame | integer | Start Frame: the number shown for the first frame, when the project counts frames |
startTimecode | number | Start Timecode: the time shown for the first frame, in seconds |
workAreaDuration | number | Seconds |
workAreaStart | number | Seconds |
set_comp_settings Set Comp Settings
Change a composition's settings (Composition > Composition Settings): name, size, pixel aspect, duration, frame rate, resolution, start timecode or frame, drop-frame timecode, background, motion blur (shutter angle and phase, samples), nesting options and work area; and its Timeline switches Enable Frame Blending and Hide Shy Layers
| Parameter | Type | Description |
|---|---|---|
adaptiveSampleLimit | integer | Motion blur Adaptive Sample Limit |
backgroundColor | string | "#RRGGBB" or "rgb(r,g,b)" (0-255) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
dropFrame | boolean | Drop Frame timecode (29.97 and 59.94 fps); false is Non-Drop Frame |
duration | number | Seconds |
frameBlending | boolean | Timeline switch: Enable Frame Blending for the composition |
frameRate | number | Frames per second |
height | integer | Pixels |
hideShyLayers | boolean | Timeline switch: Hide Shy Layers |
motionBlur | boolean | Enable motion blur for the composition |
name | string | |
pixelAspect | number | Default 1 |
preserveNestedFrameRate | boolean | Preserve frame rate when nested or in render queue |
preserveNestedResolution | boolean | Preserve resolution when nested |
resolution | string | Resolution: full, half, third or quarter |
resolutionFactor | array | Custom resolution: render every [x, y]th pixel |
samplesPerFrame | integer | Motion blur Samples Per Frame |
shutterAngle | number | |
shutterPhase | number | Motion blur Shutter Phase, degrees |
startFrame | integer | Start Frame: the number shown for the first frame, when the project counts frames |
startTimecode | number | Start Timecode: the time shown for the first frame, in seconds |
width | integer | Pixels |
workAreaDuration | number | Seconds |
workAreaStart | number | Seconds |
duplicate_comp Duplicate Comp
Duplicate a composition (Edit > Duplicate), optionally renaming the copy
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
name | string |
precompose Precompose
Pre-compose layers into a new composition (Layer > Pre-compose), moving all attributes or leaving them in the original
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
name * | string | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
moveAllAttributes | boolean | Move all attributes into the new composition. Default true |
open_comp Open Comp
Open a composition in the Composition panel and make it the active one
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
add_comp_marker Add Comp Marker
Add a composition marker at a time, with a comment, duration, chapter and web link
| Parameter | Type | Description |
|---|---|---|
time * | number | Seconds |
chapter | string | |
comment | string | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
duration | number | Seconds |
url | string |
save_frame Save Frame
Save one frame of a composition as a PNG file (Composition > Save Frame As)
| Parameter | Type | Description |
|---|---|---|
outputFile * | string | Absolute .png path |
time * | number | Seconds |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
create_comp_from_items Create Comp From Items
Make compositions from footage or compositions in the Project panel (File > New Comp from Selection): one per item, or one holding them all, sized and timed from an item, optionally with the layers in sequence and added to the Render Queue
| Parameter | Type | Description |
|---|---|---|
items * | array | Project item ids (from list_items) |
addToRenderQueue | boolean | Add each new composition to the Render Queue |
mode | string | each: one composition per item (the default); single: one composition with every item as a layer, the first on top |
name | string | single: the composition name; default the first item's name |
overlap | number | sequenceLayers: seconds each layer overlaps the one before |
sequenceLayers | boolean | single: place the layers one after another in time |
stillDuration | number | Seconds for still images. Default 5 |
useDimensionsFrom | integer | single: the item id whose size and frame rate the composition takes; default the first item |
run_comp_command Run Comp Command
Composition and work-area commands: Trim Comp to Work Area, Crop Comp to Region of Interest (needs a region drawn in the Composition panel), Set Poster Time, Lift Work Area and Extract Work Area (on the given layers, or all), set the work area to the layers' span, Composition Flowchart, and Reveal Composition in Project. The menu commands make the composition active
| Parameter | Type | Description |
|---|---|---|
action * | string | The command |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | lift_work_area, extract_work_area and work_area_to_layers: the layers (default all; for work_area_to_layers the selection, else the whole composition). Which layers. Give indexes (1-based, from list_l… |
time | number | set_poster_time: seconds; default the current time |
edit_markers Edit Markers
Composition and layer markers (Layer > Add Marker, the Marker dialog): list, add (or set a numbered composition marker 0-9), edit comment, duration, chapter, web link, cue point, label and protected region, remove one or all, move the current time to a marker, or Update Markers From Source. Give layers for layer markers; omit them for composition markers
| Parameter | Type | Description |
|---|---|---|
action * | string | list, add, update, remove, remove_all, go_to, update_from_source (layers whose source has markers) |
at | add: where to put the marker; update, remove, go_to: the marker at this time. Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
chapter | string | |
comment | string | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
cuePointName | string | |
duration | number | Seconds |
eventCuePoint | boolean | Cue point type: true event, false navigation |
frameTarget | string | Web link frame target |
label | integer | Label colour (0 none) |
layers | object | Layer markers on these layers; omit for composition markers. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
marker | integer | update, remove, go_to: the marker's number in time order (1 = first), instead of at |
number | integer | Composition markers: the numbered marker 0-9 (add moves it if it exists; update, remove, go_to find it) |
parameters | object | Cue point parameters, name to value |
protectedRegion | boolean | Protected region (composition markers with a duration) |
url | string | Web link |
list_layers List Layers
List a composition's layers, top to bottom, with index, id, type, switches, timing, parent, blending mode and track matte. Indexes are what other tools take
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
add_layer Add Layer
Add a layer (Layer > New): solid, null, adjustment, text, shape, camera or light, or a project item (footage or composition) as a layer, at the top of the composition
| Parameter | Type | Description |
|---|---|---|
type * | string | |
color | string | Solid and adjustment colour. Default white |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
duration | number | Seconds; default the composition duration |
height | integer | |
item | integer | type item: the project item id to add |
lightType | string | type light. Default point |
name | string | |
text | string | type text: the text |
width | integer | Solid size; default the composition size |
set_layer_properties Set Layer Properties
Set layer switches and timing: name, comment, enabled (video), audio, solo, shy, lock, 3D, motion blur, adjustment layer, effects (Effect switch), Collapse Transformations / Continuously Rasterize, Preserve Underlying Transparency, quality and sampling (Bilinear, Bicubic), blending mode (or step to the next or previous one), Auto-Orient, label, in and out points, start time, stretch
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
adjustmentLayer | boolean | |
audioEnabled | boolean | |
autoOrient | string | Layer > Transform > Auto-Orient: off, along_path, towards_camera (3D layers; cameras and lights toward their point of interest), characters_toward_camera (3D text) |
blendingMode | string | |
collapseTransformation | boolean | Collapse Transformations (pre-compositions) or Continuously Rasterize (vector layers) |
comment | string | Text for the Comments column |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
cycleBlendingMode | string | Step to the next or previous blending mode in the menu (Shift+= and Shift+-) |
effectsActive | boolean | Effect switch: render the layer's effects |
enabled | boolean | |
guideLayer | boolean | |
inPoint | number | Seconds |
label | integer | |
locked | boolean | |
motionBlur | boolean | |
name | string | |
outPoint | number | Seconds |
preserveTransparency | boolean | Preserve Underlying Transparency |
quality | string | |
sampling | string | Layer > Quality sampling at Best quality |
shy | boolean | |
solo | boolean | |
startTime | number | Seconds |
stretch | number | Time stretch percent; negative reverses |
threeD | boolean |
set_transform Set Transform
Set layer transform values without keyframes: anchor point, position, scale (percent), rotation (degrees), opacity (percent), and 3D orientation and rotations. Animated properties are set at the current time
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
anchorPoint | array | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
opacity | number | |
orientation | array | 3D layers |
position | array | Pixels from the top-left |
rotation | number | |
scale | array | Percent per axis |
xRotation | number | |
yRotation | number |
parent_layers Parent Layers
Parent layers to another layer (or remove the parent), keeping their current position on screen, or with jump (Alt/Option while parenting): the child takes the parent's transform and jumps to it
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
jump | boolean | Parent with jump: keep the child's transform values relative to the new parent instead of its place on screen. Default false |
parent | integer | Parent layer index; omit to remove the parent |
set_track_matte Set Track Matte
Use another layer as a layer's track matte (alpha, alpha inverted, luma, luma inverted), or remove the matte
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
matteLayer | integer | Matte layer index |
type | string | Default alpha; none removes the matte |
arrange_layers Arrange Layers
Change the stacking order: move layers to the top, to the bottom, or before or after another layer
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
order * | string | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
relativeTo | integer | Layer index, for before and after |
duplicate_layers Duplicate Layers
Duplicate layers (Edit > Duplicate), or copy them into another composition
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
toComp | integer | Copy into this composition (id) instead |
delete_layers Delete Layers
Delete layers from a composition
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
switch_all_layers Switch All Layers
Apply a switch to every layer in a composition (Layer > Switches): Unlock All Layers, Show All Video, or Hide Other Video (turn video off for every layer except the given ones)
| Parameter | Type | Description |
|---|---|---|
action * | string | unlock_all, show_all_video, or hide_other_video |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | hide_other_video: the layers to keep visible. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
open_layer Open Layer
Open a layer (Layer > Open Layer) in the Layer panel, open its source (Layer > Open Layer Source: footage in the Footage panel, a pre-composition in the Composition panel), or select its source item in the Project panel (Reveal Layer Source In Project)
| Parameter | Type | Description |
|---|---|---|
layers * | object | One layer. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
target | string | layer (Layer panel, the default), source, or reveal_source |
select_layers Select Layers
Change which layers are selected in the Timeline: select given layers (by number, as typing it on the keypad), add or remove them, invert the selection, select children of parents, move the selection to the next or previous layer or extend it, select all or none
| Parameter | Type | Description |
|---|---|---|
action * | string | set, add, remove (toggle with layers); children (of layers, or of the selection); invert; next, previous, extend_next, extend_previous (from the selection); all; none |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | For set, add, remove and children. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
trim_layers Trim Layers
Trim or extend layers' In or Out point to a time (Alt+[ and Alt+]: trim to the current time), or trim a set of layers together so the earliest In point or latest Out point lands there, keeping their offsets. Trimming never changes the source
| Parameter | Type | Description |
|---|---|---|
edge * | string | Which end to trim |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
asSet | boolean | Trim the layers as a set: the earliest In (or latest Out) point goes to the time and the others keep their offsets. Default false |
at | Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
move_layers Move Layers
Move layers in time without changing their length: put the In or Out point at a time ([ and ]: the current time; or the composition start or end), alone or as a set keeping offsets; nudge by frames (Alt+Page Up/Down) or seconds; stagger them in order (Quick Offset); or slip-edit the source under fixed In and Out points
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
mode * | string | in_point_to, out_point_to (use at), offset (by frames or seconds), stagger (each layer one step later than the one before, in the order given), slip (move the source by frames or seconds inside the In… |
asSet | boolean | in_point_to and out_point_to: move the layers together so the earliest In point (or latest Out point) lands on the time. Default false |
at | Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
frames | integer | offset, stagger, slip: frames (negative is earlier) |
seconds | number | offset, stagger, slip: seconds instead of frames |
split_layers Split Layers
Split layers at a time (Edit > Split Layer): each becomes two layers, the original ending at the time and a duplicate above it starting there, both keeping all keyframes
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
at | Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
reframe_layers Reframe Layers
Fit, centre or flip layers (Layer > Transform): Fit to Comp, Fit to Comp Width, Fit to Comp Height, Center In View, Center Anchor Point in Layer Content, Flip Horizontal, Flip Vertical. The fit and centre commands select the layers and make their composition active
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
replace_layer_source Replace Layer Source
Replace layers' source with another footage item or composition (Alt/Option-drag in the Project panel), keeping their properties, effects and keyframes
| Parameter | Type | Description |
|---|---|---|
item * | integer | The new source: a project item id (from list_items) |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
fixExpressions | boolean | Update expressions that refer to the old source name. Default true |
set_solid_settings Set Solid Settings
Change a solid layer's solid (Layer > Solid Settings): name, colour and size, either for every layer that uses the solid (Affect All Layers That Use This Solid) or for these layers only, through a new solid
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
affectAllLayers | boolean | Change the solid itself, so every layer using it changes (default true); false gives these layers a new solid |
color | string | "#RRGGBB" or "rgb(r,g,b)" (0-255) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
height | integer | Pixels |
name | string | Solid name |
width | integer | Pixels |
set_layer_styles Set Layer Styles
Add Photoshop-style layer styles (Layer > Layer Styles: Drop Shadow, Inner Shadow, Outer Glow, Inner Glow, Bevel and Emboss, Satin, Color Overlay, Gradient Overlay, Stroke), Remove All, Convert to Editable Styles, and set Blending Options (Global Light, Fill Opacity, channels, Blend Interior Styles as Group, Use Blend Ranges from Source). The style commands select the layers and make their composition active; set each style's own values with set_property
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
add | array | Styles to add |
blending | object | Blending Options (present once a layer has a style) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
convertToEditable | boolean | Turn styles merged from a Photoshop layer into editable styles (Convert to Editable Styles) |
removeAll | boolean | First remove every layer style (Remove All) |
choose_layer_tool Choose Layer Tool
Choose a layer tool in the Tools panel: Rotation, Pan Behind (Anchor Point) or Selection, for the user's next drag in the Composition panel. To rotate or move an anchor point from here, use set_transform
| Parameter | Type | Description |
|---|---|---|
tool * | string | rotation, pan_behind or selection |
remap_layer_time Remap Layer Time
Time remapping (Layer > Time): enable or disable it, Freeze Frame at a time, Freeze On Last Frame (extend the layer to the composition end holding its last frame), hold one frame between two times and then resume, or set Time Remap keyframes saying which source time shows at each composition time (as the Layer panel's remap marker does)
| Parameter | Type | Description |
|---|---|---|
action * | string | enable, disable, freeze_frame (at), freeze_on_last_frame, hold (from, to), set_keyframes (keyframes) |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
at | freeze_frame: the frame to hold. Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
from | number | hold: composition time (seconds) whose frame is held |
keyframes | array | set_keyframes: Time Remap keyframes |
to | number | hold: composition time (seconds) where playback resumes |
set_frame_blending Set Frame Blending
Frame blending (Layer > Frame Blending): set layers to Off, Frame Mix or Pixel Motion (the layer's Frame Blending switch), and turn the composition's Enable Frame Blending switch on or off, without which layer frame blending is not previewed
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
compSwitch | boolean | The composition's Enable Frame Blending switch |
layers | object | Layers based on motion footage or compositions. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
mode | string | For the layers: off, frame_mix or pixel_motion |
stretch_layers Stretch Layers
Time-stretch layers (Layer > Time > Time Stretch, the Stretch column): to a percentage or a new length, holding the In point, the current time or the Out point in place; or stretch so the In or Out point lands on a time (Ctrl/Cmd+Shift+, and +.). Optionally keep keyframes at their original times, or conform the source footage's frame rate instead
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
at | Seconds, or "current_time" (the default), "comp_start" or "comp_end" | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
conformFrameRate | number | Instead of stretching: conform the layers' source footage to this frame rate (Interpret Footage; 0 uses the file's rate). Affects every layer using that footage |
duration | number | New length between In and Out points, seconds |
edge | string | Stretch so this end lands on at, keeping the other end in place |
holdInPlace | string | percent and duration: which point stays put. Default in_point |
keepKeyframeTimes | boolean | Leave keyframes at their composition times instead of stretching them with the layer |
percent | number | Stretch factor percent (100 is normal speed, 200 half speed, negative plays backwards) |
align_video_to_data Align Video To Data
Align Video to Data (Layer > Time): offset video layers in time by the frame counts their names have in a data layer's mgJSON videoSyncTimeList. Selects the data layer and the video layers and makes the composition active
| Parameter | Type | Description |
|---|---|---|
dataLayer * | integer | Index of the mgJSON data layer |
layers * | object | The video layers to align. Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
get_property Get Property
Read a layer property: its value, keyframes (time, value, interpolation) and expression. Properties are named by a shortcut or a path of match names or names; this includes the Data group of a data-driven layer
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
time | number | Also read the value at this time (seconds) |
set_property Set Property
Set a property's value, as in the Timeline or Properties panel (layer Transform, shape, camera and light options, effect properties): with no time and no keyframes the static value, otherwise a keyframe at the time (or the current time). Text layers' Source Text takes a string
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
value * | A number, an array of numbers, text, or true/false | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
time | number | Seconds: set a keyframe at this time |
set_keyframes Set Keyframes
Add keyframes to a property at several times, with their values, and optionally the interpolation (linear, bezier, hold) and easing (Easy Ease influence and speed) for each
| Parameter | Type | Description |
|---|---|---|
keyframes * | array | |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
remove_keyframes Remove Keyframes
Remove keyframes from a property: all of them, or those between two times
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
from | number | Seconds |
to | number | Seconds |
set_expression Set Expression
Write an expression on a property, as typed in the expression editor (or clear it with an empty string), and report any expression error After Effects finds. The expression can use the whole expression language: global objects (thisComp, thisLayer, time, value), time conversion, vector math, random numbers, interpolation (linear, ease), colour conversion and other math; comp, footage, layer (sub-objects, general, properties, 3D, space transforms), camera, light, effect, mask, property, project, key, marker and path attributes and methods; dropdown menu attributes; text style objects for per-ch…
| Parameter | Type | Description |
|---|---|---|
expression * | string | Expression source; "" removes it |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
enabled | boolean | Default true |
convert_expression_to_keyframes Convert Expression To Keyframes
Bake a property's expression into a keyframe on every frame and switch the expression off, keeping its text (Animation > Keyframe Assistant > Convert Expression to Keyframes). Keyframes already in the span are replaced
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
from | number | Start (seconds). Default the layer's in point |
to | number | End (seconds). Default the layer's out point |
set_expression_engine Set Expression Engine
Choose the engine that evaluates the project's expressions (File > Project Settings > Expressions): javascript (the default, faster, modern syntax) or extendscript (Legacy ExtendScript, for old expressions)
| Parameter | Type | Description |
|---|---|---|
engine * | string | javascript or extendscript |
edit_keyframes Edit Keyframes
Change existing keyframes of a property (Animation > Keyframe Interpolation, Keyframe Velocity, Keyframe Assistant, the Graph Editor buttons and the keyframe context menu): interpolation presets such as Easy Ease, Easy Ease In/Out, Auto Bezier, Continuous Bezier, Linear and Toggle Hold Keyframe; incoming and outgoing interpolation and ease (speed and influence of the Bezier handles); Rove Across Time; motion path tangents; keyframe colour label; the value of every chosen keyframe (Edit Value); and Time-Reverse Keyframes. keys.times adds a keyframe where none exists, holding the value there, as…
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
property * | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
easeIn | object | Incoming temporal ease (Keyframe Velocity dialog, Graph Editor handle): speed and influence for every dimension |
easeOut | object | Outgoing temporal ease: speed and influence for every dimension |
inInterpolation | string | Incoming interpolation |
keys | object | Which keyframes of the property: those matching any of indexes, the from/to time range, times or selected. Omit for all of them |
label | integer | Keyframe colour label, 0 (none) to 16 |
outInterpolation | string | Outgoing interpolation |
preset | string | linear, bezier, auto_bezier, continuous_bezier, hold (both sides), toggle_hold (outgoing Hold, or back to Auto Bezier), easy_ease, easy_ease_in, easy_ease_out |
roving | boolean | Rove Across Time (spatial properties; the first and last keyframes never rove) |
spatialAutoBezier | boolean | Auto Bezier on the motion path (spatial properties only) |
spatialContinuous | boolean | Continuous Bezier on the motion path (spatial properties only) |
spatialTangents | object | Motion path direction handles, relative to the keyframe, in pixels (spatial properties only) |
temporalAutoBezier | boolean | Auto Bezier in time |
temporalContinuous | boolean | Continuous Bezier in time |
timeReverse | boolean | Time-Reverse Keyframes: mirror the chosen keyframes in time within their span (done before the other changes) |
value | New value for every chosen keyframe: a number, an array of numbers, text or true/false |
select_keyframes Select Keyframes
Select or deselect keyframes of a property in the Timeline panel, or deselect every keyframe, property and property group (Edit > Deselect All in the Timeline). Selected keyframes are what run_animation_command's keyframe commands act on
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
deselectAll | boolean | First deselect every keyframe, property and property group on the layers |
keys | object | Which keyframes of the property: those matching any of indexes, the from/to time range, times or selected. Omit for all of them |
layers | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true. With deselectAll and no layers, every layer |
mode | string | replace (default): only these keyframes of the property are selected; add; remove |
property | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… |
go_to_keyframe Go To Keyframe
Move the current time to the previous, next, first or last keyframe (the keyframe navigator arrows, J and K): of one property, or of every animated property of the layers (the selected layers by default)
| Parameter | Type | Description |
|---|---|---|
direction * | string | Where to go |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true. Default the selected layers |
property | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… |
copy_animation Copy Animation
Copy from one layer's property to properties on other layers: its keyframes (Edit > Copy and Paste, or Paste Reverse Keyframes with reverse), its expression only (Edit > Copy Expression Only), or a link: an expression on each target that follows the source, as Edit > Copy With Property Links then Paste, or dragging the expression pick whip, would write
| Parameter | Type | Description |
|---|---|---|
from * | object | The source |
to * | object | The targets |
what * | string | keyframes, expression (the expression only), or link (a property link expression) |
keys | object | With what: keyframes, which source keyframes. Which keyframes of the property: those matching any of indexes, the from/to time range, times or selected. Omit for all of them |
reverse | boolean | With what: keyframes, paste them in reverse time order (Paste Reverse Keyframes) |
time | number | With what: keyframes, where the first pasted keyframe lands (seconds). Default the source times |
separate_dimensions Separate Dimensions
Separate a Position property into X, Y (and Z) Position so each can be keyframed alone, or join them again (Animation > Separate Dimensions)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
property | A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display names from the… | |
separate | boolean | true separates, false joins. Default true |
sequence_layers Sequence Layers
Arrange layers one after another in time, in the order given, optionally overlapping with an opacity dissolve (Animation > Keyframe Assistant > Sequence Layers)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true. The first plays first |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
overlap | number | Seconds each layer overlaps the one before. Default 0 |
start | number | When the first layer starts (seconds). Default its current in point |
transition | string | With an overlap: off (default), dissolve_front (the upper layer fades), or cross_dissolve (both fade) |
run_animation_command Run Animation Command
Run an Animation or Timeline command that acts on the selection: Enable Auto-keyframe (toggle), Select Equal / Previous / Following Keyframes, Select Keyframe Label Group (and its On Selected Layers, On All Layers and Visible Keyframes variants), Keyframe Assistant > Exponential Scale, RPF Camera Import and Create Keyframes from Data, Reveal in Timeline, Reveal Properties with Animation, Reveal All Modified Properties and Reveal Expression Errors. Select keyframes first with select_keyframes; layers (and property) given here are selected before the command runs
| Parameter | Type | Description |
|---|---|---|
command * | string | The command |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition. It is opened in the Timeline first |
layers | object | Select only these layers first (indexes, names, or selected: true to keep the selection) |
property | With layers, also select this property (Reveal in Timeline). A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, aud… |
manage_puppet Manage Puppet
Puppet tools: add an empty Puppet effect to layers, choose a Puppet pin tool in the Tools panel (Position, Starch, Overlap, Advanced or Bend Pin) so pins can be placed in the Composition panel, duplicate a Puppet mesh, or list the meshes and pins with their paths for set_keyframes
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true. For add_effect, duplicate_mesh and list |
mesh | integer | For duplicate_mesh: the mesh number, 1 = first. Default 1 |
tool | string | For choose_tool: position, starch, overlap, advanced or bend |
list_effects List Effects
List the effects installed in After Effects with their display name, match name and category, filtered by a search string. Match names are what apply_effect takes most reliably
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
query | string |
apply_effect Apply Effect
Apply an effect to layers (Effect menu) by match name (e.g. "ADBE Gaussian Blur 2") or display name, optionally setting its properties by name, e.g. { "Blurriness": 20 }
| Parameter | Type | Description |
|---|---|---|
effect * | string | Match name or display name |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
name | string | Rename the applied effect |
properties | object | Property display names to values (numbers, arrays, booleans) |
list_layer_effects List Layer Effects
List the effects on layers, in order, with each effect's properties and values
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
remove_effects Remove Effects
Remove effects from layers by name or index, or all of them, or turn them off and on
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
effects | array | Effect names; omit for all |
enabled | boolean | Turn the effects on or off instead of removing them |
apply_preset Apply Preset
Apply an animation preset (.ffx) to layers (Animation > Apply Animation Preset)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
presetFile * | string | Absolute .ffx path |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
find_effects Find Effects
Browse the effects on the Effect menu by category (Blur & Sharpen, Distort, Generate, Expression Controls, ...) or by name, from the built-in effect catalog: display name, match name, category, the controls After Effects documents for each, and whether this After Effects has it installed (Effect menu; Effects & Presets panel)
| Parameter | Type | Description |
|---|---|---|
category | string | Only effects in this Effect menu category |
controls | boolean | Include each effect's documented controls |
limit | integer | Most effects to return |
query | string | Only effects whose display name or match name contains this text |
set_effect_controls Set Effect Controls
Apply an effect from the Effect menu to layers by display name or match name and set any of its controls by name in the same call, or set the controls of an effect already on the layers (Effect Controls panel). Values: numbers, true/false for checkboxes, [x, y] pixels for points, "#RRGGBB" for colours, a menu choice's text or number, a layer's name or index for layer controls, a mask's name for mask controls, an object for the controls inside a group, and a list of strings to replace a Dropdown Menu Control's items. With time, each value is a keyframe
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
controls | object | Control names (as in the Effect Controls panel, or match names) to values, e.g. { "Blurriness": 20, "Repeat Edge Pixels": true } |
effect | string | The effect to apply: its display name (e.g. "Fractal Noise") or match name (e.g. "ADBE Fractal Noise"); find_effects lists them |
existing | An effect already on the layer: its name in the Effect Controls panel (e.g. "Gaussian Blur 2"), its match name, or its position (1 = top) | |
name | string | Rename the effect |
time | number | Seconds: set each control as a keyframe at this time |
get_effect_controls Get Effect Controls
Read the controls of effects on layers (Effect Controls panel): each control's name, match name, type (number, menu, point, point3d, color, layer, mask, topic, group or custom; checkboxes are numbers 0 or 1), current value, menu choices, range, units, keyframe count and expression
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
effect | An effect already on the layer: its name in the Effect Controls panel (e.g. "Gaussian Blur 2"), its match name, or its position (1 = top). Omit for every effect on the layers | |
time | number | Read values at this time (seconds) instead of the current time |
organize_effects Organize Effects
Duplicate effects on their layers (Edit > Duplicate), move an effect up or down the layer's effect stack (drag in the Effect Controls panel), or copy effects with their keyframes and expressions to other layers in the composition (Edit > Copy, Edit > Paste; uses the clipboard and opens the composition in the Composition panel)
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true. For copy_to_layers, one source layer |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
effects | array | Applied effects by name, match name or position (1 = top); omit for all (one effect for move) |
position | integer | move: the new position in the stack, 1 = top |
to | object | copy_to_layers: the layers to paste the effects onto |
add_text_layer Add Text Layer
Add a text layer (Layer > New > Text, or the Horizontal and Vertical Type tools): point text, or paragraph text in a box, horizontal or vertical, optionally named and placed
| Parameter | Type | Description |
|---|---|---|
text * | string | The text; line breaks start new lines |
boxSize | array | Paragraph text: [width, height] of the box in pixels. Default half the composition size |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
kind | string | point text (default) or paragraph text in a box |
name | string | Layer name |
orientation | string | Horizontal Type tool (default) or Vertical Type tool |
position | array | [x, y] in pixels from the composition's top-left |
set_text Set Text
Set a text layer's Source Text and formatting (Character and Paragraph panels) for the whole layer or a range of characters or paragraphs: font (by PostScript name, or family and style), size, fill and stroke, tracking, kerning, leading, scale, baseline shift and super/subscript, caps, ligatures, tsume, digits, indents, spacing, justification, composer, direction and orientation, step changes, and Reset Character/Paragraph. Applies at the current time if Source Text is animated
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
adjust | object | Step changes added to the current values, as the Character panel shortcuts do (negative to decrease) |
allCaps | boolean | All Caps |
applyFill | boolean | false: No Fill Color |
applyStroke | boolean | false: No Stroke Color |
autoKerning | string | Metrics or Optical kerning, or none |
baselineDirection | string | Vertical text: standard, rotated, or tate_chuu_yoko (Tate-Chuu-Yoko) |
baselineOption | string | Superscript, Subscript or normal |
baselineShift | number | Pixels |
boxSize | array | Paragraph text: [width, height] of the box in pixels |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
composer | string | Adobe Every-line or Single-line Composer |
digits | string | Digit set, e.g. hindi for Hindi Digits |
direction | string | Paragraph text direction |
endIndent | number | Indent Right Margin, pixels |
fauxBold | boolean | Faux Bold |
fauxItalic | boolean | Faux Italic |
fillColor | string | Fill colour; turns fill on |
firstLineIndent | number | Indent First Line, pixels |
font | string | PostScript font name (find_fonts lists them) |
fontFamily | string | Font family, with fontStyle, chosen through the font list (app.fonts) |
fontSize | number | Pixels |
fontStyle | string | Font style with fontFamily, e.g. "Bold" |
hangingRoman | boolean | Roman Hanging Punctuation |
horizontalScale | number | Percent; 100 resets |
justification | string | Paragraph alignment |
kerning | number | Manual kerning, thousandths of an em |
leading | number | Pixels; turns auto leading off |
leadingType | string | Top-To-Top or Bottom-To-Bottom Leading |
ligatures | boolean | Ligatures |
lineJoin | string | Stroke line join |
lineOrientation | string | Horizontal or vertical text |
noBreak | boolean | No Break |
range | object | Format only part of the text. Character options on a paragraph range apply to its characters; paragraph options apply to whole paragraphs. Omit for the whole layer |
resetCharacter | boolean | Reset Character first (Character panel menu) |
resetParagraph | boolean | Reset Paragraph first (Paragraph panel menu) |
smallCaps | boolean | Small Caps |
spaceAfter | number | Space After Paragraph, pixels |
spaceBefore | number | Space Before Paragraph, pixels |
startIndent | number | Indent Left Margin, pixels |
strokeColor | string | Stroke colour; turns stroke on |
strokeOverFill | boolean | true: Stroke Over Fill; false: Fill Over Stroke |
strokeWidth | number | Pixels |
text | string | New text (with range: replaces the range); line breaks start new lines |
tracking | number | Thousandths of an em; 0 resets tracking |
tsume | number | Percent |
universalTextEngine | boolean | true: switch the layer to the Universal Text Engine (cannot be switched back by script) |
verticalScale | number | Percent; 100 resets |
get_text Get Text
Read text layers' Source Text: text, font (with its PostScript name, family, style and variable axes), character and paragraph formatting, point or paragraph text and box size, and where each paragraph and composed line starts and ends
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
find_fonts Find Fonts
Search the fonts After Effects can use (Character panel font menu, app.fonts) by name, or list only variable fonts or missing and substituted fonts. Returns PostScript names for set_text, families and styles, variable font axes, and the favourite and recent font lists
| Parameter | Type | Description |
|---|---|---|
limit | integer | Most fonts to return. Default 200 |
missing | boolean | List the project's missing or substituted fonts instead |
query | string | Text to find in the family, style, full or PostScript name; omit for all |
variableOnly | boolean | Only variable fonts (with design axes) |
set_font_options Set Font Options
Set the favourite font families shown in the Character panel font menu, or have After Effects rescan font folders outside the system ones (such as the Adobe local Fonts folder) for added or removed fonts
| Parameter | Type | Description |
|---|---|---|
favorites | array | Font family names: replaces the favourites list |
rescanFontFolders | boolean | Rescan non-system font folders |
set_text_options Set Text Options
Set a text layer's Path Options (text on a mask path: Reverse Path, Perpendicular To Path, Force Alignment, First and Last Margin), More Options (Anchor Point Grouping, Grouping Alignment, Fill & Stroke, Inter-Character Blending, Variable Font Spacing), Enable Per-character 3D (Animation menu) and Orient Each Character Independently (Layer > Transform > Auto-Orient)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
anchorPointGrouping | string | More Options > Anchor Point Grouping |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
fillAndStroke | string | More Options > Fill & Stroke (needs per-character 3D off) |
firstMargin | number | Path Options > First Margin, pixels |
forceAlignment | boolean | Path Options > Force Alignment |
groupingAlignment | array | More Options > Grouping Alignment, [x, y] percent |
interCharacterBlending | integer | More Options > Inter-Character Blending: 1-based position in its blending mode menu (1 = Normal) |
lastMargin | number | Path Options > Last Margin, pixels |
orientCharacters | boolean | true: Orient Each Character Independently toward the camera (turns on per-character 3D); false: turn it off |
path | integer | Path Options > Path: the index of a mask on the same layer; 0 for none |
perCharacter3D | boolean | Enable Per-character 3D |
perpendicularToPath | boolean | Path Options > Perpendicular To Path |
reversePath | boolean | Path Options > Reverse Path |
variableFontSpacing | integer | More Options > Variable Font Spacing: 1-based position in its menu; present only when a variable font axis is animated |
set_text_animator Set Text Animator
Add a text animator (Animation > Animate Text) with its properties (position, scale, rotation, opacity, fill colour, tracking, blur, character value, variable font axes, All Transform Properties...) and selectors (Animation > Add Text Selector: Range, Wiggly, Expression) with their settings; or add properties and selectors to an existing animator, or change an existing selector. A new animator without selectors gets a Range selector, as in the Animate menu
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
animator | An existing animator to change: its 1-based index or name (list_text_animators). Omit to add a new animator | |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
fontAxes | array | Variable font axes to animate (Animate Text > Variable Font Axes) |
name | string | Name for the animator |
properties | object | Animator properties to add (or set, when already there), each to a value or true for its default. Numbers or [x, y, z] arrays; *_color take "#RRGGBB". Keys: anchor_point, position, scale, skew, skew_a… |
selectors | array | Selectors to add, or with selector: n, to change |
list_text_animators List Text Animators
List text layers' animators (Text > Animator groups) with their properties and values and their selectors
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
remove_text_animators Remove Text Animators
Remove text animators from text layers: chosen ones by index or name, or all of them (Animation > Remove All Text Animators)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
all | boolean | Remove every animator |
animators | array | Animators to remove: 1-based indexes or names |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
convert_text_layers Convert Text Layers
Convert layers with a Layer menu command: Create Shapes from Text (new shape layers with the outlines), Create Masks from Text (a solid with a mask per character), or Convert to Editable Text (Photoshop text layers to After Effects text). Selects the layers and runs the command in their composition
| Parameter | Type | Description |
|---|---|---|
action * | string | shapes: Create Shapes from Text; masks: Create Masks from Text; editable: Convert to Editable Text |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
show_text_panels Show Text Panels
Show the Character or Paragraph panel (Window > Character, Window > Paragraph), or toggle both text panels
| Parameter | Type | Description |
|---|---|---|
panel * | string | character, paragraph, or toggle (show or hide both) |
add_mask Add Mask
Add a mask to layers: a rectangle or ellipse from bounds, or a path from points, all in the layer's own pixel coordinates; with its mode, feather, opacity, expansion and inversion
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
bounds | object | Rectangle or ellipse bounds |
closed | boolean | Path: closed. Default true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
expansion | number | Pixels |
feather | number | Pixels |
inverted | boolean | |
mode | string | Default add |
name | string | |
opacity | number | |
points | array | Path points [[x, y], ...] |
shape | string | Default rectangle |
list_masks List Masks
List the masks on layers (Timeline panel, Masks group): index, name, mode, inversion, lock, colour, RotoBezier, motion blur, feather falloff, feather, opacity, expansion, selection and vertex count; optionally each path's vertices, tangents and feather points
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
masks | object | Which masks on each layer: indexes (1-based, as in the Timeline) or names. Omit for every mask |
paths | boolean | Include each mask path: vertices, tangents, closed and variable-width feather points. Default false |
set_masks Set Masks
Change masks on layers (Layer > Mask): mode, inversion, lock (or lock every other mask: Lock Other Masks; unlock them all: Unlock All Masks), outline colour, RotoBezier, Motion Blur (same as layer, on, off), Feather Falloff (smooth, linear), feather, opacity, expansion, name and selection
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
color | string | Mask outline colour in the viewers and Timeline, "#RRGGBB" or "rgb(r,g,b)" |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
expansion | number | Mask expansion in pixels |
feather | number | Feather in pixels, both directions |
featherFalloff | string | Feather falloff curve (Layer > Mask > Feather Falloff) |
inverted | boolean | Invert the mask |
lockOthers | boolean | Lock every other mask on the layer (Lock Other Masks) |
locked | boolean | Lock or unlock the masks (false with masks omitted: Unlock All Masks) |
masks | object | Which masks on each layer: indexes (1-based, as in the Timeline) or names. Omit for every mask |
mode | string | Mask mode |
motionBlur | string | Mask motion blur (Layer > Mask > Motion Blur) |
name | string | Rename the mask (one mask per layer only) |
opacity | number | Mask opacity, percent |
rotoBezier | boolean | RotoBezier: curves calculated through the vertices |
selected | boolean | Select or deselect the masks |
manage_masks Manage Masks
Delete masks (or all of them: Layer > Masks > Remove All Masks), duplicate them (Edit > Duplicate), select them or move the selection to the next or previous mask, toggle Layer > Mask > Hide Locked Masks, or limit an effect to masks (the effect's Compositing Options > Mask Reference)
| Parameter | Type | Description |
|---|---|---|
action * | string | delete (every mask when masks is omitted), duplicate, select (only these), select_next or select_previous (from the selected mask on each layer), toggle_hide_locked (Hide Locked Masks on the layers),… |
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
effect | string | integer | reference_in_effect: the effect on the layer, by name or 1-based index in the Effect Controls panel |
masks | object | Which masks on each layer: indexes (1-based, as in the Timeline) or names. Omit for every mask |
set_bezier_path Set Bezier Path
Edit a mask path or a shape layer's Path property: replace its vertices and tangents, make another vertex the first (Layer > Mask and Shape Path > Set First Vertex), reverse its direction, move, scale and rotate all its points about an anchor (as Free Transform Points does), or set variable-width feather points on a mask (Mask Feather tool: extent, tension, Hold, inner or outer). Points are in the layer's own pixels; tangents are relative to their vertex; vertex and segment numbers start at 0
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
allKeyframes | boolean | Apply firstVertex, reverse, transform or featherPoints to every keyframe of an animated path |
closed | boolean | With vertices: closed path. Default true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
featherPoints | array | Masks: replace the variable-width feather points ([] removes them) |
firstVertex | integer | Make this vertex (0-based) the first one of a closed path |
inTangents | array | With vertices: in tangents relative to each vertex; default none |
mask | string | integer | The mask, by name or 1-based index |
outTangents | array | With vertices: out tangents relative to each vertex; default none |
property | Instead of mask: a shape layer Path property, a path of match names or names from the layer, e.g. ["ADBE Root Vectors Group", "Shape 1", "ADBE Vectors Group", "Path 1", "ADBE Vector Shape"] | |
reverse | boolean | Reverse the order of the vertices (the path direction) |
time | number | Seconds: set a keyframe at this time. Default: the static value, or a keyframe at the current time when the path is animated |
transform | object | Transform every point together about an anchor, as Free Transform Points does |
vertices | array | Replace the path: vertices [[x, y], ...] |
list_shape_content List Shape Content
List a shape layer's Contents (Timeline panel): groups, paths, fills, strokes and path operations as a tree with their type and match name, optionally with every property value
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which shape layers: indexes (1-based), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
group | array | The group to work in: names or 1-based indexes of nested groups from the layer's Contents, e.g. ["Shape 1"]. Omit for Contents itself |
values | boolean | Include each item's property values. Default false |
add_shape_content Add Shape Content
Add shapes to shape layers (the Timeline panel's Add menu), or to a new shape layer: groups (which can hold items of their own), rectangle, ellipse, polystar and free paths, fill, stroke, gradient fill and gradient stroke, and the path operations Merge Paths, Offset Paths, Pucker & Bloat, Repeater, Round Corners, Trim Paths, Twist, Wiggle Paths, Wiggle Transform and Zig Zag, each with its settings. Items are added in order at the end of the group. Gradient colours are set in the Gradient Editor
set_shape_content Set Shape Content
Change settings of existing shape items: group Transform and Blend Mode; rectangle, ellipse, polystar and path geometry and Reverse Path Direction; fill and stroke colour, opacity, Stroke Width, Line Cap, Line Join, Dashes, Taper, Wave, Fill Rule and Composite; gradient type, Start and End Point and Highlight; and the path operations' settings (Merge Paths Mode, Repeater copies, offset and composite, Trim Multiple Shapes, Offset Paths copies, Zig Zag points, Wiggle Paths correlation, ...). Each option must apply to every item named
arrange_shape_content Arrange Shape Content
Rearrange shape items in a group: delete, duplicate, move to a position, Group Shapes (wrap the items in a new group), Ungroup Shapes (dissolve groups) or Convert To Bezier Path (turn a rectangle, ellipse or polystar into a free path). Grouping, ungrouping and converting open the composition and run the Layer > Mask and Shape Path command on the items
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do with the items |
items * | array | Items in the group, by name or 1-based index |
layers * | object | Which shape layers: indexes (1-based), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
group | array | The group to work in: names or 1-based indexes of nested groups from the layer's Contents, e.g. ["Shape 1"]. Omit for Contents itself |
toIndex | integer | move: the new 1-based position in the group |
create_shapes_from_vector_layer Create Shapes From Vector Layer
Convert Illustrator, PDF or SVG footage layers to shape layers (Layer > Create > Create Shapes from Vector Layer). Each new shape layer is placed above its source, which is turned off
| Parameter | Type | Description |
|---|---|---|
layers * | object | Vector footage layers: indexes (1-based), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
select_drawing_tool Select Drawing Tool
Choose the active tool in the Tools panel (shape and mask tools: Rectangle, Rounded Rectangle, Ellipse, Polygon, Star; Pen, Add Vertex, Delete Vertex, Convert Vertex, Mask Feather; Brush, Clone Stamp, Eraser; Roto Brush, Refine Edge; or Selection), and/or open the Paint, Brushes or Content-Aware Fill panel (Window menu, which toggles a panel that is already open). Drawing with the tool is then done by hand in the Composition or Layer panel
| Parameter | Type | Description |
|---|---|---|
panel | string | Panel to open from the Window menu |
tool | string | Tool to make active |
list_paint_strokes List Paint Strokes
List the paint strokes on layers (Paint effects made with the Brush, Clone Stamp and Eraser tools) and the Roto Brush & Refine Edge effects, with every setting's name and value, so set_paint_strokes and set_roto_brush can address them
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
set_paint_strokes Set Paint Strokes
Change or keyframe existing paint strokes (Paint effect, Timeline panel): Start and End (write-on), colour, diameter, hardness, opacity, flow and the other brush settings, a clone stroke's Clone Position, Clone Time and Clone Time Shift, the stroke's Transform, and the effect's Paint on Transparent. Strokes themselves are drawn by hand with the Brush, Clone Stamp or Eraser tool
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
anchorPoint | array | Stroke Transform: Anchor Point [x, y] |
angle | number | Brush angle, degrees |
clonePosition | array | Clone strokes: Clone Position [x, y], where the stroke samples from |
cloneTime | number | Clone strokes: Clone Time, seconds |
cloneTimeShift | number | Clone strokes: Clone Time Shift, seconds |
color | string | Brush colour, "#RRGGBB" or "rgb(r,g,b)" |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
diameter | number | Diameter, pixels |
effect | string | integer | Which effect, by name or 1-based index in the Effect Controls panel; omit for every one of its kind on the layer |
end | number | End, percent (animate it to write the stroke on) |
flow | number | Flow, percent |
hardness | number | Hardness, percent |
opacity | number | Opacity, percent |
paintOnTransparent | boolean | The Paint effect's Paint on Transparent switch |
position | array | Stroke Transform: Position [x, y] |
rotation | number | Stroke Transform: Rotation, degrees |
roundness | number | Roundness, percent |
scale | array | Stroke Transform: Scale [x, y] percent |
spacing | number | Spacing, percent |
start | number | Start, percent of the stroke drawn from |
strokes | array | Strokes by name (e.g. "Brush 1", "Clone 2") or 1-based index; omit for every stroke |
time | number | Seconds: set keyframes at this time (animates the strokes). Default: static values, or keyframes at the current time on animated properties |
set_roto_brush Set Roto Brush
Set the Roto Brush & Refine Edge effect's settings on layers (Effect Controls panel): propagation (Search Radius, View Search Radius, Motion Threshold, Motion Damping, Edge Detection, Enable Classic Controls, Use Alternate Color Estimation), matte (Feather, Contrast, Shift Edge, Reduce Chatter, Smooth) for the Roto Brush or Refine Edge matte, and refinement (Fine-tune Refine Edge Matte, Extend Where Smoothed, Increase Radius, View Map). Settings are found by their English names. Segmentation strokes and propagation are done by hand with the Roto Brush and Refine Edge tools
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
effect | string | integer | Which effect, by name or 1-based index in the Effect Controls panel; omit for every one of its kind on the layer |
matte | string | Which matte group feather, contrast, shiftEdges, reduceChatter and smooth apply to. Default roto |
properties | object | Any other setting of the effect by name or match name, to a number or true/false |
settings | object | Settings to change |
time | number | Seconds: set keyframes at this time |
list_render_templates List Render Templates
List the render settings and output module templates (Edit > Templates) available for queueing
queue_render Queue Render
Add a composition to the Render Queue (Composition > Add to Render Queue) with a render settings template, an output module template and an output file, optionally a time span, a single frame (Composition > Save Frame As > File) or as a pre-render that imports the result and replaces the composition's uses (Composition > Pre-render)
| Parameter | Type | Description |
|---|---|---|
outputFile * | string | Absolute output path; the extension should match the output module |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
duration | number | Seconds |
frame | number | Render only the frame at this time (seconds), as Save Frame As > File does; not with start or duration |
outputModule | string | Output module template, e.g. "High Quality", "H.264 - Match Render Settings - 15 Mbps" |
preRender | boolean | Pre-render: after rendering, import the file and replace the composition's uses with it. Default false |
renderSettings | string | Render settings template, e.g. "Best Settings" |
start | number | Seconds |
render_queue Render Queue
Render every queued item in After Effects (blocks until done; raise AFTEREFFECTS_SCRIPT_TIMEOUT_MS for long renders), or send the queue to Adobe Media Encoder
| Parameter | Type | Description |
|---|---|---|
mediaEncoder | boolean | Queue in Adobe Media Encoder instead. Default false |
startEncoding | boolean | Media Encoder: start encoding at once. Default true |
manage_render_queue Manage Render Queue
Read the Render Queue, or remove, duplicate (Edit > Duplicate in the Render Queue panel), or turn items on and off for rendering
| Parameter | Type | Description |
|---|---|---|
action * | string | list, remove, duplicate (copies go to the end of the queue), enable, disable, or clear the whole queue |
items | array | 1-based queue indexes |
get_render_item Get Render Item
Read Render Queue items in full (Render Queue panel): status, start and elapsed render time, log level, notification, time span, every render setting and every output module's format, file, file name template, post-render action and settings, by the names set_render_settings and set_output_module accept
| Parameter | Type | Description |
|---|---|---|
items | array | 1-based queue indexes; omit for every item |
set_render_settings Set Render Settings
Change Render Queue items' render settings (Render Settings dialog): apply a template (Best Settings, Draft Settings, DV Settings, Multi-Machine Settings or your own), set quality, resolution, disk cache, proxies, effects, solo switches, guide layers, colour depth, frame blending, field rendering, 3:2 pulldown, motion blur, time span, frame rate and Skip Existing Files, the log level and the completion notification, and optionally save the result as a template
| Parameter | Type | Description |
|---|---|---|
items * | array | 1-based queue indexes |
colorDepth | string | "Color Depth": Current Settings, 8 bits per channel, 16 bits per channel or 32 bits per channel |
diskCache | string | "Disk Cache": Read Only or Current Settings |
duration | number | Custom time span duration, seconds |
effects | string | "Effects": Current Settings, All On or All Off |
fieldRender | string | "Field Render": Off, Upper Field First or Lower Field First |
frameBlending | string | "Frame Blending": Current Settings, On for Checked Layers or Off for All Layers |
frameRate | Frame rate: a number of frames per second, or "comp" for the composition's rate | |
guideLayers | string | "Guide Layers": Current Settings (render guide layers in the top composition) or All Off |
logType | string | Log: errors only, plus settings, or plus per-frame information |
motionBlur | string | "Motion Blur": Current Settings, On for Checked Layers or Off for All Layers |
notify | boolean | Send a Creative Cloud notification when this item finishes (the Notify checkbox) |
proxyUse | string | "Proxy Use": Current Settings, Use All Proxies, Use Comp Proxies Only or Use No Proxies |
pulldown | string | "3:2 Pulldown": Off or a phase such as WSSWW |
quality | string | "Quality": Current Settings, Best, Draft or Wireframe |
resolution | string | "Resolution": Current Settings, Full, Half, Third, Quarter or Custom |
saveAsTemplate | string | Save the first item's resulting render settings as a template with this name |
settings | object | Any other settings by the English name After Effects gives them (get_render_item shows the settable names and current values), e.g. { "Quality": "Best" } |
skipExistingFiles | boolean | Skip frames already in the output folder, so several computers can render one image sequence |
skipFrames | integer | Frames to skip between rendered frames for quick tests; 1 renders on twos |
soloSwitches | string | "Solo Switches": Current Settings or All Off |
start | number | Custom time span start, seconds |
template | string | Render settings template applied first, e.g. "Best Settings", "Draft Settings", "DV Settings", "Multi-Machine Settings" (list_render_templates lists them) |
timeSpan | string | "Time Span": Length of Comp, Work Area Only or Custom |
set_output_module Set Output Module
Change, add or remove a Render Queue item's output module (Output Module Settings dialog, Composition > Add Output Module): template or output format (QuickTime, AVI, H.264, image sequences such as PNG, TIFF, JPEG, OpenEXR, DPX, Targa, Photoshop, SGI, IFF, Radiance, or audio as AIFF, MP3, WAV), output file and file name template, channels, depth, colour, starting frame number, resize, crop, audio output, project link, source XMP metadata and post-render action, and optionally save it as a template. Codecs such as GoPro CineForm are chosen through a template made in Edit > Templates > Output Mo…
| Parameter | Type | Description |
|---|---|---|
item * | integer | 1-based Render Queue index |
add | boolean | Add a new output module to the item and change that one (Composition > Add Output Module). Default false |
audio | object | Audio output |
channels | string | "Channels": RGB, Alpha or RGB + Alpha |
color | string | "Color": Premultiplied (Matted) or Straight (Unmatted) |
crop | object | Crop pixels from the edges (negative values add pixels) |
depth | string | "Depth", e.g. Millions of Colors, Millions of Colors+, Trillions of Colors, Floating Point |
fileTemplate | string | File name template from the Output To menu, e.g. "[compName]_[#####].[fileExtension]" |
format | string | Output format: applies the first output module template that writes it |
includeProjectLink | boolean | Embed a link back to the After Effects project |
includeSourceXmp | boolean | Copy XMP metadata from the source footage into the output |
outputFile | string | Absolute output path. For image sequences include frame-number signs, e.g. frame_[#####].png |
outputModule | integer | 1-based output module of the item. Default 1 |
postRenderAction | string | After rendering: nothing, import the file, import it and replace the composition's uses, or set it as the composition's proxy |
remove | boolean | Remove the output module (the item keeps at least one). Default false |
resize | object | Resize the output |
saveAsTemplate | string | Save the resulting output module as a template with this name |
settings | object | Any other settings by the English name After Effects gives them (get_render_item shows the settable names and current values), e.g. { "Quality": "Best" } |
startingNumber | integer | First frame number of an image sequence ("Starting #"); turns off Use Comp Frame Number |
template | string | Output module template, e.g. "High Quality", "Lossless", "H.264 - Match Render Settings - 15 Mbps" (list_render_templates lists them) |
useCompFrameNumber | boolean | Number sequence frames from the composition's frame numbers |
control_render_queue Control Render Queue
Show or hide the Render Queue panel (Window > Render Queue), pause, continue or stop a render in progress, turn the whole-queue completion notification on or off, and read progress: each item's status, start time and elapsed time
| Parameter | Type | Description |
|---|---|---|
action | string | Default status. pause, continue and stop act on the render in progress |
notify | boolean | Send a Creative Cloud notification when the whole queue finishes |
configure_render_engine Configure Render Engine
Turn Multi-Frame Rendering on or off with a CPU limit for the next render, start, pause, continue or end Watch Folder mode (File > Watch Folder: After Effects then renders projects saved into the folder and stops taking other work), and report whether this After Effects is a render-only engine
| Parameter | Type | Description |
|---|---|---|
folder | string | start: absolute path of the folder to watch |
maxCpuPercent | integer | Most CPU Multi-Frame Rendering may use, 1-100. Default 100 |
multiFrameRendering | boolean | Use Multi-Frame Rendering |
watchFolder | string | Watch Folder mode |
set_camera_options Set Camera Options
Set camera layer options (Layer > Camera Settings, and Camera Options in the Timeline): zoom, F-Stop, depth of field, focus distance, aperture, blur level, iris shape, rotation, roundness, aspect ratio and diffraction fringe, highlight gain, threshold and saturation, and Point of Interest. Values are keyframed when the property is animated or a time is given
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which camera layers. Give indexes (1-based, from list_layers), names, or selected: true |
aperture | number | Aperture in pixels; larger blurs more |
blurLevel | number | Blur Level, percent |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
depthOfField | boolean | Depth of Field on or off; the Advanced 3D renderer renders it in-engine |
fStop | number | F-Stop (Camera Settings): sets Aperture to Zoom divided by the F-Stop. Not with aperture |
focusDistance | number | Focus Distance in pixels |
highlightGain | number | Highlight Gain |
highlightSaturation | number | Highlight Saturation |
highlightThreshold | number | Highlight Threshold, percent |
irisAspectRatio | number | Iris Aspect Ratio |
irisDiffractionFringe | number | Iris Diffraction Fringe |
irisRotation | number | Iris Rotation, degrees |
irisRoundness | number | Iris Roundness, percent |
irisShape | string | Iris Shape |
pointOfInterest | array | Point of Interest [x, y, z] in pixels, for two-node cameras and lights |
time | number | Seconds: set keyframes at this time. Omit to set the static value, or a keyframe at the current time when the property is already animated |
zoom | number | Zoom: pixels from the camera to the image plane (sets the angle of view and focal length) |
set_light_options Set Light Options
Set light layer options (Layer > Light Settings, and Light Options in the Timeline): light type, intensity, colour, cone angle and feather, falloff type, radius and falloff distance, casts shadows, shadow darkness and diffusion, Point of Interest, and an environment light's source layer. Values are keyframed when the property is animated or a time is given
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which light layers. Give indexes (1-based, from list_layers), names, or selected: true |
castsShadows | boolean | Casts Shadows (spot, parallel and environment lights). Layers also need Material Options > Casts Shadows on |
color | string | Light colour: "#RRGGBB" or "rgb(r,g,b)" (0-255) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
coneAngle | number | Cone Angle in degrees (spot lights) |
coneFeather | number | Cone Feather, percent (spot lights) |
falloff | string | Falloff type |
falloffDistance | number | Falloff Distance in pixels |
intensity | number | Intensity, percent; negative removes light |
lightSource | integer | Environment lights: index of the 2D layer in the same composition to light the scene with (Light Options > Source) |
lightType | string | Light Type |
pointOfInterest | array | Point of Interest [x, y, z] in pixels, for two-node cameras and lights |
radius | number | Radius in pixels, where light is at full intensity before falloff |
shadowDarkness | number | Shadow Darkness, percent |
shadowDiffusion | number | Shadow Diffusion in pixels |
time | number | Seconds: set keyframes at this time. Omit to set the static value, or a keyframe at the current time when the property is already animated |
set_material_options Set Material Options
Set a 3D layer's Material Options: casts shadows (off, on, only), light transmission, accepts shadows (off, on, only: a shadow catcher), accepts lights, ambient, diffuse, specular intensity and shininess, metal, appears in reflections, reflection intensity, sharpness and rolloff, transparency and its rolloff, and index of refraction. Also turns a layer into an environment layer (Layer > Environment Layer). Values are keyframed when the property is animated or a time is given
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which 3D layers. Give indexes (1-based, from list_layers), names, or selected: true |
acceptsLights | boolean | Accepts Lights: off leaves the layer unlit |
acceptsShadows | string | Accepts Shadows: off, on, or only (shadows alone, for a shadow catcher) |
ambient | number | Ambient, percent |
appearsInReflections | string | Appears in Reflections: off, on, or only |
castsShadows | string | Casts Shadows: off, on, or only (the shadow without the layer) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
diffuse | number | Diffuse, percent |
environmentLayer | boolean | Layer > Environment Layer: use this footage or precomposition layer as the spherical environment for reflections (Cinema 4D renderer; Advanced 3D uses environment lights instead) |
indexOfRefraction | number | Index of Refraction |
lightTransmission | number | Light Transmission, percent |
metal | number | Metal, percent |
reflectionIntensity | number | Reflection Intensity, percent |
reflectionRolloff | number | Reflection Rolloff, percent |
reflectionSharpness | number | Reflection Sharpness, percent |
specularIntensity | number | Specular Intensity, percent |
specularShininess | number | Specular Shininess, percent |
time | number | Seconds: set keyframes at this time. Omit to set the static value, or a keyframe at the current time when the property is already animated |
transparency | number | Transparency, percent (separate from layer Opacity) |
transparencyRolloff | number | Transparency Rolloff, percent |
set_geometry_options Set Geometry Options
Set a 3D layer's Geometry Options: extrude and bevel text and shape layers (bevel style, bevel depth, hole bevel depth, extrusion depth) or bend footage and precomposition layers (curvature, segments). Extrusion needs the Advanced 3D or Cinema 4D renderer (set_comp_3d_settings). Values are keyframed when the property is animated or a time is given
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which 3D layers. Give indexes (1-based, from list_layers), names, or selected: true |
bevelDepth | number | Bevel Depth in pixels (text and shape layers) |
bevelStyle | string | Bevel Style (text and shape layers) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
curvature | number | Curvature, percent (footage and precomposition layers) |
extrusionDepth | number | Extrusion Depth in pixels (text and shape layers) |
holeBevelDepth | number | Hole Bevel Depth, percent of Bevel Depth (text and shape layers) |
segments | number | Segments, the facets of a curved layer (footage and precomposition layers) |
time | number | Seconds: set keyframes at this time. Omit to set the static value, or a keyframe at the current time when the property is already animated |
set_comp_3d_settings Set Comp 3d Settings
Choose a composition's 3D renderer (Composition Settings > 3D Renderer: Classic 3D, Advanced 3D or Cinema 4D) and turn Draft 3D on or off (Composition panel). With no settings it reports the renderer, the installed renderers, Draft 3D and the active camera
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
draft3d | boolean | Draft 3D: preview the scene in real time at draft quality |
renderer | string | classic_3d, advanced_3d, cinema_4d, or a renderer id from this tool's renderers list |
set_3d_view Set 3d View
Change the 3D view of a composition's Composition panel (View menu): switch to the active camera, front, left, top, back, right, bottom or a custom view (View > Switch 3D View) or the last view, reset the view, look at the selected or all layers, or create a camera from the current view. Opens the composition in the viewer first
| Parameter | Type | Description |
|---|---|---|
action | string | Instead of a view: View > Reset 3D View, Look at Selected Layers, Look at All Layers, or Create Camera from 3D View |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
view | string | The view to switch to (View > Switch 3D View; last = View > Switch to Last 3D View) |
run_camera_command Run Camera Command
Run a Layer > Camera or Layer > Light command on a layer: link the focus distance to the Point of Interest or to another layer, set the focus distance to another layer once, create an orbit null, create a stereo 3D rig (whose Stereo 3D Controls set_property can change), or create cameras or lights from a 3D model layer. Selects the layers the command needs first
| Parameter | Type | Description |
|---|---|---|
command * | string | |
layer * | integer | The camera layer index (focus, orbit null and stereo commands) or the 3D model layer index (create cameras or lights) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
target | integer | link_focus_to_layer and set_focus_to_layer: the layer to focus on |
set_camera_tool Set Camera Tool
Choose a camera navigation tool in the Tools panel: the Unified Camera tool, Orbit (around the cursor, the scene or the camera's Point of Interest), Pan (Track XY) or Dolly (Track Z). Navigating with the tool in a viewer is done by hand
| Parameter | Type | Description |
|---|---|---|
tool * | string | orbit, pan and dolly are the camera-centred variants |
set_essential_graphics Set Essential Graphics
Open a composition in the Essential Graphics panel as its primary composition (Composition > Open in Essential Graphics), set the template name, rename controls, and list the controls
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
open | boolean | Open the composition in the Essential Graphics panel. Default true |
renameControls | array | Controls to rename |
templateName | string | Template name shown in the panel and in Premiere Pro; also the exported file name |
add_essential_graphics_controls Add Essential Graphics Controls
Add controls to a composition's Essential Graphics panel (Animation > Add Property to Essential Graphics): properties such as Source Text, colours, sliders, checkboxes, angles, 2D points and scale, Dropdown Menu Controls (optionally setting their menu items) and 3D shadow colour, or footage and precomposition layers as media replacement. A nested composition then shows them as Essential Properties
| Parameter | Type | Description |
|---|---|---|
controls * | array | Controls to add, in order |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
add_protected_region Add Protected Region
Protect part of a composition's timing so it keeps its length when the composition is nested or the template is stretched (Composition > Responsive Design - Time > Create Intro, Create Outro or Create Protected Region from Work Area), or protect a custom span: a composition marker with Protected Region on
| Parameter | Type | Description |
|---|---|---|
region * | string | intro: the first 15% of the duration; outro: the last 15%; work_area; custom: start and duration |
comment | string | Marker comment |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
duration | number | custom: duration, seconds |
start | number | custom: start, seconds |
export_motion_graphics_template Export Motion Graphics Template
Export a composition as a Motion Graphics template (.mogrt) (File > Export > Export As Motion Graphics Template) to the Local Templates Folder or a folder on a local drive. The file is named after the template name
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
folder | string | Absolute folder to save into. Omit for the Local Templates Folder (Essential Graphics templates) |
overwrite | boolean | Replace a file of the same name. Default false |
templateName | string | Set the template name (and file name) first. Default: the current template name, or the composition name |
start_tracking Start Tracking
Set up tracking from the Animation menu on one layer: Track Motion (adds a point tracker and opens the layer in the Layer panel), Track Mask (the mask tracker for the chosen masks), Track this Property (a track that drives the chosen property), Paste Mocha mask (Edit menu), Track in Boris FX Mocha; or open the Tracker panel or the Motion Tracking workspace (Window menu). The analysis itself runs from the Tracker panel; read and edit the resulting track points with get_tracking_data and set_track_point
| Parameter | Type | Description |
|---|---|---|
action * | string | track_motion, track_mask, track_property, paste_mocha_mask, track_in_mocha, tracker_panel (Window > Tracker) or workspace (Motion Tracking workspace) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layers | object | The layer: one index (1-based, from list_layers), name, or selected: true |
masks | array | track_mask: mask indexes (1-based); omit for every mask on the layer |
property | track_property: the property the track drives. A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or… | |
time | number | Move the current time here first (tracking starts from the current time) |
apply_warp_stabilizer Apply Warp Stabilizer
Apply Warp Stabilizer VFX to layers (Animation > Warp Stabilizer VFX), or change the one already applied, and set its controls: Result, Smoothness, Method, Preserve Scale, Framing, Auto-scale, Additional Scale, Detailed Analysis, Rolling Shutter Ripple, Crop Less <-> Smooth More, synthesis options, Objective, Target Layer, Track Point Size, Auto-delete Points and Hide Warning Banner. After Effects analyses the layer in the background after the effect is added or its analysis settings change
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
actionSafeMargin | number | Auto-scale > Action-Safe Margin percent |
addNew | boolean | Add another instance even when the layer already has Warp Stabilizer. Default false: change the existing one |
additionalScale | number | Additional Scale percent |
autoDeletePoints | boolean | Advanced > Auto-delete Points Across Time |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
cropLessSmoothMore | number | Advanced > Crop Less <-> Smooth More percent |
detailedAnalysis | boolean | Advanced > Detailed Analysis |
framing | string | Framing: how moving edges are handled |
hideWarningBanner | boolean | Advanced > Hide Warning Banner |
maximumScale | number | Auto-scale > Maximum Scale percent |
method | string | Method: the most complex stabilization allowed |
objective | string | Objective: stabilize, reverse, or apply the motion to a target layer |
preserveScale | boolean | Preserve Scale |
result | string | Result: smooth the camera move or remove it |
rollingShutterRipple | string | Advanced > Rolling Shutter Ripple |
smoothness | number | Smoothness percent (Smooth Motion) |
synthesisEdgeCropping | object | Advanced > Synthesis Edge Cropping, pixels trimmed from each edge |
synthesisEdgeFeather | number | Advanced > Synthesis Edge Feather |
synthesisInputRange | number | Advanced > Synthesis Input Range, seconds |
targetLayer | integer | Target Layer index for the apply_motion_to_target objectives |
trackPointSize | number | Advanced > Track Point Size percent |
apply_camera_tracker Apply Camera Tracker
Track the camera of footage layers (Animation > Track Camera): apply the 3D Camera Tracker effect, or change the one already applied, and set Solve Method, Detailed Analysis, Auto-delete Points Across Time and Hide Warning Banner. After Effects analyses the layer in the background; creating a camera or content from the solved points is done in the Composition panel
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
addNew | boolean | Add another instance even when the layer already has 3D Camera Tracker. Default false: change the existing one |
autoDeletePoints | boolean | Advanced > Auto-delete Points Across Time |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
detailedAnalysis | boolean | Advanced > Detailed Analysis |
hideWarningBanner | boolean | Advanced > Hide Warning Banner |
solveMethod | string | Advanced > Solve Method: a hint about the scene |
get_tracking_data Get Tracking Data
Read tracking results from layers: each tracker's track points (Feature Center, Feature Size, Search Offset, Search Size, Confidence, Attach Point, Attach Point Offset), or the Face Measurements and Face Track Points that detailed face tracking records, at a time and optionally every keyframe
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
keyframes | boolean | Also list each property's keyframes (time and value) |
limit | integer | Most keyframes per property |
source | string | trackers (Motion Trackers) or face (the face-tracking effects) |
time | number | Read values at this time in seconds. Default: the current time |
set_track_point Set Track Point
Edit a track point on a layer's tracker (created by start_tracking track_motion): Feature Center, Feature Size, Search Offset, Search Size, Attach Point and Attach Point Offset, in pixels. With a time, or when the property is already keyframed, it sets a keyframe; otherwise the static value
| Parameter | Type | Description |
|---|---|---|
layers * | object | The layer: one index (1-based, from list_layers), name, or selected: true |
attachPoint | array | Attach Point [x, y] |
attachPointOffset | array | Attach Point Offset [x, y] from the feature centre |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
featureCenter | array | Feature Center [x, y] |
featureSize | array | Feature Size [width, height] |
point | Track point index (1-based) or name, e.g. "Track Point 1". Default 1 | |
searchOffset | array | Search Offset [x, y] from the feature centre |
searchSize | array | Search Size [width, height] |
time | number | Set keyframes at this time in seconds |
tracker | Tracker index (1-based) or name, e.g. "Tracker 1". Default 1 |
get_color_management Get Color Management
Read the project's colour settings (File > Project Settings > Color): bit depth, working colour space, working gamma, Linearize Working Color Space, Blend Colors Using 1.0 Gamma and Compensate for Scene-referred Profiles, and optionally the ICC colour profiles that can be the working space
| Parameter | Type | Description |
|---|---|---|
listProfiles | boolean | Also list the colour profiles available as working spaces |
query | string | Only profiles whose description contains this text (case-insensitive) |
set_color_management Set Color Management
Change the project's colour settings (File > Project Settings > Color): bit depth (8, 16 or 32 bpc, where 32 is high dynamic range float), working colour space (a profile from get_color_management, or "" for None), working gamma, Linearize Working Color Space, Blend Colors Using 1.0 Gamma and Compensate for Scene-referred Profiles
| Parameter | Type | Description |
|---|---|---|
bitsPerChannel | integer | Bit depth: 8, 16 or 32 (floating point, high dynamic range) |
compensateForSceneReferredProfiles | boolean | Compensate for Scene-referred Profiles |
linearBlending | boolean | Blend Colors Using 1.0 Gamma |
linearizeWorkingSpace | boolean | Linearize Working Color Space |
workingGamma | number | Working gamma when the working space is None |
workingSpace | string | Working colour space: a profile description from get_color_management listProfiles, or "" for None |
set_display_color Set Display Color
Display colour in the Composition panel (View menu): turn Use Display Color Management on or off (the command toggles it; scripts cannot read its state), choose a Simulate Output preset (display colour management must be on), or open the Lumetri Scopes panel. Applies to the composition opened in the viewer
| Parameter | Type | Description |
|---|---|---|
action * | string | toggle_display_color_management, simulate_output or lumetri_scopes |
comp | object | Open this composition in the viewer first. Omit to use the active viewer |
output | string | simulate_output: the output to simulate (none turns simulation off) |
apply_color_effect Apply Color Effect
Apply a colour effect (Effect > Color Correction or Utility) to layers, or to a new adjustment layer at the top of the composition so it affects everything below and final renders: Lumetri Color, Curves, Levels, Hue/Saturation, Exposure and other grading effects; Broadcast Colors to keep output broadcast-safe; Color Profile Converter to simulate an output type in renders. Set controls by display name with properties
| Parameter | Type | Description |
|---|---|---|
effect * | string | The colour effect |
adjustmentLayer | boolean | Apply to a new adjustment layer spanning the composition, at the top |
broadcastLocale | string | broadcast_colors: Broadcast Locale |
broadcastMethod | string | broadcast_colors: How To Make Color Safe |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
layerName | string | Name of the new adjustment layer. Default: the effect name |
layers | object | Apply to these layers. Which layers. Give indexes (1-based, from list_layers), names, or selected: true. Omit with adjustmentLayer: true |
maxSignalIre | number | broadcast_colors: Maximum Signal Amplitude (IRE) |
properties | object | Control display names to values (numbers, arrays, booleans; menus take their 1-based item number), e.g. { "Exposure": 0.5 } |
purge_caches Purge Caches
Free memory or disk cache (Edit > Purge): all memory and disk cache, all memory, undo history, image cache memory, snapshots, all disk cache, all 3D cache, or all cache. Purging undo means earlier steps can no longer be undone
| Parameter | Type | Description |
|---|---|---|
targets * | array | What to purge, in order |
run_edit_command Run Edit Command
Run an Edit menu command: Undo or Redo (several steps back or forward through Edit > History), Cut, Copy, Paste, Select All, Deselect All, or Select Label Group. They act on the focused panel and its selection; give comp to focus that composition first. Copied layers can be pasted into Premiere Pro
| Parameter | Type | Description |
|---|---|---|
command * | string | The Edit menu command |
comp | object | Focus this composition's viewer first (item id or name). Omit to act on whatever panel has focus |
times | integer | Undo or Redo: how many steps. Default 1 |
get_aftereffects_info Get After Effects Info
Describe the running After Effects and the computer: version, build, language, memory in use, render-engine and watch-folder modes, operating system, the project's GPU acceleration (File > Project Settings) and the types available, whether viewer updates are paused, and the values of preference keys you name
| Parameter | Type | Description |
|---|---|---|
preferences | array | Preference keys to read from the preferences files |
set_application_settings Set Application Settings
Change application and project performance settings: memory limits (Preferences > Memory & Performance), the project's Mercury GPU acceleration (File > Project Settings), whether preferences are saved on quit, and the preferences the scripting guide documents (expand flowchart compositions, JavaScript debugger)
| Parameter | Type | Description |
|---|---|---|
expandFlowchartComps | boolean | Flowchart: expand compositions by default |
gpuAcceleration | string | Project GPU acceleration; must be one the computer offers (see get_aftereffects_info) |
imageCachePercent | number | Image cache size as a percent of memory; give with maximumMemoryPercent |
javascriptDebugger | boolean | Scripting & Expressions: enable the JavaScript debugger |
maximumMemoryPercent | number | Maximum memory After Effects may use, as a percent of installed RAM; the rest stays reserved for other applications |
savePreferencesOnQuit | boolean | Save preferences when After Effects quits |
manage_script_settings Manage Script Settings
Read, save or check a saved script setting (app.settings): text values kept in the After Effects preferences between sessions, under a section and key of your choosing. Values are stored as text, at most 1999 bytes
| Parameter | Type | Description |
|---|---|---|
action * | string | get reads the value, save stores it, has checks it exists |
key * | string | Key name |
section * | string | Section name, e.g. your script's name |
file | string | Preference file (PREFType). Default machine_specific, the "Prefs.txt" file |
value | string | save: the text to store |
quit_aftereffects Quit After Effects
Quit After Effects (After Effects > Quit, or File > Exit on Windows). Unsaved changes are refused unless you choose to save or discard them. After Effects quits a moment after the call returns
| Parameter | Type | Description |
|---|---|---|
unsavedChanges | string | What to do if the project has unsaved changes: refuse (default, the call fails), save to its file, or discard |
get_viewer_state Get Viewer State
Describe the focused viewer (Composition, Layer or Footage panel) and its views: zoom, channel, exposure, Fast Previews, transparency grid, rulers and guides; the active composition's resolution and current time; the active tool; and whether viewer updates are paused
set_view_options Set View Options
Change a viewer's view options: magnification (zoom percent, 100 for actual size), the Show Channel menu (RGB, red, green, blue, alpha, colorized, straight RGB; alpha boundary and overlay in the Layer panel), exposure, the transparency grid, Fast Previews (Off, Adaptive Resolution, Draft, Fast Draft, Wireframe), rulers, guides (show, snap, lock), which view is active, and maximizing the panel. Also the composition's resolution (Full, Half, Third, Quarter, Custom) and pausing viewer updates (Caps Lock)
| Parameter | Type | Description |
|---|---|---|
channel | string | Show Channel. alpha_boundary and alpha_overlay are Layer panel only |
comp | object | Open this composition in the Composition panel and use that viewer (item id or name). Omit both comp and layer for the focused viewer |
customResolution | object | Custom resolution: render every Nth pixel across and down |
exposure | number | Adjust Exposure, in stops; 0 resets |
fastPreview | string | Fast Previews mode (Composition panel only) |
guidesLocked | boolean | View > Lock Guides |
guidesSnap | boolean | View > Snap to Guides |
guidesVisible | boolean | View > Show Guides |
layer | integer | Open this layer (1-based, in comp or the active composition) in the Layer panel and use that viewer |
maximized | boolean | Maximize the viewer panel, or restore it |
pauseViewerUpdates | boolean | Stop viewers redrawing, as Caps Lock does |
resolution | string | Composition resolution (down-sample factor); custom takes customResolution |
rulers | boolean | View > Show Rulers |
transparencyGrid | boolean | Show the transparency checkerboard |
view | integer | Make this view (1-based, in a two- or four-view layout) active and change it. Default the active view |
zoomPercent | number | Magnification percent; 100 is actual pixels |
run_view_command Run View Command
Run a View menu or viewer command on a viewer: Zoom In, Zoom Out, Show Grid, Snap to Grid, Show Layer Controls (these toggle), the view layout (1, 2 or 4 views), Share View Options, New Viewer, or close the viewer (File > Close). Give comp to use its Composition panel; otherwise the focused viewer
| Parameter | Type | Description |
|---|---|---|
command * | string | The command |
comp | object | Open this composition in the Composition panel and use that viewer (item id or name). Omit both comp and layer for the focused viewer |
edit_comp_guides Edit Comp Guides
Add, move, remove or clear a composition's ruler guides (View > Add Guide, Edit Guide, Clear Guides). Positions are pixels from the left (vertical guides) or top (horizontal guides); guides are numbered from 1 in the order they were added
| Parameter | Type | Description |
|---|---|---|
action * | string | add a guide, move or remove guide n, or clear all guides |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
guide | integer | move, remove: the guide number (1 = first added; add returns it) |
orientation | string | add: the guide's direction |
position | number | add, move: pixels |
set_current_tool Set Current Tool
Choose the active tool in the Tools panel (selection, hand, zoom, rotation, camera orbit, pan and dolly modes, shapes, pen, type, paint, Roto Brush, puppet pins), or cycle to the next tool in a group as clicking a tool button repeatedly does. Camera tools need a camera layer
| Parameter | Type | Description |
|---|---|---|
cycle | string | Instead of tool: move to the next tool in this group |
tool | string | The tool to choose |
go_to_time Go To Time
Move a composition's current-time indicator: to a time in seconds (View > Go to Time), forward or back a number of frames (Page Down/Page Up), to the start or end, to the start or end of the work area, or to a layer's In or Out point
| Parameter | Type | Description |
|---|---|---|
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
frames | integer | Step this many frames; negative steps back (1 or 10 match the shortcuts) |
layer | integer | layer_in, layer_out: the layer (1-based) |
time | number | Seconds |
to | string | Jump to this point |
show_panel Show Panel
Open or close a panel from the Window menu: Tools, Info, Audio or Preview. Choosing an open panel's command closes it
| Parameter | Type | Description |
|---|---|---|
panel * | string | The panel |
switch_workspace Switch Workspace
Switch to a built-in workspace (Window > Workspace), or reset the current workspace to its saved layout. Custom workspaces can be chosen by name with run_menu_command
| Parameter | Type | Description |
|---|---|---|
reset | boolean | Reset the current (or chosen) workspace to its saved layout |
workspace | string | The workspace to switch to |
set_audio_levels Set Audio Levels
Set layers' Audio Levels (the Audio group, L in the Timeline) in decibels: a static value, or keyframes at times (Animation > Add Audio Levels Keyframe)
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
keyframes | array | Instead of levels: keyframes, each a time and levels |
levels | Decibels for both channels, or [left, right]; 0 leaves the audio unchanged |
remap_layer_speed Remap Layer Speed
Play layers faster or slower with time remapping (Layer > Time > Enable Time Remapping), which also raises or lowers the pitch of their audio. Replaces any Time Remap keyframes with a constant speed and moves the Out point to the new end
| Parameter | Type | Description |
|---|---|---|
layers * | object | Which layers. Give indexes (1-based, from list_layers), names, or selected: true |
speedPercent * | number | Playback speed: 100 is normal, 200 twice as fast and an octave higher, 50 half speed. Keep audio under about 200 |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
run_audio_command Run Audio Command
Run an audio command on layers: Convert Audio to Keyframes (Animation > Keyframe Assistant), which adds an Audio Amplitude layer with Slider keyframes, or Edit in Adobe Audition (Edit menu), which opens the layer's audio file in Audition when it is installed
| Parameter | Type | Description |
|---|---|---|
command * | string | The command |
layers * | object | The audio layers to select first (1-based indexes, names, or selected: true) |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
run_aftereffects_script_file Run After Effects Script File
Run an ExtendScript file in After Effects (File > Scripts > Run Script File) as one undo step with dialogs suppressed, or schedule it to run after a delay (optionally repeating) and cancel a scheduled run, or run a script listed in the File > Scripts menu by its file name. Scripts run unrestricted
| Parameter | Type | Description |
|---|---|---|
cancelTask | integer | Cancel a scheduled run by the task id it returned |
delaySeconds | number | With file: run it this long from now instead of now, and return the task id |
file | string | Absolute path to a .jsx, .jsxbin or .js file |
repeat | boolean | With delaySeconds: run again every delaySeconds until cancelled. Default false |
scriptsMenuItem | string | Run the script shown in File > Scripts with this name, e.g. "Demo Palette.jsx" |
undoName | string | Name of the undo step (Edit > Undo). Default "Run script" |
manage_motion_graphics_template Manage Motion Graphics Template
Build a Motion Graphics template from a composition (Essential Graphics panel): add layer properties as controls, name the template, open the composition in the Essential Graphics panel, or export it as a .mogrt file. Returns the template's controls
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do |
comp | object | Which composition. Give its item id (from list_items) or name; omit for the active composition |
folder | string | export: absolute folder for the .mogrt (default the Essential Graphics templates folder) |
layers | object | add_property: the layers whose property to add |
name | string | add_property: the control's name (default the property name); set_name: the template name |
overwrite | boolean | export: replace an existing file. Default false |
property | add_property: A property: a shortcut (anchor_point, position, scale, rotation, opacity, x_rotation, y_rotation, orientation, source_text, time_remap, audio_levels) or a path of match names or display… |
manage_team_project Manage Team Project
Work with Team Projects (File > Team Project): check sign-in and status, list team projects, create or open one, share your changes with a comment, get the latest changes, resolve conflicts, convert the open team project to a local .aep, or close it. Needs a Creative Cloud sign-in with Team Projects available
| Parameter | Type | Description |
|---|---|---|
action * | string | What to do; status reports sign-in and which commands are available |
comment | string | share: a comment for collaborators |
description | string | create: a description |
file | string | convert: absolute path of the .aep or .aet to write |
name | string | create, open: the team project name |
resolution | string | resolve: keep the shared version, keep it and a copy of yours, or keep yours |
aftereffects_status After Effects Status
Check that After Effects is reachable: platform, how the server addresses After Effects, whether it is running, its version and project. Use this first when a call fails to connect
| Parameter | Type | Description |
|---|---|---|
probe | boolean | Ask After Effects for its version and project (starts it if it is not running). Default true |
execute_aftereffects_code Execute After Effects Code
Run your own ExtendScript in After Effects and return its last expression. It runs unrestricted: it can change or delete anything, read or write files, and run system commands (system.callSystem, which needs Allow Scripts to Write Files and Access Network). Prefer the specific tools
| Parameter | Type | Description |
|---|---|---|
code * | string | ExtendScript (ES3) source |
help Help
List the tools by area, or describe one tool's parameters
| Parameter | Type | Description |
|---|---|---|
tool | string | A tool name |