Connections¶
vtool.maya_lib.attr.Connections (node) |
Convenience for dealing with connections. |
-
class
Connections
(node)¶ Convenience for dealing with connections. Connection mapping gets stored in the class.
Parameters: node (str) – The name of the node with connections. -
disconnect
()¶ Disconnect all connections.
-
connect
()¶ This is meant to be run after disconnect(). This will reconnect all the stored connections.
-
refresh
()¶ Refresh the stored connections
-
get
()¶ Get the stored connections. Input and Output connections in a list. List is orderd as [[output, intput], …], the output is whatever connects in, whether it be the node output into something or something inputing into the node.
-
get_input_at_inc
(inc)¶ Get connection that inputs into the node at index.
Parameters: inc (int) – The index of the connection.
-
get_output_at_inc
(inc)¶ Get connection that the node outputs into at index.
Parameters: inc (int) – The index of the connection.
-
get_connection_inputs
(connected_node)¶ Get connections that input into the node. List is [[external_output, node_input], …]
Parameters: connected_node (str) – The name of a connected node to filter with. Only inputs into the node will be returned.
-
get_connection_outputs
(connected_node)¶ Get connections that the node outputs into. List is [[node_output, external_input], …]
Parameters: connected_node (str) – The name of a connected node to filter with. Only inputs from that node will be returned. - Retrun
- list: [[node_output, external_input], …]
-
get_inputs_of_type
(node_type)¶ Get nodes of node_type that connect into the node.
Parameters: node_type (str) – Maya node type. Returns: The names of connected nodes matching node_type. Return type: list
-
get_outputs_of_type
(node_type)¶ Get all nodes of node_type that output from the node.
Parameters: node_type (str) – Maya node type. Returns: The names of connected nodes matching node_type. Return type: list
-