pub struct CompositionReads<'a> { /* private fields */ }Expand description
What each composition’s output reads: the group inputs and clip nodes a walk from its output reaches, along the inputs drawing each node reads, into the compositions its group nodes draw. A group draws what its nodes would inline, so a group node needs only the ports its composition reads: a port it never reads may be left unconnected, and what a connected one reads is not drawn.
Built once for a project’s compositions, in dependency order, without recursion. A composition that uses itself (which validation refuses) is taken to read every port and draw the clip.
Implementations§
Source§impl<'a> CompositionReads<'a>
impl<'a> CompositionReads<'a>
Sourcepub fn new(compositions: &HashMap<&'a CompositionId, &'a Composition>) -> Self
pub fn new(compositions: &HashMap<&'a CompositionId, &'a Composition>) -> Self
What each of compositions reads; it resolves group nodes by ID.
Sourcepub fn reads_port(&self, composition: &CompositionId, port: usize) -> bool
pub fn reads_port(&self, composition: &CompositionId, port: usize) -> bool
Whether composition’s output reads its group input port; true for
a composition these reads do not know.
Sourcepub fn draws_clip(&self, composition: &CompositionId) -> bool
pub fn draws_clip(&self, composition: &CompositionId) -> bool
Whether composition, shown by a clip, draws the clip’s picture: its
output reaches a clip node, directly or in a group. True for a
composition these reads do not know.
Sourcepub fn needed_inputs<'n>(&self, node: &'n CompositionNode) -> Vec<NodeInput<'n>>
pub fn needed_inputs<'n>(&self, node: &'n CompositionNode) -> Vec<NodeInput<'n>>
The inputs drawing node reads, in input order: its
CompositionNode::needed_inputs, of a group node only the ports its
composition reads.