Add mask
add_maskCreate rectangular, elliptical, or free-path masks on any After Effects layer, with mode, feather, opacity, expansion, and inversion controls for precise selective transparency.
Instructions
Add a mask to any layer (solid, footage, precomp, shape, text...): rect (optional rounded corners), ellipse (true bezier circle) or free path, in LAYER pixel coordinates (origin = layer top-left). Defaults to the full layer bounds. Sets mode (default add), feather, opacity, expansion, inverted, motion blur, color and name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"layer": "<layer>"
},
"name": "add_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comp | No | Composition name, 'Folder/Name' path, or item id. Omit to use the active composition. | |
| mode | No | Mask mode. | |
| name | No | Mask name (default 'Mask N'). | |
| size | No | rect/ellipse [w,h] in layer pixels. Default: full layer size (shape/text layers: their content bounds). | |
| type | No | Mask shape (default rect, or path when vertices are given). | |
| color | No | Mask outline color in the UI. | |
| layer | Yes | Layer: 1-based index, layer name, or {id}/{index}/{name}. 'selected' = first selected layer. | |
| bounds | No | Alternative to position/size: [left, top, width, height] in layer pixels. | |
| closed | No | Closed path (default true). | |
| locked | No | Lock the mask. | |
| feather | No | Mask feather px: number or [x,y]. | |
| opacity | No | Mask opacity 0-100. | |
| inverted | No | Invert the mask. | |
| position | No | rect/ellipse center in LAYER pixels (origin = layer top-left). Default: center of the layer. | |
| vertices | No | Path points [[x,y],...] (type 'path'). Coordinates relative to the group origin. | |
| expansion | No | Mask expansion px (negative shrinks). | |
| roundness | No | rect corner radius px. | |
| inTangents | No | Incoming bezier handles per vertex, RELATIVE to each vertex. Default all [0,0] (straight lines). | |
| motionBlur | No | Mask motion blur. | |
| rotoBezier | No | Use RotoBezier for the path. | |
| outTangents | No | Outgoing bezier handles per vertex, relative to each vertex. Default all [0,0]. | |
| featherFalloff | No | Feather falloff. |