Module nodes

Source
Expand description

Node editor: the selected clip’s effect chain as a graph you can wire up.

Canvas with pan (middle-drag / scroll) and zoom (Ctrl+Scroll), plus a properties panel on the right showing every parameter of the picked node — that panel is the only place several kinds (Blend, Matte, Mask, Color, Clip, Random, …) can be edited at all. Each node is a rounded box: title (NodeKind::title), an enable checkbox, labelled input ports on the left, one output port on the right, and the first couple of parameters inline. An effect’s ports are its picture (port 0) then one per parameter, so a Number / Random / Math chain can drive any knob; a wired knob greys out in the panel. Drag from a port to another to connect (NodeGraph::connect refuses cycles); drag a wire off a port to disconnect; right-click a node for Delete / Duplicate / Add mask / Replace (swap in any other kind, or retarget an Asset — connections that still fit are kept); right-click the canvas for the “Add node” menu (every EffectKind grouped by category(), the graph nodes, the value nodes, then one entry per project asset — an Asset node needs a real id, so it is picked there). Ctrl+click adds/removes a node, a primary drag over empty canvas rubber-bands a group (Shift adds), dragging any picked node moves the whole selection, Delete removes it and Ctrl+C / Ctrl+V duplicates it (edges between the copied nodes come along; wires to the outside are dropped). Effects and transitions dragged out of their panels drop in as fresh, unwired nodes; a library asset dropped on empty canvas becomes an Asset node, and dropped on a node it replaces that node’s value. A clip without a graph gets a “Build a node graph from it” button rather than one being made for it: ensure_graph converts the linear stack only when asked, and from then on the renderer evaluates the graph and ignores clip.effects — far too much to do to a clip just because this pane is docked. Every mutation calls undo once per gesture.

Structs§

Edits 🔒
One gesture’s worth of widget responses: changed decides whether to write the node back, snapshot whether to push an undo entry first (drags and typing snapshot on their first frame, click-once widgets on the change itself).
NodesResponse
NodesState

Enums§

Act 🔒
One buffered mutation. The UI pass only reads the graph, so the undo snapshot can be taken between collecting these and applying them.

Constants§

HEADER_H 🔒
INLINE_PARAMS 🔒
At most this many parameters are shown on the box itself (the Inspector has the rest).
NODE_W 🔒
Node box width in graph units.
OFFSET 🔒
Duplicates and pastes land this far from the original, so they are visibly separate.
PORT_R 🔒
ROW_H 🔒
SNAP 🔒
A wire snaps to a port within this many screen px.
THUMB_H 🔒

Functions§

add_menu 🔒
“Add node”: every EffectKind under its category(), then the non-effect nodes and the project’s assets (an Asset node needs a real id, so it is picked here instead of on the node box). With target set it is the Replace menu instead: the same catalogue, swapped into an existing node.
anim 🔒
apply 🔒
Apply one buffered action; returns true when the project actually changed.
bezier 🔒
blend_ui 🔒
grid 🔒
hint 🔒
in_port 🔒
inline_row 🔒
Rows that already carry an inline widget: their port needs no painted label.
mask_ui 🔒
The mask editor, shared by the Mask node and an effect node’s own mask.
menu_entry 🔒
Menu row with a caller-chosen id (so the headless tests can find it).
node_height 🔒
node_panel 🔒
Every parameter of one node, edited on a clone and written back as a single SetKind. This is the answer to “I can’t edit properties of many nodes”: every NodeKind has an arm here.
num 🔒
num64 🔒
op_ui 🔒
out_port 🔒
paint_node 🔒
pick 🔒
Combo over (id, name) pairs — the Clip and Asset nodes’ whole editor.
row_rect 🔒
The inline widget strip on row i of a node box (row 0 sits just under the header).
show
transition_node 🔒
The nearest node to a transition: a cross fade / push / wipe is a two-input mix at any one instant, and a dip to colour is that colour.