photoshop_invert_selection
Reverses the active pixel selection so unselected areas become selected and selected areas become unselected, leaving layer pixels unchanged.
Instructions
Invert the current pixel selection: selected pixels become unselected and the rest become selected. Layer pixels are unchanged.
Use when: a selection exists and the user wants the opposite region. Do NOT use when: no selection exists — create one with photoshop_select_rectangle or photoshop_select_all. Do NOT use when: the layer colors should invert — use photoshop_invert.
Returns: confirmation that the selection was inverted. Preconditions: active document and an existing selection. Side effects: selection only. Calling twice restores the original selection. Reversible with photoshop_undo.
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. |