pymel.core.context.propModCtx¶
- propModCtx(*args, **kwargs)¶
Controls the proportional move context.
Flags:
Long Name / Short Name Argument Types Properties animCurve / ac unicode Name of the anim curve to use as a drop-off curve. Only the 0 -side of the curve will be used and the distance will be mapped to seconds. The profile of the curve will be used as the profile for propmod function. animCurveFalloff / acf float, float The profile of the curve will be used as the profile for propmod function in both U and V. This will be scaled in U, V according to the paramters provided. The ratio of the U, V scaling parameters will dictate the footprint of the fuction while the curve itself provides the magnitudes. animCurveParam / acp unicode Name of the anim curve to use as a drop-off curve. Only the 0 -side of the curve will be used and the distance will be mapped to seconds, where 1 second maps to 0.01 units in parametric space. direction / d float, float, float Direction along which to compute the distance for the distance based drop-off functions. The default is (1 1 1) exists / ex bool Returns true or false depending upon whether the specified object exists. Other flags are ignored. image1 / i1 unicode First of three possible icons representing the tool associated with the context. image2 / i2 unicode Second of three possible icons representing the tool associated with the context. image3 / i3 unicode Third of three possible icons representing the tool associated with the context. linear / l float If using linear drop-off function, this is its slope. The default of -0.1 means the point at the locator moves with it and the point 10 units away doesn’t move at all. linearParam / lp float, float If using parametric linear drop-off function, these specify its limits along the U and V directions. nurbsCurve / nc unicode Name of the nurbs curve to use as a drop-off curve. The closest point distance would be used as the drop off percentage. powerCutoff / pc float If using the power drop-off function, this is its distance cutoff value. The default is 10.0. powerCutoffParam / pcp float, float If using the power drop-off function, these specify one of it’s limits, 0 for U, and 1 and V. The default cutoff is 10.0. powerDegree / pd float If using the power drop-off function, this is its degree. The default is 3. powerDegreeParam / pdp float If using the power drop-off function, this is its degree. The default is 3. script / s unicode The name of the script to use to compute the drop-off. The script takes 6 floats as input - first 3 are the position of the move locator, the next 3 the position of the point to be manipulated. The script should return a drop-off coefficient which could be negative or zero. scriptParam / sp unicode The name of the script to use to compute the drop-off. The script takes 4 floats as input - first 2 are the parametric position of the move locator, the next 2 the parametric position of the point to be manipulated. The script should return a drop-off coefficient which could be negative or zero. type / t int Choose the type for the drop-off function. Legal values are 1 for linear, 2 for power, 3 for script, 4 for anim curve. The default is 1. worldspace / ws bool Set the space in which the tool works. True for world space, false for parametric space. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.propModCtx
Example:
import pymel.core as pm # Edit type of propmod context. pm.propModCtx( 'PropMod', e=True, t=1 ) # Result: u'PropMod' # # Activate propmod context. pm.setToolTo( 'PropMod' ) # Change the type and dropoff. pm.propModCtx( 'PropMod', e=True, d=(0, 1, 0) ) # Result: u'PropMod' #