feat(oaktimeline): multicam enable/disable/switch commands, split copies the dependency graph
- oaktimeline::multicam: clip_find_multicam (buffer/tex_in depth-1 lookup), multicam_enable/disable (rewire sequence<->clip through a MultiCamNode), multicam_switch (split-preserving-links at the playhead, each half owns an independent multicam copy, linked clips switched together) as single undo commands with C++ labels. - BlockSplitCommand now duplicates the clip's whole dependency graph (copy_node_and_dependency_graph_minus_items) instead of just the block core, matching the C++ BlockSplitCommand::prepare semantics; undo detaches the copied subgraph, redo re-attaches identity- preserving. - oaknode: fix serializer dropping edges from the first-created node (ptr=0 was not registered in id_map), restoring sequence_in edge round-trips; multicam node and clip wiring serializer round-trip tests.
This commit is contained in:
@@ -36,7 +36,7 @@ mod mathbase;
|
||||
mod matrix;
|
||||
mod merge;
|
||||
mod mosaicfilternode;
|
||||
mod multicamnode;
|
||||
pub mod multicamnode;
|
||||
mod noise;
|
||||
mod ociobase;
|
||||
mod ociogradingtransformlinear;
|
||||
|
||||
@@ -69,6 +69,28 @@ impl MultiCamNode {
|
||||
core.standard_value(CURRENT_INPUT, -1).to_double() as i32
|
||||
}
|
||||
|
||||
/// The connected sequence node (C++ `sequence_`).
|
||||
pub fn sequence(&self) -> Option<NodeId> {
|
||||
self.sequence
|
||||
}
|
||||
|
||||
/// Set/clear the connected-sequence state (the effects of the C++
|
||||
/// `InputConnectedEvent`/`InputDisconnectedEvent` on `sequence_in`:
|
||||
/// store the sequence and toggle the `sequence_type_in` hidden flag).
|
||||
/// The graph arena does not dispatch behavior events on edge edits, so
|
||||
/// the commands that edit the `sequence_in` edge call this to keep the
|
||||
/// behavior state in sync with the graph.
|
||||
pub fn set_sequence(&mut self, core: &mut NodeCore, sequence: Option<NodeId>) {
|
||||
if let Some(slot) = core.get_input_mut(SEQUENCE_TYPE_INPUT) {
|
||||
if sequence.is_some() {
|
||||
slot.flags &= !crate::input::flags::HIDDEN;
|
||||
} else {
|
||||
slot.flags |= crate::input::flags::HIDDEN;
|
||||
}
|
||||
}
|
||||
self.sequence = sequence;
|
||||
}
|
||||
|
||||
/// Number of available sources (C++ `get_source_count()`): the
|
||||
/// connected sequence's track count when a sequence is set,
|
||||
/// otherwise the `sources_in` array size.
|
||||
|
||||
Reference in New Issue
Block a user