pub enum NodeOp {
Clip {},
Media {
source_id: SourceId,
start: MediaTime,
},
Generator {
generator: Generator,
},
Effect {
input: Option<NodeId>,
inputs: BTreeMap<String, Option<NodeId>>,
effect: ClipEffect,
},
Transition {
from: Option<NodeId>,
to: Option<NodeId>,
effect: ClipEffect,
progress: Animated<f32>,
},
Transform {
input: Option<NodeId>,
transform: VisualProperties,
},
Merge {
layers: Vec<MergeLayer>,
},
Matte {
input: Option<NodeId>,
matte: Option<NodeId>,
mode: MatteMode,
},
KeyMix {
backdrop: Option<NodeId>,
input: Option<NodeId>,
mask: Option<NodeId>,
opacity: Animated<f32>,
},
ShapeMask {
input: Option<NodeId>,
masks: Vec<ShapeMask>,
},
Group {
composition: CompositionId,
inputs: Vec<Option<NodeId>>,
controls: BTreeMap<String, Animated<EffectValue>>,
},
GroupInput {
index: u32,
},
}Expand description
The operation of a CompositionNode.
Animated settings are keyed in composition time (see ClipComposition).
Variants§
Clip
The picture of the clip showing the composition: its source at the time-mapped source time, or what its generated source draws. For an adjustment clip, the scene composited beneath it.
Media
Another visual source, read at start plus the composition time. Adds no sound to the
mix.
Fields
Generator
A picture the engine draws.
Effect
A registered effect: its input plus any named images it samples.
Fields
inputs: BTreeMap<String, Option<NodeId>>The images the effect samples besides its input, by the names its definition declares
(sample_<name> in its shader); at most MAX_EFFECT_INPUTS. An undeclared name, or a
declared one left out, is invalid for a built-in and fails the frames that draw the
node otherwise.
effect: ClipEffectThe versioned effect and its parameters.
Transition
A registered two-input transition at an explicit progress.
Fields
effect: ClipEffectThe versioned transition and its parameters.
Transform
The input placed on the canvas by a transform and opacity.
Fields
transform: VisualPropertiesPosition, anchor, scale, rotation, and opacity.
Merge
Ordered layers composited over transparency.
Fields
layers: Vec<MergeLayer>Layers from bottom to top.
Matte
The input kept where a second image says.
Fields
KeyMix
The backdrop replaced by the input by k = opacity x mask alpha, as
(1 - k) backdrop + k input on premultiplied values: exactly the backdrop where k is 0
and the input where it is 1 (Nuke’s KeyMix with an opacity). Bypassed, it passes the
backdrop through.
Fields
ShapeMask
The input kept inside shapes.
Fields
masks: Vec<ShapeMask>The shapes, combined in order; at most crate::MAX_CLIP_MASKS. Geometry is in the
input image’s normalized space.
Group
Another composition drawn in this one’s time as a group: its output, with group inputs
fed from inputs and controls set from controls.
Fields
composition: CompositionIdThe composition drawn.
controls: BTreeMap<String, Animated<EffectValue>>Values for its controls, by name; unset controls keep the composition’s own value. Keyed in composition time.
GroupInput
In a composition used as a group, the image the group node gives its input index.
Implementations§
Source§impl NodeOp
impl NodeOp
Sourcepub fn inputs(&self) -> Vec<NodeInput<'_>>
pub fn inputs(&self) -> Vec<NodeInput<'_>>
Every input of the operation, connected or not, in a fixed order.
Sourcepub fn bypass_input(&self) -> Option<NodeInput<'_>>
pub fn bypass_input(&self) -> Option<NodeInput<'_>>
The input a bypassed node passes through: input for one-input operations and mattes,
from for a transition, backdrop for a key mix, a merge’s bottom layer, and a group’s
first input. None for
operations without inputs and merges without layers.
Sourcepub const fn has_inputs(&self) -> bool
pub const fn has_inputs(&self) -> bool
Whether the operation takes inputs, and so can be bypassed.
Sourcepub const fn effect(&self) -> Option<&ClipEffect>
pub const fn effect(&self) -> Option<&ClipEffect>
The effect or transition invocation the operation runs, if any.