pymel.core.general.disconnectAttr

disconnectAttr(source, destination=None, inputs=None, outputs=None, **kwargs)

Disconnects two connected attributes. First argument is the source attribute, second is the destination.

Modifications:
  • If no destination is passed, then all inputs will be disconnected if inputs

    is True, and all outputs will be disconnected if outputs is True; if neither are given (or both are None), both all inputs and all outputs will be disconnected

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

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 commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.disconnectAttr

Example:

import pymel.core as pm

#    Create a sphere and cone and connect their rotate attribute.
#
sph = pm.sphere()
con = pm.cone()
sphereR = '%s.r' % sph[0]
coneR = '%s.r' % con[0]
pm.connectAttr(sphereR, coneR)

#    Break the connection between the rotate attributes.
#
pm.disconnectAttr(sphereR, coneR)

Previous topic

pymel.core.general.deleteExtension

Next topic

pymel.core.general.displayAffected

Core

Core Modules

Other Modules

This Page