Module curves

Source
Expand description

Curve (graph) editor for the FIRST selected clip: x = clip-local time over [0, duration], y = value. Left: a list of the clip’s keyframeable properties (Clip::props_mut names + “Volume”/“Pan”/“Speed” + “: ” for effect params) with a colour swatch and a checkbox to show/hide each curve (auto-scaled per property; the selected property’s scale drives the y axis labels). Right: the graph — curves drawn with the eased segments (sample Animated::at every ~2 px), keys as diamonds (accent when selected), playhead line (click on the ruler strip seeks → seeked), constant (unkeyed) properties shown as a flat dashed line. Interaction: drag a key horizontally/vertically (time clamped to the clip, vertical changes the value; undo once at drag start) — the whole selection moves with it, click a key to select it, Ctrl+click adds/removes one, dragging empty graph space rubber-bands a group (like the timeline’s clip band), Delete removes the selection and Ctrl+C / Ctrl+V copy it and paste it at the playhead keeping the relative times, double-click on empty graph area adds a key for the active property at that (t, v), right-click a key → easing menu (Ease::ALL) + Delete; Ctrl+Scroll zooms the time axis, Shift+Scroll pans, plain Scroll zooms the value axis around the pointer and “Fit” frames every key. Bezier velocity handles: a Bezier segment (or any segment whose left key is selected) shows its two handles; dragging one converts the segment to Ease::Bezier.

Structs§

CurvesResponse
CurvesState

Enums§

Drag 🔒
MenuAct 🔒
Target 🔒
What the curve editor is pointed at. A bus is just another list of Animated properties over a time span, which is all this editor ever needed from a clip — so buses edit exactly like clips here.

Constants§

AVAILABLE 🔒
BUS_BASE 🔒
A bus’s properties: its own gain and pan, then every filter parameter in chain order.
HIT_PX 🔒
LIST_MAX 🔒
LIST_MIN 🔒
LIST_W 🔒
MOTIONS 🔒
PENDING 🔒
PENDING_MOTION 🔒
RULER_H 🔒
SPLIT_W 🔒
Grab width of the splitter between the property list and the graph.
T_EPS 🔒
Two keys closer than this in time are the same key (model::KEY_EPS, which is private).

Functions§

add_key_at 🔒
Add (or move) a key of the active property at clip-local time t and value v, selecting it. Used by both the double-click and the right-click-on-empty-graph gestures.
base_count 🔒
fit_view 🔒
Frame every key of the visible properties on the time axis and reset the value view.
flow_pair 🔒
Two selected clips that abut on the timeline, as (left, right).
move_group 🔒
Re-lay orig with the keys at sel shifted by (dt, dv) and write it back; returns their new indices. A moved key landing on an unmoved one replaces it, exactly like Animated::move_key.
prop_color 🔒
prop_count 🔒
prop_label 🔒
prop_mut 🔒
prop_ref 🔒
remove_key 🔒
Remove key i keeping Animated::toggle_key’s “last key becomes the constant” behaviour.
set_available_motions
The app hands the applicable motion presets (built-ins + saved) to the panel.
set_available_presets
The app hands the current Settings.curve_presets to the panel with this (cheap: only on change or every frame — the panel just reads names + the selected preset).
show
t_count 🔒
t_label 🔒
t_mut 🔒
t_ref 🔒
t_span 🔒
(start, duration) of the target on the timeline. A bus spans the whole project: its automation is absolute time, not clip-local.
take_pending_curve_preset
A curve preset captured via “Save curve preset…” waiting for the app to store it in Settings.
take_pending_motion_preset
A motion preset captured via “Save motion” waiting for the app to store it in Settings.
tick_step 🔒
“Nice” tick step so labels sit >= 70 px apart.
y_range 🔒
Auto y scale for one property: key values (or the constant) padded by 10 %.
zoomed 🔒
The value-axis view applied to a property’s auto range (pan in units of that range, so one pair of numbers drives every property’s lane whatever its units are).