copy_region
Copy a rectangular pixel region to a different position, layer, or frame in an Aseprite file, preserving transparent pixels.
Instructions
Copy a rectangular region of pixels to another position, layer, or frame.
Coordinates are sprite-global. Fully transparent source pixels do not overwrite destination pixels. The destination cel is created when missing.
Args: filename: Aseprite file to modify layer_name: Source layer frame_index: Source frame index starting at 1 x: Left edge of the source region y: Top edge of the source region width: Region width height: Region height dest_x: Left edge of the destination dest_y: Top edge of the destination target_layer_name: Destination layer (default: same as source) target_frame_index: Destination frame (default: same as source)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| height | Yes | ||
| dest_x | Yes | ||
| dest_y | Yes | ||
| target_layer_name | No | ||
| target_frame_index | No |