Go to: Return value. Related commands. Flags. Examples.

Synopsis

listConnections [-source boolean] [-destination boolean] [-plugs boolean] [-connections boolean] [-shapes boolean] [-type string] [-exactType boolean] [-skipConversionNodes boolean]

listConnections is NOT undoable, NOT queryable, and NOT editable .

This command returns a list of all attributes/objects of a specified type that are connected to the given object(s). If no objects are specified then the command lists the connections on selected nodes.

Return value

[string[]] List of connection plugs/nodes

Keywords

connection, dg, dependency, graph, plug, connect

Related commands

connectAttr, connectionInfo, disconnectAttr, getAttr, isConnected, listAttr, setAttr

Flags

connections, destination, exactType, plugs, shapes, skipConversionNodes, source, type

Long name (short name)[argument types]Properties
-source (-s) booleancreate
Give the attributes/objects that are on the "source" side of connection to the given object. Default true.
-destination (-d) booleancreate
Give the attributes/objects that are on the "destination" side of connection to the given object. Default true.
-plugs (-p) booleancreate
If true, return the connected attribute names; if false, return the connected object names only. Default false;
-connections (-c) booleancreate
If true, return both attributes involved in the connection. The one on the specified object is given first. Default false.
-shapes (-sh) booleancreate
Actually return the shape name instead of the transform when the shape is "selected". Default false.
-type (-t) stringcreate
If specified, only take objects of a specified type.
-exactType (-et) booleancreate
When set to true, -t/type only considers node of this exact type. Otherwise, derived types are also taken into account.
-skipConversionNodes (-scn) booleancreate
If true, skip over unit conversion nodes and return the node connected to the conversion node on the other side. Default false.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command

Examples


sphere -ch on -n BALL;
setKeyframe;
// List all connections to BALL
string $list[] = `listConnections BALL`;
// List only incoming connections from BALL.tx
listConnections -d off -s on BALL.tx;
// List connections from BALL to nodes of type 'transform'
listConnections -t transform;
// List connections on BALL, ignoring unit conversion nodes
listConnections -scn on BALL;