Expand description
Keyframe presets, motion presets and clip templates — capture from clips and apply back. Curve presets store keys normalised to 0..1 of the clip length (stretched to the target clip’s duration when applied) or as absolute seconds (kept as saved).
Structs§
Constants§
- PROPS 🔒
- The fixed (label, property) pairs shared by capture and apply.
Functions§
- apply_
curve - Apply a curve preset to a property: normalised times are stretched to
clip_duration, absolute presets keep their seconds. Replaces existing keys.scaledis kept for the callers’ “exact” button but is only meaningful for absolute presets, which ignore the duration anyway — placing a normalised preset’s 0..1 times as seconds would crush the whole animation into the clip’s first second. Seecapture_curve: nothing but tests saves absolute. - apply_
effects - Apply a preset to
clip: a graph replaces the clip’s graph (with fresh node ids, so a lateradd_nodecannot hand out one the preset already used), a stack replaces the effects and drops the graph, which would otherwise keep shadowing them. False when the JSON is not what it claims. - apply_
motion - Apply a motion preset to a clip (properties it doesn’t have are skipped; effect params create the
effect when missing).
scaledas inapply_curve. - builtin_
motions - Built-in motion presets (slide in/out from each side, zoom in/out “Ken Burns”, pop, fade in/out, spin).
- capture_
curve - Snapshot a property’s keys as a preset (normalised unless
absolute). None if the property has no keys. - capture_
effects - Snapshot a clip’s node graph if it has one, else its effect stack. The JSON’s shape is what tells
the two apart afterwards (
EffectPreset::is_graph) — nothing else has to be stored. - capture_
motion - Capture every animated property of
clip(incl. effect params as “: ”). - capture_
template - Serialise a group of clips (+ the assets they use) into a Template (times relative to the earliest start).
- decode_
template - Decode a template into (clips, assets) ready for
Project::place_clips. None on malformed JSON. - is_
adjustment_ template - True when a template holds nothing but adjustment layers — the Presets pane gives those their own section. ponytail: decodes the JSON per frame the list is drawn; templates are a handful of small blobs, memoise if that stops being true.
- is_
container_ template - True when a template holds at least one container clip.
- merge_
curve apply_curve’s sibling: ADD the preset’s keys to what the property already has, shifted to start atoffsetseconds, so two presets can be layered on one property without hand-editing.spanis the length a normalised preset is stretched over (callers pass the clip’s remaining time so the merged keys land inside it). A preset key falling on an existing key’s time wins.- merge_
motion - Layer a motion preset on top of the clip’s existing keys, starting at clip-local
offsetand stretched over the time left in the clip (so “slide in left” then “slide in right” can be stacked). - motion 🔒
- motion_
prop 🔒 - Resolve a motion preset label to the clip’s property, creating the effect an “
: ” label needs. None for labels this clip cannot hold. - prop_of 🔒
- scaled_
keys - Convenience: keyframes of a preset scaled to
duration(used by the curve editor preview).