Set or clear a layer mask
set_layer_maskControl layer visibility by applying or removing a grayscale raster mask, where white reveals and black hides content.
Instructions
Attaches a raster mask from a grayscale image (white reveals, black hides) to a layer, or removes the existing mask. The mask is stretched over the layer's own rectangle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .comp project package (a directory ending in .comp) | |
| layer | Yes | Layer UUID or its exact name | |
| invert | No | ||
| maskPath | No | Grayscale or any image; luminance becomes coverage. Omit to clear the mask. |