MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ unregister_node()

MAYAFLUX_API void MayaFlux::unregister_node ( const std::shared_ptr< Nodes::Node > &  node,
const Nodes::ProcessingToken token,
uint32_t  channel = 0 
)

Removes a node from the root node of specified channels.

Parameters
nodeNode to remove
channelsVector of channel indices

Removes the node from being a child of the root node for the specified channels. Uses the default engine's node graph manager.

Definition at line 85 of file Graph.cpp.

86{
87 auto manager = get_node_graph_manager();
88 if (!manager) {
89 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
90 "Node graph manager not initialized - cannot register node");
91 return;
92 }
93
94 if (channel >= manager->get_channel_count(token)) {
95 MF_ERROR(Journal::Component::API, Journal::Context::NodeProcessing,
96 "Channel index out of range for audio node registration");
97 }
98 manager->remove_from_root(node, token, channel);
99}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< Nodes::NodeGraphManager > get_node_graph_manager()
Gets the node graph manager from the default engine.
Definition Graph.cpp:35

References MayaFlux::Journal::API, get_node_graph_manager(), MF_ERROR, and MayaFlux::Journal::NodeProcessing.

+ Here is the call graph for this function: