About
A maxon::GraphNode is a node of a maxon::GraphModelInterface graph. A maxon::NodePath is used to identify a node within that graph.
Access
A maxon::GraphNode is obtained from a graph model:
See GraphModelInterface Manual.
if (nodeMaterial->HasSpace(nodeSpaceID) == false)
const maxon::nodes::NodesGraphModelRef& graph = nodeMaterial->GetGraph(nodeSpaceID)
iferr_return;
maxon::NodePath materialNodePath;
nodeMaterial->GetMaterialNodePath(nodeSpaceID, materialNodePath)
iferr_return;
maxon::Id GetActiveNodeSpaceId()
Definition: apibaseid.h:253
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define iferr_return
Definition: resultbase.h:1465
GraphNode
The properties of a maxon::GraphNode are accessed with:
Graph node types returned by maxon::GraphNode::GetKind() are:
{
}
Definition: datatypelib.h:27
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
@ NODE
Indicates that the g-node is a true node.
The parent graph model and the path within that graph are obtained with:
const maxon::GraphModelRef& graphModel = graphNode.GetGraph();
const maxon::NodePath& nodePath = graphNode.GetPath();
The validity of a node is checked with:
Further utility functions are:
GraphNodeFunctions
maxon::GraphNode is based on maxon::GraphNodeFunctions.
The node can be removed from its model with:
The node hierarchy can be explored with:
{
return true;
};
{
}
Definition: basearray.h:412
Definition: delegate.h:240
Definition: resultbase.h:766
#define iferr_scope
Definition: resultbase.h:1374
{
if (id.Get<0>() == nodeID)
{
}
return true;
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< T > Append(ARG &&x)
Definition: basearray.h:677
The port lists and ports of a node are obtained with:
Port directions are:
{
{
}
return true;
};
{
}
Result< Bool > GetChildren(const ValueReceiver< const GraphNode & > &callback, NODE_KIND mask=NODE_KIND::ALL_MASK) const
Definition: graph.h:1147
@ INPORT
Indicates that the g-node is an input port. An input port has an input port list or an input port as ...
Ports can be created with:
Ports of different nodes can be connected:
Connection can be muted or unmuted:
Connection can be checked with:
Connection can be removed with:
GraphNode selection can be checked with:
{
const maxon::NodePath path = targetNode.
GetPath();
}
const NodePath & GetPath() const
Definition: graph.h:1989
@ OUTPUT
Output direction, i.e., an output port or an outgoing connection.
A graph node can store multiple values:
Important values are:
- maxon::nodes::PortType: The port type.
- maxon::ConstantValue: The value stored in the port.
- maxon::EffectiveName: The name of the node or port.
See maxon::NODE::BASE, graphattribs.h and portattributes.h.
{
{
}
}
Definition: datatypebase.h:772
double Float64
64 bit floating point value (double)
Definition: apibase.h:183
PyObject ** type
Definition: pycore_pyerrors.h:34
{
}
Definition: string.h:1235
for (
const auto&
e : map)
{
}
PyObject * key
Definition: abstract.h:289
Definition: datatypebase.h:1800
Definition: hashmap.h:1119
ValueIterator GetValues()
Definition: hashmap.h:2442
Py_ssize_t * e
Definition: longobject.h:89
DIRECT
Definition: materialexport.h:0
Further attribute settings are:
Warning and error messages are obtained with:
NodePath
A maxon::NodePath identifies a maxon::GraphNode within a node graph model. Only this path uniquely identifies a node.
A maxon::NodePath is obtain with:
If a node path is empty or not can be checked with:
Components and properties of the node path are:
A maxon::NodePath can be constructed with:
A maxon::NodePath can be converted:
Two paths can be compared with:
One can iterate over the components of a path with: