Expand description
Transitions panel. Catalogue: one CARD per TransitionKind (same size and frame as an effect card),
previewing the transition half-way over the stock picture the effect thumbnails are rendered from —
the app hands it over with set_stock, and without it a card falls back to a neutral named tile.
A card selects the kind, right-clicking it applies the transition straight away (start / end of the
selection, or every cut on its track), and a press-and-move drags DragPayload::Transition. Next to
the grid the default duration DragValue (0.1..5 s), a colour button for FadeToColor and a direction
selector for Push/Wipe. “Add at start” / “Add at end” apply it to EVERY selected clip through add_transitions,
which is also what the menu, the hotkeys and MCP call — it records the choice in TransitionsState,
so Ctrl+T (Action::AddLastTransition) repeats whatever was applied last, whichever path applied it.
A clip with no neighbour on that side gets an EDGE transition (blend from/to nothing) instead of
a cut transition, so lone clips can fade in/out too.
Below: the transitions touching the first selected clip (Project::transitions_of): kind combo,
position combo (Start / End / Last / Next — re-anchors the transition relative to the clip),
duration, colour/direction/ease editors, remove. Returns true when the project changed (call
undo once per gesture first).
Structs§
Enums§
- Pos 🔒
- Where a transition sits relative to the selected clip — the panel’s position selector.
Constants§
- PREVIEW_
P 🔒 - Half-way through the transition: enough to show the wipe/push/fade on a still card.
- STOCK 🔒
- The catalogue’s stock picture, uploaded by the app from the same source as the effect thumbnails. The handle lives here so the texture outlives the app’s own thumbnail list.
Functions§
- add_
transitions 🔒 - Add a transition at the cut left of every id (or at its right edge with
at_end), with the colour and direction fromst, and record the choice inst. A clip with no neighbour on that side gets an edge transition instead (blend from/to nothing). THE funnel: panel, menu, hotkeys and MCP all come through here (or callremember), which is what keeps Ctrl+T on the last transition actually used. Returns how many were added — a transition always belongs to the clip on the RIGHT of the cut, andProject::add_transitionreplaces the one already on that cut, so overlapping selections are fine. - dir_vec 🔒
- Where the incoming clip travels from, mirroring
compose::dir_vec(0 left, 1 right, 2 up, 3 down). - direction_
row 🔒 - drop_
at_ 🔒end - A transition card dropped on a clip at timeline time
t: which of the clip’s two cuts it means. The half you drop on picks it, so the gesture reads the same as “Add at start” / “Add at end”. Shared so the timeline’s drop highlight and the app’s drop handler cannot drift apart. - has_
left 🔒 - A clip abuts the left edge of
id, i.e. there is a cut to put a transition on. - move_
transition 🔒 - Re-anchor a transition at a new position relative to
sel, keeping its settings. Returns true when it moved (the target position must exist). - paint_
preview 🔒 - Draw the transition over the stock picture: A is the picture, B the same picture tinted, so the two sides of the cut read apart without decoding a second image.
- right_
neighbor 🔒 - The clip starting exactly where
idends, on the same track. - set_
stock - The app hands over the picture the effect catalogue renders from; the cards preview over it.
- show
- transition_
card 🔒 - One catalogue card: the preview tile with the name underneath, selected/hover border. Clicking it
selects the kind, right-clicking opens its quick actions; a deliberate press-and-move drags
DragPayload::Transition(ui::drag_source). - wipe_
rect 🔒 - The part of the tile the incoming clip has reached at
p(same regions ascompose’s wipe).