c4d.modules.graphview.GvNode
¶
Cannot be instantiated. Use
GvNodeMaster.CreateNode()
to create nodes. The
GvNode
is a double
BaseList2D
node.
Note
Please use
GvNode.GetOperatorContainer()
to access most parameters.
A
GvNode
is a node which is stored in a
GvNodeMaster
. A node contains ports represented by
GvPort
.
c4d.modules.graphview.
GvNode
¶
GvNode.GetNodeMaster()
GvNode.GetOperatorID()
GvNode.GetOwnerID()
GvNode.IsGroupNode()
GvNode.Redraw()
c4d.BaseList2D
GvNode.
Redraw
(
)
¶
Redraws the node.
GvNode.
GetOperatorID
(
)
¶
Returns the operator ID.
Return type: | int |
---|---|
Returns: | The id. |
GvNode.
GetOwnerID
(
)
¶
Returns the owner ID of the node.
Return type: | int | ||||||
---|---|---|---|---|---|---|---|
Returns: |
The id.
|
GvNode.
GetNodeMaster
(
)
¶
Returns the GvNodeMaster where the node is attached to.
Return type: | c4d.modules.graphview.GvNodeMaster |
---|---|
Parameters: | mask – The GvNodeMaster or None if there is no nodemaster. |
GvNode.
IsGroupNode
(
)
¶
Checks if the node is a group node.
Return type: | bool |
---|---|
Parameters: | mask – True if the node is a group node, otherwise False . |
GvNode.
SetPortType
(
port
,
id
)
¶
Changes the type of a port of this node.
Parameters: |
|
---|
GvNode.
ResetPortType
(
id
)
¶
Changes the type of the port. Used to manage dynamic data ports.
Parameters: | id ( int ) – The type. |
---|
GvNode.
RemoveUnusedPorts
(
[
message=True
]
)
¶
Removes all unused ports - Sends a message to the node.
Parameters: | message ( bool ) – If this is True , the operator receives a message when the ports are removed. |
---|
GvNode.
RemoveConnections
(
)
¶
Removes all connections of the node.
GvNode.
RemovePort
(
port
[
,
message=False
]
)
¶
Removes a port from this node.
Parameters: |
|
---|
GvNode.
RemovePortIsOK
(
port
)
¶
Checks if it is OK to remove a port from this node. Used to check if a call to
GvNode.RemovePort()
would succeed.
Parameters: |
|
---|
GvNode.
GetPort
(
sub_id
)
¶
Retrieves a port by sub ID.
Parameters: | sub_id ( int ) – Port sub ID. |
---|---|
Return type: | c4d.modules.graphview.GvPort |
Returns: | The retrieved port, or None . |
GvNode.
GetPortIndex
(
id
)
¶
Gets the index of a port by sub ID.
Parameters: | id ( int ) – Port sub ID. |
---|---|
Return type: | int |
Returns: | Port index. |
GvNode.
GetOutPorts
(
type=-1
)
¶
Retrieves all outports of a node.
Parameters: | type ( int ) – If type is set, just the ports with the given type will be returned. Each port has its own type ID’s for the ports so check the C-header files of the node. |
---|---|
Return type: |
list of
GvPort
|
Returns: | The GvPorts or None if no port was found. |
GvNode.
GetInPorts
(
type=-1
)
¶
Retrieves all inports of a node.
Parameters: | type ( int ) – If type is set, just the ports with the given type will be returned. Each port has its own type ID’s for the ports so check the C-header files of the node. |
---|---|
Return type: |
list of
GvPort
|
Returns: | The GvPorts or None if no port was found. |
GvNode.
GetInPort
(
id
)
¶
Retrieves an inport by index.
Parameters: | id ( int ) – the index |
---|---|
Return type: | c4d.modules.graphview.GvPort |
Returns: | The GvPort or None if no port was found. |
GvNode.
GetOutPort
(
id
)
¶
Retrieves an outport by index.
Parameters: | id ( int ) – the index |
---|---|
Return type: | c4d.modules.graphview.GvPort |
Returns: | The GvPort or None if no port was found. |
GvNode.
GetInPortCount
(
)
¶
Returns the count of the inports.
Return type: | int |
---|---|
Returns: | The count |
GvNode.
GetOutPortCount
(
)
¶
Returns the count of the outports.
Parameters: | num ( int ) – The count |
---|
GvNode.
SetOperatorContainer
(
bc
)
¶
Set the settings container.
Parameters: | str – The container |
---|
GvNode.
GetOperatorContainer
(
)
¶
Returns the settings container.
Return type: | BaseContainer |
---|---|
Returns: | The container |
GvNode.
AddPort
(
io, id[, flag=GV_PORT_FLAG_IS_VISIBLE][, message=False]
)
¶
Adds a port to the node.
Note
To add a port for a user data parameter create the
DescID
of that parameter:
USERDATA_NUMBER = 1 nodeObjOut.AddPort(c4d.GV_PORT_OUTPUT, c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER, 0), c4d.DescLevel(USERDATA_NUMBER)), message=True)
Parameters: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | |||||||||||||
Returns: |
The created port or None if creation failed. |
GvNode.
AddPortIsOK
(
io
,
id
)
¶
Checks if
AddPort()
would be successfull.
Parameters: |
|
||||||
---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||
Returns: |
True if adding the port would succeed, otherwise False . |
GvNode.
OperatorSetData
(
type
,
data
,
mode
)
¶
New in version R18.057.
Sets data in the operator. Usually simulates dragging onto the node.
Parameters: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
|||||||||||||||||||||
Returns: |
True if the data was set, otherwise False . |