maxon.NodesGraphModelInterface¶
Description¶
maxon.NodesGraphModelRef
is an implementation of maxon.GraphModelInterface
which wraps a maxon.NodeSystem
.maxon.NodeSystem
reference, this is
handled by a shared maxon.NodeSystemManagerRef
.maxon.NodesGraphModelRef
is a certain CreateView “view” on the NodeSystem with
individual filter settings and root paths.maxon.NodeSystemManagerInterface
) coordinates the accesses of the views.maxon.NodesGraphModelClass
is the base implementation of this interface.Methods Signature¶
|
Creates a new view for the node system of this view.
|
|
Return the original base node. |
|
Groups the selection of nodes of this graph into a new group node.
|
|
Dissolves the given group into its children.
|
Methods Definition¶
-
NodesGraphModelInterface.
CreateView
(filter, rootPath)¶ - Creates a new view for the node system of this view.The returned view will be managed by the same
maxon.NodeSystemManagerRef
as this view.- Parameters
filter (
maxon.NodeSystemManagerInterface.FILTER
) –The filter to use for the view.If this view is read-only, the FILTER.READ_ONLY flag will be set implicitly.rootPath (
maxon.NodePath
) –The absolute path to the root node of the new view.Use this if the new view shall not represent the whole graph, but only a node and its inner parts.Note that this is an absolute path, so the path of the current view is always ignored.
- Returns
A new
maxon.NodesGraphModelRef
view for the same node system.- Return type
-
NodesGraphModelInterface.
GetBase
(node)¶ Return the original base node.
- Parameters
node (
maxon.GraphNode
) – The node to retrieve the NodeSystem from.- Returns
The base NodeSystem of the node.
- Return type
maxon.NodeSystem
-
NodesGraphModelInterface.
MoveToGroup
(groupRoot, groupId, selection)¶ - Groups the selection of nodes of this graph into a new group node.groupRoot is used to set up the new group node.You can leave this empty, then a new node system will be created as an instance of a group asset which fits to the selection (group assets already used by the selection are considered).But you can also provide a valid node system.All selected nodes are moved to the group using their original identifiers, including inner connections.Afterwards the group is :
MutableRoot.EndModification()
“finalized” and an instance of the group is added to this graph using the given groupId.Connections which leave the group are kept by adding ports to the group node as needed, and connecting them correspondingly.If the used group node already has ports, these will be used where identifiers mach.- Parameters
groupRoot (
maxon.GraphNode
) – The GraphNode of another (usually empty) node system which will become the group, can be empty.groupId (Union[str,
maxon.Id
,maxon.InternedId
,maxon.StringInterface
]) – Identifier for the new group within this node system (if empty, a UUID is chosen).selection (
maxon.BaseArray
[maxon.GraphNode
]) – A selection of nodes. Only nodes which are direct children of the root node of this view are considered.
- Returns
A GraphNode referencing the added child.
- Return type
-
NodesGraphModelInterface.
Ungroup
(group)¶ - Dissolves the given group into its children.This moves all children of group including their inner connections to the parent of group.External connections (from the group to other nodes) are moved to the inner nodes as well.
- Parameters
group (
maxon.GraphNode
) – The group node to dissolve.- Returns
The mapping from original identifiers within the group to the new identifiers used at parent level.
- Return type
list[tuple[
maxon.InternedId
,maxon.InternedId
]]