photoshop_apply_layer_mask
Permanently apply a layer mask by baking it into the layer's pixels and removing the mask, deleting the pixels it hid. Use when the mask must stay applied, not stay editable.
Instructions
Bake the active layer mask into its pixels and remove the mask. Pixels the mask hid are deleted.
Use when: the user wants the mask permanently applied. Do NOT use when: the mask should stay editable — leave it, or create one with photoshop_create_layer_mask. Do NOT use when: the mask should be discarded without changing pixels — use photoshop_delete_layer_mask.
Returns: confirmation that the mask was applied. Preconditions: active document and an active layer that has a mask. Side effects: destroys masked-out pixels and the mask. Reversible with photoshop_undo while history holds it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |