About
maxon::nodes::Node is a node based on maxon::nodes::GNode and maxon::nodes::NodeFunctions. It is stored in a node system.
- Note
- It is preferred to use the more generic graph nodes, see GraphModelInterface Manual and GraphNodes Manual.
Access
Nodes are obtained from a nodes graph model; see NodesGraphModelInterface Manual and NodeMaterial Manual.
A given maxon::GraphNode can be converted with:
See GraphNodes Manual.
if (nodeMaterial->HasSpace(nodeSpaceID) == false)
const maxon::nodes::NodesGraphModelRef& graph = nodeMaterial->GetGraph(nodeSpaceID)
iferr_return;
maxon::Id GetActiveNodeSpaceId()
Definition: apibaseid.h:253
Definition: nodesystem.h:2218
Definition: nodesystem.h:835
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define iferr_return
Definition: resultbase.h:1519
Use
maxon::nodes::Node is based on maxon::nodes::NodeFunctions. Inherited functions allow to access parents and children:
for (
auto nodeSelector :
node.GetChildren())
{
}
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
Result< NodeSelector< BASE::MUTABLE > > FindChild(const InternedId &name) const
Definition: nodesystem.h:2070
A node contains lists of ports:
See Port Lists below.
Definition: nodesystem.h:2777
Further functions are:
maxon::nodes::Node is based on maxon::nodes::GNodeBase. Basic functions allow to check if a node is a valid reference:
A GNode is part of a node system:
Further node properties are:
A node can be compared with:
maxon::nodes::GNode is the base class of immutable node references. It is based on maxon::nodes::GNodeFunctions. This class allows to access node attributes:
const maxon::DataDictionary& currentPreviewContext = materialNode.GetValue<decltype(maxon::nodes::NODESPACE::NodeSpaceContext)>().GetValueOrNull()
iferr_return;
const maxon::Id currentSpaceId = currentPreviewContext.
Get(maxon::nodes::NODESPACE::SPACEID,
maxon::Id());
const Id & Get() const
Definition: apibaseid.h:185
Definition: string.h:1235
materialNode.GetValues(mask, map,
true,
false)
iferr_return;
for (const auto& attr : map)
{
}
Definition: datatypebase.h:1800
Definition: hashmap.h:1119
Definition: datatypelib.h:31
TYPE_MASK
Use this mask to test for the type (one of DIRECT, DERIVED, USER_STATE or DERIVED|USER_STATE).
Definition: graphattribs.h:39
UInt64 TimeStamp
Definition: graph.h:17
Further functions are:
const maxon::DataDictionary& currentPreviewContext = materialNode.GetValue<decltype(maxon::nodes::NODESPACE::NodeSpaceContext)>().GetValueOrNull()
iferr_return;
const maxon::Id currentSpaceId = currentPreviewContext.
Get(maxon::nodes::NODESPACE::SPACEID,
maxon::Id());
A maxon::nodes::MutableRoot is returned from maxon::nodes::NodeSystemClassInterface::CreateNodeSystem() and is the root node of node systems with write access.
maxon::nodes::MutableNode represents a node within a NodeSystem with write access.
- maxon::nodes::ToImmutable(): Casts this MutableNode to an immutable Node.
- maxon::nodes::Ungroup(): Dissolves this node into its children.
- maxon::nodes::MoveToNodeSystem()
Port Lists
A maxon::nodes::PortList represents a port list within a node system. Each Node has exactly two port lists, one for its top-level input ports and one for its top-level output ports.
A given maxon::GraphNode can be converted to a port list with:
A maxon::nodes::PortList is based on maxon::nodes::PortListFunctions:
Ports
A maxon::nodes::Port represents a port within a node system.
A given maxon::GraphNode can be converted to a port with:
A maxon::nodes::Port is based on maxon::nodes::PortFunctions:
Result< PortListSelector< BASE::MUTABLE > > GetInputs() const
Definition: nodesystem.h:2141
Definition: nodesystem.h:3066
Result< PortSelector< BASE::MUTABLE > > FindPort(const InternedId &port) const
Definition: nodesystem.h:2737
if (directlySetName != nullptr)
{
}
PyCompilerFlags * flags
Definition: ast.h:14
@ DEFAULTVALUE
Dummy value for the default value GeData constructor.
Definition: c4d_gedata.h:65
Definition: datatypebase.h:1199
Definition: datatypebase.h:772
PORT_FLAGS
Type of the PortFlags attribute.
Definition: portattributes.h:380
@ HIDDEN
The port shall be hidden.
PyObject struct PyModuleDef * def
Definition: pycore_pystate.h:130
maxon::nodes::MutablePort is based on maxon::nodes::MutablePortFunctions:
Connections
maxon::nodes::Connection is a tuple of maxon::node::Port and maxon::Wires.
{
{
const maxon::Id sourceNodeId = sourceNode.GetId();
const maxon::Id sourcePortId = connectedPort.GetId();
}
}
Definition: valuereceiver.h:126
Int GetCount() const
Definition: valuereceiver.h:163
const Opt< typename std::decay< T >::type > & Get() const
Definition: valuereceiver.h:148
Result< Bool > GetConnections(PORT_DIR dir, const ValueReceiver< const ConnectionSelector< BASE::MUTABLE > & > &conns, Wires mask=Wires::All(), NodeSystemInterface::GET_CONNECTIONS_MODE mode=NodeSystemInterface::GET_CONNECTIONS_MODE::CONNECTIONS) const
Definition: nodesystem.h:2894
Result< Iterator > GetPorts() const
Definition: nodesystem.h:2713
@ INPUT
Input direction, i.e., an input port or an incoming connection.