export_layers
Export each image layer, including grouped and hidden layers, as separate PNGs. Multi-frame sprites split per frame, visibility is restored, and passing a file enables headless export.
Instructions
Export every image layer (recursing into groups) as its own PNG in
out_dir, named <sanitized-layer-name>.png. Hidden layers are
exported too; every layer's original visibility is restored afterwards,
so the document ends exactly as it started. A multi-frame sprite splits
each layer into <name>1.png, <name>2.png, ...; the returned
files lists what was actually written. Headless: pass file.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"out_dir": "<out_dir>"
},
"name": "export_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| out_dir | Yes |