Function add_transitions

Source
pub(crate) fn add_transitions(
    project: &mut Project,
    ids: &[u64],
    st: &mut TransitionsState,
    kind: TransitionKind,
    dur: f64,
    at_end: bool,
) -> usize
Expand description

Add a transition at the cut left of every id (or at its right edge with at_end), with the colour and direction from st, and record the choice in st. 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 call remember), 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, and Project::add_transition replaces the one already on that cut, so overlapping selections are fine.