pymel.core.general.affects

affects(*args, **kwargs)

This command returns the list of attributes on a node or node type which affect the named attribute.

Flags:
Long name (short name) Argument Types Properties
by (()) bool ../../../_images/create.gif
 
Show attributes that are affected by the given one rather than the ones that affect it.
type (t) unicode ../../../_images/create.gif
 

static node type from which to get ‘affects’ informationFlag 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.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'] #

Previous topic

pymel.core.general.affectedNet

Next topic

pymel.core.general.aliasAttr

Core

Core Modules

Other Modules

This Page