atomicSelections & masks
photoshop_create_clipping_mask
Create a clipping mask on the active layer (or a named layer). Users often say: clip to layer below, clipping mask, clip this layer, mask to shape below. Use when: the active layer should be visible only where the layer directly below it has opaque pixels. Do NOT use when: the layer is already clipped — returns success with already_clipping. Do NOT use when: the layer is the bottom-most layer — there is no base layer to clip into. Returns: JSON { ok, summary, details: { layer_name, is_clipping, already_clipping? } }. Preconditions: active document; target layer must sit directly above the base layer below it in the same group/stack. Side effects: one history step (groupEvent).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| layer_name | string | — | Optional exact layer name (recursive search). Default: active layer. |
Community recipes
Nothing here yet. Be the first to share one.
Share a recipe