ps_clipping_mask
Clip the active Photoshop layer to the layer directly below it, using the lower layer's alpha as a mask, or release the clipping mask to restore full-canvas compositing.
Instructions
Clip or un-clip the active layer against the layer directly below it — choose with op. create: use the layer below as the alpha source; PS paints the active layer only where the layer below has pixels. Non-destructive — the upper layer is unchanged. Common for constraining a texture/photo to a shape, or masking an effect to a single underlying layer (the add_adjustment_layer tool already accepts clip_to_below for the adjustment-layer-specific case). Equivalent to Layer > Create Clipping Mask (Ctrl+Alt+G). release: the inverse — the layer returns to compositing against the whole canvas. Both ops are idempotent: create no-ops (already_clipped:true) on an already-clipped layer; release no-ops (released:false) on a non-clipped layer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | create: clip the active layer to the layer directly below it (that layer becomes the alpha source); no-ops (already_clipped:true) when the layer is already clipped. release: release the active layer from its clipping mask; no-ops (released:false) when the layer is not clipped. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clipped | No | ||
| context | No | ||
| released | No | ||
| layerName | No | ||
| already_clipped | No |