Go to: Synopsis. Return value. Related. Flags. Python examples.
isConnected(
srcPlug dstPlug
, [iuc=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
isConnected is undoable, queryable, and editable.
The isConnected command is used to check if two plugs are connected in the dependency graph. The return value is false if they are not and true if they are.boolean : Are the two plugs connected?
In query mode, return type is based on queried flag.
Long name (short name) | argument types | Properties | ||
---|---|---|---|---|
iuc(ignoreUnitConversion)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds cmds.sphere( n='jupiter' ) cmds.sphere( n='io' ) cmds.connectAttr( 'jupiter.ty', 'io.ty' ) # Are the two "tx" attributes on transform1 and transform2 connected? cmds.isConnected( 'jupiter.tx', 'io.tx' ) # Result: 0 # # Are the two "ty" attributes on transform1 and transform2 connected? cmds.isConnected( 'jupiter.ty', 'io.ty' ) # Result: 1 #