set-layer-mask
Create or modify a mask on a layer using a rectangle or vertex path. Define shape, mode, feather, opacity, and expansion.
Instructions
Create or modify a mask on a layer. Provide the shape as maskRect (rectangle shorthand) OR maskPath (array of [x,y] vertices, >= 3). Omit maskIndex to add a new mask, or pass it to modify an existing one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| compName | No | Composition name (or active comp if omitted). | |
| maskMode | No | Mask mode (default: 'add'). | |
| maskName | No | Optional mask name. | |
| maskPath | No | Array of [x,y] vertices defining the mask shape (>= 3 points). | |
| maskRect | No | Rectangle shorthand {top,left,width,height} in layer pixels. | |
| compIndex | No | 1-based comp index, if compName is omitted. | |
| layerName | No | Layer name (alternative to layerIndex). | |
| maskIndex | No | 1-based index of an existing mask to modify. Omit to create a new mask. | |
| layerIndex | No | 1-based layer index. | |
| maskFeather | No | Feather [x,y] in pixels. | |
| maskOpacity | No | Mask opacity 0-100. | |
| maskExpansion | No | Mask expansion in pixels. |