Frames
frameManage animation sequence: list, add, duplicate, delete, reorder, or activate cels and set per-cel millisecond durations. Use count and durations to build or retime a full cycle.
Instructions
Manage animation frames. Ops: 'list', 'add', 'duplicate', 'delete', 'set_duration', 'activate', 'reorder'. Durations are milliseconds per frame and carry most of the life in a cycle — hold a contact pose longer than a pass pose. Use count to add several at once and durations to set a whole cycle's timing in one call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| count | No | ||
| frame | No | 1-based frame number. Omit to use the active frame. | |
| sprite | No | Which sprite: its id as '#7' (what every result reports back, and the only unambiguous form — two unsaved documents are both called 'Sprite'), its filename, or its display name. Omit to use the sprite Aseprite has focused. | |
| toIndex | No | For 'reorder': the 1-based position `frame` ends up at. Its cels and duration move with it; tag ranges stay where they are. | |
| linkCels | No | For 'duplicate': share the cel image instead of copying it, so edits apply to both. | |
| durations | No | Per-frame durations from frame 1, for 'set_duration'. | |
| afterFrame | No | Insert position. Default: at the end. | |
| durationMs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frames | No | ||
| sprite | Yes | ||
| frameCount | Yes | ||
| activeFrame | No | ||
| totalDurationMs | No |