Set mask path
set_mask_pathReplaces a mask's path with a rectangle, ellipse, or custom vertices, and optionally sets a Mask Path keyframe at a given time to animate the shape.
Instructions
Replace a mask's path with a rect/ellipse (position/size or bounds in layer pixels) or explicit vertices. With 'time' it sets a Mask Path keyframe (call at two times to animate).
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>",
"mask": "<mask>"
},
"name": "set_mask_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comp | No | Composition name, 'Folder/Name' path, or item id. Omit to use the active composition. | |
| mask | Yes | Mask: 1-based index or mask name (e.g. 'Mask 1'). | |
| size | No | rect/ellipse [w,h] in layer pixels. Default: full layer size (shape/text layers: their content bounds). | |
| time | No | Set a keyframe at this time. | |
| type | No | Mask shape (default rect, or path when vertices are given). | |
| 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). | |
| detail | No | Return the resulting vertices. | |
| 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. | |
| roundness | No | rect corner radius px. | |
| inTangents | No | Incoming bezier handles per vertex, RELATIVE to each vertex. Default all [0,0] (straight lines). | |
| outTangents | No | Outgoing bezier handles per vertex, relative to each vertex. Default all [0,0]. |