NodeSystemInterface Manual

Table of Contents

About

maxon::nodes::NodeSystemInterface is a node system. This is the fundamental data structure which is being edited by a user through the maxon::GraphModelInterface from the graph.framework. A node system stores a hierarchy of objects (nodes and ports) and connections.

Note
Node systems support COW behaviour.

To traverse a node system, the classes maxon::nodes::Node, maxon::nodes::PortList and maxon::nodes::Port exist. See Nodes Manual.

Access

The node system is obtained with:

See NodesGraphModelInterface Manual and NodeMaterial Manual.

// This example obtains the NodeSystem from the given NodeMaterial.
const maxon::nodes::NodesGraphModelRef& graph = nodeMaterial->GetGraph(nodeSpaceID) iferr_return;
const maxon::nodes::NodeSystem& system = graph.GetNodeSystem();
Definition: nodesystem.h:944
#define iferr_return
Definition: resultbase.h:1524

Use

The node system gives access to its nodes via the root node:

See Nodes Manual.

// This example accesses the node systems root node and loops over all its children.
// get root node
maxon::nodes::Node node = system.GetRoot();
// check children
for (auto c : node.GetChildren())
{
DiagnosticOutput("Child: @", child);
}
Definition: nodesystem.h:2314
Py_UNICODE c
Definition: unicodeobject.h:1200
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
Definition: node.h:10

A modification to a node system is handled with:

  • maxon::nodes::NodeSystemInterface::BeginModification(): Indicates the beginning of a sequence of modifications and returns the root node of this node system as a MutableRoot.
  • maxon::nodes::NodeSystemInterface::BeginInstantiationModification():
  • maxon::nodes::NodeSystemInterface::BeginSubstitutionModification():
  • maxon::nodes::NodeSystemInterface::IsFinalized(): Returns true if this node system is in finalized state. A node system is in finalized state after maxon::nodes::MutableRoot::EndModification() has been called
Note
Typically a node system is edited as a graph model, see GraphModelInterface Manual.

Modifications are obtained with:

The values of node attributes are edited with:

The node system can be serialized with:

Node Template:

Further functions are: