About
maxon::nodes::NodesGraphModelInterface is an implementation of maxon::GraphModelInterface and presents the node system (NodeSystemInterface Manual) as a graph model.
- Note
- If possible, one should work with the more generic maxon::GraphModelInterface, see GraphModelInterface Manual.
Access
The maxon::nodes::NodesGraphModelRef is obtained from the NodeMaterial:
See NodeMaterial Manual.
if (nodeMaterial->HasSpace(nodeSpaceID) == false)
const maxon::nodes::NodesGraphModelRef& graph = nodeMaterial->GetGraph(nodeSpaceID)
iferr_return;
maxon::Id GetActiveNodeSpaceId()
Definition: apibaseid.h:253
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define iferr_return
Definition: resultbase.h:1519
Use
The node graph model gives access to the stored node system:
See NodeSystemInterface Manual.
const maxon::nodes::NodesGraphModelRef& graph = nodeMaterial->GetGraph(nodeSpaceID)
iferr_return;
Definition: nodesystem.h:835
A new nodes graph can be created with the class maxon::nodes::NodesGraphModelClass().
const auto nodesGraphModelClass = maxon::nodes::NodesGraphModelClass();
maxon::nodes::NodesGraphModelRef nodesGraphModel = nodesGraphModelClass.Create()
iferr_return;
nodesGraphModel.Init(sys, repository, filter,
true)
iferr_return;
static MAXON_METHOD const AssetRepositoryRef & GetBuiltinRepository()
Definition: nodesystem.h:2299
Result< NodeSystem > EndModification(Opt< ChangeList & > list={}, NodeSystem::FINALIZE_FLAGS finalize=NodeSystem::FINALIZE_FLAGS::CLEANUP)
@ NONE
Don't do any finalizations at all.
@ INCLUDE_INNER
Includes inner nodes in the view.
@ INCLUDE_HIDDEN
Includes hidden nodes in the view.
static const NO_VALUE_TYPE NO_VALUE
Definition: optional.h:17
A view on a node graph is a new node graph that presents only a subset of the original node graph.
A node system can contain multiple children under the root node:
const maxon::nodes::NodesGraphModelRef& nodeGraph = nodeMaterial->GetGraph(nodeSpaceID)
iferr_return;
if (nodeGraph.IsReadOnly())
const maxon::Id nodeAssetId {
"net.maxonexample.noderenderer.usernode" };
const maxon::ChangeList&
list = nodeGraph.GetChangeList();
Result< Bool > SetValue(const InternedId &attr, ForwardingDataPtr &&value, Bool checkAndInvalidate=true) const
Definition: graph.h:1698
Result< void > Commit(const DataDictionary &userData=GetPtrSizedZeroRef< DataDictionary >(), Bool validate=true)
static MAXON_METHOD Result< NodeTemplate > LoadTemplate(const AssetRepositoryRef &repo, const Id &assetId)
PyWideStringList * list
Definition: initconfig.h:447
Nodes can be organized in group nodes:
Nodes are based on assets from the asset repository:
A maxon::nodes::NodeSystemManagerInterface manages a node system and its views: