Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
affects([by=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
affects is undoable, NOT queryable, and NOT editable.
This command gets the list of attributes on a node or node type that are affected by the named attribute.string List of affected/affecting attributes
Long name (short name) | argument types | Properties | ||
---|---|---|---|---|
by()
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # List the attributes on node "sphere" that the "tx" attribute affects cmds.sphere( n='sphere' ) cmds.affects( 'tx', 'sphere' ) # List the attributes on nodes of type "transform" that the "ty" attribute # is affected by cmds.affects( 'ty', by=True, t='transform' ) # List the attributes on nodes of type "revolve" that the "outputSurface" # attribute affects. cmds.affects( 'outputSurface', t='revolve' )