Replace layer pixels
replace_layer_imageSwaps a pixel layer's image with another file, preserving its transform, mask, and properties. Use it to replace layer content with an externally edited or generated image.
Instructions
Swaps the source pixels of a pixel layer with another image file, keeping its transform, mask and properties. Use it to round-trip a layer through an external editor or a generated image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .comp project package (a directory ending in .comp) | |
| layer | Yes | Layer UUID or its exact name | |
| imagePath | Yes | ||
| keepDisplaySize | No | true keeps the on-canvas size; false shows the new image 1:1 |