Go to: Synopsis. Return value. Related. Flags. Python examples.
disconnectAttr(
attribute attribute
, [nextAvailable=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
disconnectAttr is undoable, NOT queryable, and NOT editable.
Disconnects two connected attributes. First argument is the source
attribute, second is the destination.
string | A phrase containing the names of the disconnected attributes. |
addAttr, connectAttr, getAttr, listAttr, setAttr
nextAvailable
Long name (short name) |
Argument types |
Properties |
|
nextAvailable(na)
|
boolean
|
|
|
If the destination multi-attribute has set the indexMatters
to be false, the command will disconnect the first matching
connection. No index needs to be specified.
|
|
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 have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
# Create a sphere and cone and connect their rotate attribute.
#
sph = cmds.sphere()
con = cmds.cone()
sphereR = '%s.r' % sph[0]
coneR = '%s.r' % con[0]
cmds.connectAttr(sphereR, coneR)
# Break the connection between the rotate attributes.
#
cmds.disconnectAttr(sphereR, coneR)