validate_loop
Measure animation frames without playback to find identical frames, uneven spacing, and loop wrap faults, returning a validation manifest with errors and warnings.
Instructions
Measure an animation and report what is wrong with it, without playing it.
Renders each frame once (one Aseprite launch), then reports per-frame hashes, content
bounding boxes, centroids, the bottom row of the drawn content, the spacing series
between frames, and the durations. On top of the numbers it checks for: a last frame
identical to the first (a loop's wrap showing one image twice), identical adjacent
frames (a pose held by repeating a frame instead of lengthening one), uniform frame
durations, a spacing series that wobbles rather than eases, a contact edge that moves,
and frames with nothing drawn on them.
Args:
tag: Limit the check to one animation tag's frames. Its repeat setting also
decides whether the seam is treated as a loop's wrap.
layer: Measure one layer's cels instead of the flattened frame, so a moving
character can be measured without the background it sits on.
loops: Override whether these frames are a cycle. One-shots (attack, hurt, death)
do not wrap, so a repeated last frame is only a warning for them.
jitter_tolerance: Pixels of spacing wobble to ignore. Integer cel positions make
1px unavoidable, so that is the default; pass 0 to see every reversal.
Returns a ``workflow_manifest.v1`` manifest (kind "validation") whose `validation`
section is `{passed, checks[], errors[], warnings[]}` and whose `animation` section
carries every measurement. `validation.passed` is the verdict and is false only for
faults that are wrong whatever the animation is doing; the rest are warnings, because
a bouncing ball is meant to leave the ground and a flicker is meant to go blank.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| layer | No | ||
| loops | No | ||
| filename | Yes | ||
| jitter_tolerance | No | Default: 1.0. |