pymel.core.general.isConnected

isConnected(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
ignoreUnitConversion (iuc) bool ../../../_images/create.gif
 

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

import maya.cmds as cmds

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 #

Previous topic

pymel.core.general.instancer

Next topic

pymel.core.general.isDirty

Core

Core Modules

Other Modules

This Page