c4d.modules.graphview.GvPort¶
-
class
c4d.modules.graphview.
GvPort
¶ A
GvPort
is a port of aGvNode
-object.Note
AGvPort
object cannot be alive without its owner.UseGvNode.AddPort()
to create a port.
Methods Signatures
GvPort.Connect(self, port) |
Connects a port with another. |
GvPort.Remove(self) |
Removes the connections of this port. |
GvPort.GetNrOfConnections(self) |
Get the number of connections, including both the incoming connection and outgoing connections. |
GvPort.IsIncomingConnected(self) |
Check if there’s an incoming connection. |
GvPort.GetDestination(self) |
Returns the port where the port is linked with. |
GvPort.GetNode(self) |
Returns the node of this port. |
GvPort.GetName(self, node) |
Gets the name of this port. |
GvPort.SetName(self, name) |
Sets the name of this port. |
GvPort.GetIO(self) |
Gets the IO mode for this port. |
GvPort.GetMainID(self) |
Gets the main ID of the port. |
GvPort.SetMainID(self, id) |
Sets the main ID of the port. |
GvPort.GetSubID(self) |
Gets the sub ID of the port. |
GvPort.SetUserID(self, id) |
Sets the user ID of the port. |
GvPort.GetUserID(self) |
Gets the user ID of the port. |
GvPort.GetValueType(self) |
Gets the value type of the port. |
GvPort.SetVisible(self, v) |
Set the visibility of the port. |
GvPort.GetVisible(self) |
Checks if this port is hidden or visible. |
GvPort.GetUserData(self) |
Internal. |
GvPort.SetUserData(self) |
Internal. |
Methods Documentation
-
GvPort.
Connect
(self, port)¶ Connects a port with another.
Note
Remember, the nodes of the ports have to be in the same
GvNodeMaster
, otherwise the connection fails.Parameters: port (c4d.modules.graphview.GvPort) – The port to connect to. Return type: bool Returns: True on succeeded connection, otherwise False.
-
GvPort.
Remove
(self)¶ Removes the connections of this port.
Return type: bool Returns: True if the connection was removed, otherwise False.
-
GvPort.
GetNrOfConnections
(self)¶ Get the number of connections, including both the incoming connection and outgoing connections.
Return type: int Returns: Number of connections.
-
GvPort.
IsIncomingConnected
(self)¶ Check if there’s an incoming connection.
Return type: bool Returns: True if there’s an incoming connection to the port, otherwise False.
-
GvPort.
GetDestination
(self)¶ Returns the port where the port is linked with.
Return type: list of type GvPort
Param: A list with all destinations.
-
GvPort.
GetNode
(self)¶ Returns the node of this port.
Return type: c4d.modules.graphview.GvNode Param: The container
-
GvPort.
GetName
(self, node)¶ Gets the name of this port.
Parameters: node (c4d.modules.graphview.GvNode) – The node the port belongs to Return type: str Returns: Port name.
-
GvPort.
SetName
(self, name)¶ Sets the name of this port.
Parameters: name (str) – Port name.
-
GvPort.
GetIO
(self)¶ Gets the IO mode for this port.
Return type: int Returns: IO mode: GV_PORT_INVALID Invalid. GV_PORT_INPUT Input. GV_PORT_OUTPUT Output. GV_PORT_INPUT_OR_GEDATA Input or GeData.
-
GvPort.
GetMainID
(self)¶ Gets the main ID of the port.
Return type: int Returns: Main ID.
-
GvPort.
SetMainID
(self, id)¶ Sets the main ID of the port.
Parameters: id (int) – New main ID.
-
GvPort.
GetSubID
(self)¶ Gets the sub ID of the port.
Return type: int Returns: Sub ID.
-
GvPort.
SetUserID
(self, id)¶ Sets the user ID of the port.
Parameters: id (int) – The user ID to set.
-
GvPort.
GetUserID
(self)¶ Gets the user ID of the port.
Return type: int Returns: Sub ID.
-
GvPort.
GetValueType
(self)¶ Gets the value type of the port.
Return type: int Returns: The value type.
-
GvPort.
SetVisible
(self, v)¶ Set the visibility of the port.
Parameters: v (bool) – False for an invisible port.
-
GvPort.
GetVisible
(self)¶ Checks if this port is hidden or visible.
Return type: bool Returns: True if visible, otherwise False.
-
GvPort.
GetUserData
(self)¶ Internal.
New in version R17.048.
-
GvPort.
SetUserData
(self)¶ Internal.
New in version R17.048.