This command gets the list of attributes on a node or node type that are affected by the named attribute.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
by (boolean) | Show attributes that are affected by the given one rather than the ones that it affects. | ||
type (t) | unicode | ||
static node type from which to get ‘affects’ information Flag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.affects
Example:
import pymel.core as pm
# List the attributes on node "sphere" that affect the "tx" attribute
pm.sphere( n='sphere' )
# Result: [nt.Transform(u'sphere'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
pm.affects( 'tx', 'sphere' )
# Result: [u'minTransLimit', u'minTransXLimit', u'maxTransLimit', u'maxTransXLimit', u'minTransLimitEnable', u'minTransXLimitEnable', u'maxTransLimitEnable', u'maxTransXLimitEnable', u'geometry', u'dynamics'] #
# List the attributes on nodes of type "transform" that are affected by
# the "ty" attribute
pm.affects( 'ty', by=True, t='transform' )
# Result: [u'matrix', u'inverseMatrix', u'xformMatrix'] #
# List the attributes on nodes of type "revolve" that affect the
# "outputSurface" attribute
pm.affects( 'outputSurface', t='revolve' )
# Result: [u'inputCurve', u'startSweep', u'endSweep', u'useTolerance', u'degree', u'sections', u'tolerance', u'axis', u'axisX', u'axisY', u'axisZ', u'pivot', u'pivotX', u'pivotY', u'pivotZ', u'autoCorrectNormal', u'computePivotAndAxis', u'radius', u'radiusAnchor', u'axisChoice', u'bridge'] #