copy_from_document
Copy a pixel region from another document into the active one, preserving palette-index fidelity. Map unmatched colors by appending entries or snapping to the nearest existing.
Instructions
Copy a region of pixels from another document into this one, lossless in palette-index space — the assembly tool for multi-agent fan-out: subagents draw parts in their own documents, then a parent composes them. Source colors map to identical destination palette entries where they exist; the rest are appended ('extend', default) or snapped to the perceptually nearest existing entry ('nearest'). Placed content: ignores symmetry by default, like paste_stamp.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Destination left edge (default 0) | |
| y | No | Destination top edge (default 0) | |
| clip | No | Silently discard out-of-bounds pixels instead of rejecting (default false) | |
| frame | No | Frame index, 0-based (default: active frame) | |
| layer | No | Layer id or name (default: active layer) | |
| doc_id | Yes | Destination document id (receives the pixels and the undo step) | |
| region | No | Region in SOURCE coordinates (default: the whole source canvas) | |
| render | No | Include a render of the change (default true) | |
| palette | No | Unmatched source colors: 'extend' appends them (default), 'nearest' snaps to the closest existing entry | |
| from_frame | No | Source frame index (default: source active frame) | |
| from_layer | No | Source layer id or name (default: flattened visible layers) | |
| from_doc_id | Yes | Source document id (read-only; left unchanged) | |
| ignore_symmetry | No | Default TRUE for this tool (placed content). Pass false to mirror the copy across the symmetry axis. | |
| skip_transparent | No | Skip transparent source pixels instead of writing them (default true) |