c4d.modules.graphview.GvNodeMaster

A GvNodeMaster stores a collection of GvNode

Inheritance

Methods

GvNodeMaster.__init__(host)
Parameters: host (BaseList2D) – Attaches a GvNodeMaster to a BaseList2D object.
Return type: GvNodeMaster
Returns: The new nodemaster.
GvNodeMaster.AllocNode(id)

Allocates a node without inserting it.

Parameters: id (int) – The id, see GV Types.
Return type: GvNode
Returns: The new node.
GvNodeMaster.CreateNode(parent, id[, insert=None][, x=-1][, y=-1])

Creates a node and inserts it.

Parameters:
  • parent (GvNode) – Parent node, can be GetNodeMaster.GetRoot().
  • id (int) – The id, see GV Types.
  • insert (GvNode) – The insertion point.
  • x (int) – X position
  • y (int) – Y position.
Return type:

GvNode

Returns:

The created node.

GvNodeMaster.GetRoot()

Retrieves the root node.

Return type: GvNode
Returns: The root node or None.
GvNodeMaster.GetOwner()

Retrieves the owner.

Return type: BaseList2D
Returns: The owner of the GvNodeMaster
GvNodeMaster.InsertFirst(parent, node)

Inserts a node first in the node list of an Xgroup. (Equivalent to GeListNode.InsertUnder(), but with additional checks that parent is a group node, and that node is removed.)

Parameters:
  • parent (GvNode) – Parent node. Must be in the same node master.
  • node (GvNode) – Node to insert.
Return type:

bool

Returns:

True if the node was inserted, otherwise False.

GvNodeMaster.InsertLast(parent, node)

Inserts a node last in the node list of an Xgroup. (Equivalent to GeListNode.InsertUnderLast(), but with additional checks that parent is a group node, and that node is removed.)

Parameters:
  • parent (GvNode) – Parent node. Must be in the same node master.
  • node (GvNode) – Node to insert.
Return type:

bool

Returns:

True if the node was inserted, otherwise False.

GvNodeMaster.SetHierarchy(insert, node[, mode=GV_INSERT_AFTER])

Perform a hierarchy operation. Pass the arguments as a dictionary.

Parameters:
  • insert (GvNode) – Insertion point.
  • node (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()

Checks if the node master is enabled.

Return type: GvNodeMaster
Returns: True if the node master is enabled.
GvNodeMaster.GetPrefs()

Returns the settings container.

Return type: BaseContainer
Returns: A copy of the settings container.
GvNodeMaster.SetPrefs(bc)

Set the settings container.

Parameters: bc (BaseContainer) – The settings container.
GvNodeMaster.AddUndo()

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()

Calculates the GvNodeMaster

GV Types

ID_GV_OPERATOR_DUMMY  
ID_GV_OPERATOR_GROUP  
ID_OPERATOR_OBJECT  
ID_OPERATOR_RANDOM  
ID_OPERATOR_REAL2VECT  
ID_OPERATOR_VECT2REAL  
ID_OPERATOR_ADAPTER  
ID_OPERATOR_CROSS  
ID_OPERATOR_EQU  
ID_OPERATOR_NIL  
ID_OPERATOR_TIME  
ID_OPERATOR_TRIGO  
ID_OPERATOR_MATRIX2VECT  
ID_OPERATOR_VECT2MATRIX  
ID_OPERATOR_NOT  
ID_OPERATOR_POINT  
ID_OPERATOR_CLAMP  
ID_OPERATOR_VECTCALCMATRIX  
ID_OPERATOR_MATRIXCALCHPB  
ID_OPERATOR_DISTANCE  
ID_OPERATOR_CONDITION  
ID_OPERATOR_RESULT  
ID_OPERATOR_SPY  
ID_OPERATOR_CONST  
ID_OPERATOR_MATH  
ID_OPERATOR_BOOL  
ID_OPERATOR_INV  
ID_OPERATOR_NEG  
ID_OPERATOR_CMP  
ID_OPERATOR_ORDER  
ID_OPERATOR_SWITCH  
ID_OPERATOR_MIX  
ID_OPERATOR_COMMENT  
ID_OPERATOR_MEMORY  
ID_OPERATOR_ITERATE  
ID_OPERATOR_FREEZE  
ID_OPERATOR_FORMULA  
ID_OPERATOR_ABS  
ID_OPERATOR_DEGREE  
ID_OPERATOR_RANGEMAPPER  
ID_OPERATOR_FLOATMATH  
ID_OPERATOR_FLOATFUNC  
ID_OPERATOR_POLYGON  
ID_OPERATOR_DOT  
ID_OPERATOR_COLORSPACE  
ID_OPERATOR_SOUND  
ID_OPERATOR_NOISE  
ID_OPERATOR_TRIGGER  
ID_OPERATOR_BOX  
ID_OPERATOR_COLLISION  
ID_OPERATOR_SPLINE  
ID_OPERATOR_MATRIXMULVECTOR  
ID_OPERATOR_SELECTION  
ID_OPERATOR_HIERARCHY  
ID_OPERATOR_DETAILS  
ID_OPERATOR_TAG  
ID_OPERATOR_COFFEE  
ID_OPERATOR_MONOFLOP  
ID_OPERATOR_REFERENCE  
ID_OPERATOR_WEIGHTMAP  
ID_OPERATOR_MATERIAL  
ID_OPERATOR_INCLUDE  
ID_OPERATOR_LINK  
ID_OPERATOR_RAY  

Table Of Contents