pub enum NodeOp {
Clip {},
Media {
source_id: SourceId,
start: MediaTime,
},
Generator {
generator: Generator,
},
Effect {
input: 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,
},
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), not timeline time.
Variants§
Clip
The picture of the clip showing the composition: its source at the source time the clip’s time map gives, or what its generated source draws.
Media
Another visual source, read at start plus the composition time.
A media node adds no sound to the mix.
Fields
Generator
A picture the engine draws.
Effect
A registered one-input effect.
Fields
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
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 its group inputs fed from inputs and its controls set
from controls.
Fields
composition: CompositionIdThe composition drawn.
controls: BTreeMap<String, Animated<EffectValue>>Values for its controls, by name; a control not set keeps 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, the bottom layer of
a merge, and a group’s first input. None for an operation without
inputs, which cannot be bypassed, and for a merge 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.