pymel.core.general.listConnections

listConnections(*args, **kwargs)

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.

Modifications:
  • returns an empty list when the result is None

  • When ‘connections’ flag is True, the attribute pairs are returned in a 2D-array:

    [['checker1.outColor', 'lambert1.color'], ['checker1.color1', 'fractal1.outColor']]
    
  • added sourceFirst keyword arg. when sourceFirst is true and connections is also true,

    the paired list of plugs is returned in (source,destination) order instead of (thisnode,othernode) order. this puts the pairs in the order that disconnectAttr and connectAttr expect.

  • added ability to pass a list of types

    rtype:PyNode list
Flags:
  • connections : c (bool) [create]

    If true, return both attributes involved in the connection. The one on the specified object is given first. Default false.

  • destination : d (bool) [create]

    Give the attributes/objects that are on the destinationside of connection to the given object. Default true.

  • exactType : et (bool) [create]

    When set to true, -t/type only considers node of this exact type. Otherwise, derived types are also taken into account.

  • plugs : p (bool) [create]

    If true, return the connected attribute names; if false, return the connected object names only. Default false;

  • shapes : sh (bool) [create]

    Actually return the shape name instead of the transform when the shape is selected. Default false.

  • skipConversionNodes : scn (bool) [create]

    If true, skip over unit conversion nodes and return the node connected to the conversion node on the other side. Default false. Flag can have multiple arguments, passed either as a tuple or a list.

  • source : s (bool) [create]

    Give the attributes/objects that are on the sourceside of connection to the given object. Default true.

  • type : t (unicode) [create]

    If specified, only take objects of a specified type.

Derived from mel command maya.cmds.listConnections

Previous topic

pymel.core.general.listAttr

Next topic

pymel.core.general.listFuture

Core

Core Modules

Other Modules

This Page