set_matte_source
Set (or clear) a track matte — the host shows only where the matte source is opaque. The HOST can be a leaf (image., video., shapes., text.) OR a group. (a group is a layer of sorts): a group host clips ALL its composited children to the source shape's path — e.g. a marching chevron strip + black backing shown only inside an arrow / band shape. For a leaf host the source can be any leaf (use a text. source for video-/image-filled letterforms); for a group host the source must be a shape (shapes.). Make the source layer hidden so it acts purely as the stencil. Pass null to clear.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | Host being masked: image/video/shapes/text.<id>, or group.<id>. | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. | |
| matte_inverted | No | Optional. Invert the mask (knock-out): the host shows everywhere EXCEPT where the source is opaque — a punch-through / spotlight. Honored on leaf hosts; ignored on group hosts. Omitted = preserve current; clearing the mask resets it. | |
| matte_source_id | Yes | Element id of the layer whose alpha drives the mask, or null to clear. |