apply_timing_curve
Adjust animation timing with curves that set frame durations for holds, snaps, and easing without duplicating frames.
Instructions
Give an animation a shape in time, by setting durations and never duplicating frames.
Uniform timing is the placeholder every animation starts with and almost none should
keep. A cycle holds its extremes two to four times as long as the poses it passes
through; an attack holds the anticipation, snaps through the strike in 20 to 40ms, and
holds the impact.
Args:
curve: `hold_extremes` (the ends of a cycle are held, the passing frames are not),
`attack` (anticipation, snap, impact, recovery), `ease_in` (starts slow),
`ease_out` (ends slow), or `flat` (every frame the same, to start over).
frames: The frames to time, in order. Defaults to a tag's frames, or all of them.
tag: Time one tag's frames instead of naming them.
base_ms: The duration of a passing frame. Everything else is a multiple of it.
hold_frames: Frames to hold whatever the curve says, at three times `base_ms`.
snap_frames: Frames to snap through, at the shortest duration that still registers.
A hold is a longer duration on one frame, never a repeated frame: duplicating costs a
frame, shifts every tag index, and hides the repeat from `validate_loop`. The returned
`frames_added` is always 0, and it is returned so that claim can be checked.
Easing here and easing the spacing elsewhere are the same curve applied twice, which
reads as slow motion rather than as weight. The cels are measured on the way through,
so asking for an eased curve over spacing that is already eased comes back with a
warning rather than quietly doing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| curve | No | Default: "hold_extremes". | hold_extremes |
| frames | No | ||
| base_ms | No | Default: 100. | |
| filename | Yes | ||
| hold_frames | No | ||
| snap_frames | No |