c4d.modules.graphview.GvNodeMaster¶
-
class
c4d.modules.graphview.
GvNodeMaster
¶ A
GvNodeMaster
stores a collection ofGvNode
.
Methods Signatures
Allocates a node without inserting it. |
|
Creates a node and inserts it. |
|
Retrieves the root node. |
|
Retrieves the owner. |
|
Inserts a node first in the node list of an Xgroup. |
|
Inserts a node last in the node list of an Xgroup. |
|
Perform a hierarchy operation. Pass the arguments as a dictionary. |
|
Checks if the node master is enabled. |
|
Returns the settings container. |
|
Set the settings container. |
|
Call this function if you manipulated something with a node master, and you want it to be undoable. |
|
Calculates the |
Inheritance
Parent Class:
Methods Documentation
-
GvNodeMaster.
__init__
(self, host)¶ - Parameters
host (BaseList2D) – Attaches a
GvNodeMaster
to a BaseList2D object.- Return type
- Returns
The new nodemaster.
-
GvNodeMaster.
AllocNode
(self, id)¶ Allocates a node without inserting it.
- Parameters
id (int) – The id. See Graph View Node Types.
- Return type
- Returns
The new node.
-
GvNodeMaster.
CreateNode
(self, parent, id, insert=None, x=- 1, y=- 1)¶ Creates a node and inserts it.
- Parameters
parent (c4d.modules.graphview.GvNode) – Parent node, can be
GetRoot()
.id (int) – The id. See Graph View Node Types.
insert (c4d.modules.graphview.GvNode) – The insertion point.
x (int) – X position
y (int) – Y position.
- Return type
- Returns
The created node.
-
GvNodeMaster.
GetRoot
(self)¶ Retrieves the root node.
- Return type
- Returns
The root node or None.
-
GvNodeMaster.
GetOwner
(self)¶ Retrieves the owner.
- Return type
- Returns
The owner of the
GvNodeMaster
-
GvNodeMaster.
InsertFirst
(self, parent, node)¶ Inserts a node first in the node list of an Xgroup.
Note
Equivalent to
GeListNode.InsertUnder()
, but with additional checks that parent is a group node, and that node is removed.- Parameters
parent (c4d.modules.graphview.GvNode) – Parent node. Must be in the same node master.
node (c4d.modules.graphview.GvNode) – Node to insert.
- Return type
bool
- Returns
True if the node was inserted, otherwise False.
-
GvNodeMaster.
InsertLast
(self, parent, node)¶ Inserts a node last in the node list of an Xgroup.
Note
Equivalent to
GeListNode.InsertUnderLast()
, but with additional checks that parent is a group node, and that node is removed.- Parameters
parent (c4d.modules.graphview.GvNode) – Parent node. Must be in the same node master.
node (c4d.modules.graphview.GvNode) – Node to insert.
- Return type
bool
- Returns
True if the node was inserted, otherwise False.
-
GvNodeMaster.
SetHierarchy
(self, insert, node, mode=GV_INSERT_AFTER)¶ Perform a hierarchy operation. Pass the arguments as a dictionary.
- Parameters
insert (c4d.modules.graphview.GvNode) – Insertion point.
node (c4d.modules.graphview.GvNode) – The node to perform the operation on.
mode (int) –
The insertion mode:
GV_INSERT_UNDER
Input port.
GV_INSERT_UNDER_LAST
Insert under as last item.
GV_INSERT_BEFORE
Insert before.
GV_INSERT_AFTER
Insert after.
GV_INSERT_NONE
Not used.
- Return type
bool
- Returns
True if the hierarchy was set, otherwise False.
-
GvNodeMaster.
IsEnabled
(self)¶ Checks if the node master is enabled.
- Return type
- Returns
True if the node master is enabled.
-
GvNodeMaster.
GetPrefs
(self)¶ Returns the settings container.
- Return type
- Returns
A copy of the settings container.
-
GvNodeMaster.
SetPrefs
(self, bc)¶ Set the settings container.
- Parameters
bc (c4d.BaseContainer) – The settings container.
-
GvNodeMaster.
AddUndo
(self)¶ Call this function if you manipulated something with a node master, and you want it to be undoable.
- Return type
bool
- Returns
True if successful, otherwise False.
-
GvNodeMaster.
Execute
(self, thread=None)¶ Calculates the
GvNodeMaster
.Changed in version S22.
- Parameters
thread (Optional[c4d.threading.BaseThread]) –
- Returns
Symbol ID
Description
GV_IO_ERR_NONE
No I/O error.
GV_CALC_ERR_NONE
No calculation error.
GV_CALC_ERR_NO_MEMORY
Out of memory error.
GV_CALC_ERR_UNDEFINED
Undefined error.
GV_CALC_ERR_UNKNOWN_TYPE
Unknown type error.
GV_CALC_ERR_NOT_IMPLEMENTED
Not implemented error.
GV_CALC_ERR_NOT_INITIALIZED
Not initialized error.
GV_CALC_ERR_NOT_VALID
Not valid error.
GV_CALC_ERR_NO_OUTPORT
No output error.
GV_CALC_ERR_NOT_CONNECTED
Not connected error.
GV_CALC_ERR_NO_PORT
No port error.
GV_CALC_ERR_DIVISION_BY_ZERO
Division by zero error.
GV_CALC_ERR_TYPE_MISMATCH
Type mismatch error.
GV_CALC_ERR_INIT_FAILED
Init failed error.
GV_CALC_ERR_QUERY_FAILED
Query failed error.
GV_CALC_ERR_CALCULATION_FAILED
Calculation failed error.
GV_CALC_ERR_PARAMETER
Bad parameter error.
GV_IO_ERR_NO_MEMORY
No memory I/O error.
GV_IO_ERR_FILE_NOT_FOUND
File not found I/O error.
GV_IO_ERR_READ
Read I/O error.
GV_IO_ERR_WRITE
Write I/O error.
GV_IO_ERR_NOT_A_GROUPNODE
Not a group node I/O error.
GV_NR_OF_SYSTEM_ERRORS
Number of system errors.
GV_CALC_ERR_USER_DEFINED
All user defined errors will be above this ID.
- Return type
int