add_tag
Create an animation tag over a frame range in an Aseprite sprite, specifying direction, color, and repeats to define loops or one-shot animations.
Instructions
Create an animation tag spanning frames [from_frame, to_frame] (1-based).
Both frames must already exist: an out-of-range number is rejected with the sprite's
valid range rather than clamped to it (which used to report a tag added while
creating it over a different range).
Args:
direction: "forward" (default), "reverse", "pingpong", or "pingpong_reverse".
color: Optional tag colour, shown in the timeline.
repeats: How many times the tag plays. **0, the default, means forever**, which
is how a cycle is marked in the file; 1 is a one-shot such as an attack, a
hurt or a death. This is the sprite's own answer to whether these frames
loop, and `validate_loop` reads it: a repeated last frame is an error for a
cycle and only a warning for a one-shot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| color | No | ||
| repeats | No | Default: 0. | |
| filename | Yes | ||
| to_frame | Yes | ||
| direction | No | Default: "forward". | forward |
| from_frame | Yes |