Initializes the chain node.
If a manager was provided at construction, registers this chain and applies chain semantics (REPLACE_TARGET, ONLY_CHAIN, PRESERVE_BOTH). Without a manager, only sets internal initialization flag.
Definition at line 75 of file NodeChain.cpp.
76{
80 if (last) {
83 }
84 } else {
86 }
87 }
89 }
90
93 switch (semantics) {
96 if (last) {
99 }
100 }
101 break;
102 }
105 if (node) {
108 }
109 }
110 }
111 break;
113 default:
114 break;
115 }
116 }
117}
std::vector< std::shared_ptr< Node > > m_nodes
NodeGraphManager * m_manager
void add_to_root(const std::shared_ptr< Node > &node, ProcessingToken token, unsigned int channel=0)
Add node to specific processing token and channel.
void remove_from_root(const std::shared_ptr< Node > &node, ProcessingToken token, unsigned int channel=0)
Remove node from a specific processing token and channel.
NodeConfig & get_node_config()
Gets the current node configuration.
std::vector< uint32_t > get_active_channels(const std::shared_ptr< Nodes::Node > &node, uint32_t fallback_channel)
Extracts active channel list from a node's channel mask.
@ PRESERVE_BOTH
Preserve both nodes in the chain, add new chain node to root, i.e doubling the target signal.
@ ONLY_CHAIN
Only keep the new chain node, unregistering the source and target.
@ REPLACE_TARGET
Unregister the target and register with the new chain node.
NodeChainSemantics chain_semantics
References MayaFlux::Nodes::NodeGraphManager::add_to_root(), MayaFlux::Nodes::NodeConfig::chain_semantics, MayaFlux::Nodes::get_active_channels(), MayaFlux::Nodes::NodeGraphManager::get_node_config(), m_is_initialized, m_manager, m_nodes, m_token, MayaFlux::Nodes::ONLY_CHAIN, MayaFlux::Nodes::PRESERVE_BOTH, MayaFlux::Nodes::NodeGraphManager::remove_from_root(), and MayaFlux::Nodes::REPLACE_TARGET.
Referenced by process_sample().