pub struct CompositionReads<'a> { /* private fields */ }Expand description
What each composition’s output reads: the group inputs and clip nodes reachable from its output, following group nodes into their compositions. A group node needs only the ports its composition reads, so unread ports may be left unconnected.
Built once per project in dependency order, without recursion. A composition that uses itself (refused by validation) 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, resolving 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 an unknown
composition.
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 an unknown composition.
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,
restricted for a group node to the ports its composition reads.