c4d.modules.graphview.GvNodeMaster

class c4d.modules.graphview.GvNodeMaster

A GvNodeMaster stores a collection of GvNode.

Methods Signatures

GvNodeMaster.__init__(self, host)
GvNodeMaster.AllocNode(self, id) Allocates a node without inserting it.
GvNodeMaster.CreateNode(self, parent, id[, ...]) Creates a node and inserts it.
GvNodeMaster.GetRoot(self) Retrieves the root node.
GvNodeMaster.GetOwner(self) Retrieves the owner.
GvNodeMaster.InsertFirst(self, parent, node) Inserts a node first in the node list of an Xgroup.
GvNodeMaster.InsertLast(self, parent, node) Inserts a node last in the node list of an Xgroup.
GvNodeMaster.SetHierarchy(self, insert, node[, mode]) Perform a hierarchy operation. Pass the arguments as a dictionary.
GvNodeMaster.IsEnabled(self) Checks if the node master is enabled.
GvNodeMaster.GetPrefs(self) Returns the settings container.
GvNodeMaster.SetPrefs(self, bc) Set the settings container.
GvNodeMaster.AddUndo(self) Call this function if you manipulated something with a node master, and you want it to be undoable.
GvNodeMaster.Execute(self) Calculates the GvNodeMaster.

Inheritance

Inheritance

Parent Class:

Methods Documentation

GvNodeMaster.__init__(self, host)
Parameters:host (BaseList2D) – Attaches a GvNodeMaster to a BaseList2D object.
Return type:c4d.modules.graphview.GvNodeMaster
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:c4d.modules.graphview.GvNode
Returns:The new node.
GvNodeMaster.CreateNode(self, parent, id, insert=None, x=-1, y=-1)

Creates a node and inserts it.

Parameters:
Return type:

c4d.modules.graphview.GvNode

Returns:

The created node.

GvNodeMaster.GetRoot(self)

Retrieves the root node.

Return type:c4d.modules.graphview.GvNode
Returns:The root node or None.
GvNodeMaster.GetOwner(self)

Retrieves the owner.

Return type:c4d.BaseList2D
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:
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:
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:c4d.modules.graphview.GvNodeMaster
Returns:True if the node master is enabled.
GvNodeMaster.GetPrefs(self)

Returns the settings container.

Return type:c4d.BaseContainer
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)

Calculates the GvNodeMaster.