The isConnectedcommand is used to check if two plugs are connected in the dependency graph. The return value is falseif they are not and trueif they are.The first string specifies the source plug to check for connection.The second one specifies the destination plug to check for connection.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
ignoreUnitConversion (iuc) | bool | ||
In looking for connections, skip past unit conversion nodes.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.isConnected
Example:
import pymel.core as pm
pm.sphere( n='jupiter' )
# Result: [nt.Transform(u'jupiter'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
pm.sphere( n='io' )
# Result: [nt.Transform(u'io'), nt.MakeNurbSphere(u'makeNurbSphere2')] #
pm.connectAttr( 'jupiter.ty', 'io.ty' )
# Are the two "tx" attributes on transform1 and transform2 connected?
pm.isConnected( 'jupiter.tx', 'io.tx' )
# Result: False #
# Are the two "ty" attributes on transform1 and transform2 connected?
pm.isConnected( 'jupiter.ty', 'io.ty' )
# Result: True #