Connection¶
-
class
cgp_maya_utils.scene.Connection(source, destination)¶ Bases:
objectconnection object that manipulates live or virtual connection between two attributes
-
connect()¶ connect the connection
-
classmethod
create(source, destination)¶ create a connection
Parameters: Returns: the created connection
Return type:
-
data()¶ data necessary to store the compound attribute on disk and/or recreate it from scratch
Returns: the data of the connection Return type: tuple
-
destination()¶ the destination attribute of the connection
Returns: the destination attribute Return type: cgp_maya_utils.scene.Attribute
-
disconnect()¶ disconnect the connection
-
classmethod
get(node, attributes=None, sources=True, destinations=True, nodeTypes=None, nodeTypesIncluded=True, skipConversionNodes=False)¶ get the connections from the specified node
Parameters: - node (str or
cgp_maya_utils.scene.Node) – node to get the connections from - attributes (list[str]) – list of attributes to get the connections from - get all if nothing specified
- sources (bool) –
True: get the source connections -Falsedoes not get source connections - destinations (bool) –
True: get the destination connections -Falsedoes not get destination connections - nodeTypes (list[str]) – types of nodes used to get the connections - All if nothing is specified
- nodeTypesIncluded (bool) –
True: include specified node types -False: exclude specified node types - skipConversionNodes (bool) –
True: conversion nodes are skipped -Falseconversion nodes are not skipped
Returns: the connections
Return type: - node (str or
-
isConnected()¶ check if the connection exists or not
Returns: True: connection is live -False: connection is virtualReturn type: bool
-
setDestination(node=None, attribute=None)¶ set the destination of the connection
Parameters:
-
setSource(node=None, attribute=None)¶ set the source of the connection
Parameters:
-
source()¶ the source attribute of the connection
Returns: the source attribute Return type: cgp_maya_utis.scene.Attribute
-