Your Ad Here

Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

propModCtx( toolName , [animCurve=string], [animCurveFalloff=[float, float]], [animCurveParam=string], [direction=[float, float, float]], [linear=float], [linearParam=[int, float]], [nurbsCurve=string], [powerCutoff=float], [powerCutoffParam=[int, float]], [powerDegree=float], [powerDegreeParam=float], [script=string], [scriptParam=string], [type=int], [worldspace=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

propModCtx is undoable, queryable, and editable.

Controls the proportional move context.

Flags

animCurve, animCurveFalloff, animCurveParam, direction, linear, linearParam, nurbsCurve, powerCutoff, powerCutoffParam, powerDegree, powerDegreeParam, script, scriptParam, type, worldspace
Long name (short name) [argument types] Properties
type(t) int createqueryedit
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.

In query mode, this flag needs a value.

linear(l) float createqueryedit
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.

In query mode, this flag needs a value.

powerCutoff(pc) float createqueryedit
If using the power drop-off function, this is its distance cutoff value. The default is 10.0.

In query mode, this flag needs a value.

powerDegree(pd) float createqueryedit
If using the power drop-off function, this is its degree. The default is 3.

In query mode, this flag needs a value.

script(s) string createqueryedit
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.

In query mode, this flag needs a value.

animCurve(ac) string createqueryedit
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.

In query mode, this flag needs a value.

direction(d) [float, float, float] createqueryedit
Direction along which to compute the distance for the distance based drop-off functions. The default is (1 1 1)

In query mode, this flag needs a value.

nurbsCurve(nc) string createqueryedit
Name of the nurbs curve to use as a drop-off curve. The closest point distance would be used as the drop off percentage.

In query mode, this flag needs a value.

worldspace(ws) boolean createqueryedit
Set the space in which the tool works. True for world space, false for parametric space.

In query mode, this flag needs a value.

linearParam(lp) [int, float] createqueryedit
If using parametric linear drop-off function, these specify one of it's limits, 0 for U, and 1 and V.

In query mode, this flag needs a value.

powerCutoffParam(pcp) [int, float] createqueryedit
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.

In query mode, this flag needs a value.

powerDegreeParam(pdp) float createqueryedit
If using the power drop-off function, this is its degree. The default is 3.

In query mode, this flag needs a value.

scriptParam(sp) string createqueryedit
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.

In query mode, this flag needs a value.

animCurveParam(acp) string createqueryedit
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.

In query mode, this flag needs a value.

animCurveFalloff(acf) [float, float] createqueryedit
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.

In query mode, this flag needs a value.


Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Return value


string - name of the new context created

Python examples

import maya.cmds as cmds

# Edit type of propmod context.
cmds.propModCtx( 'PropMod', e=True, t=1 )

# Activate propmod context.
cmds.setToolTo( 'PropMod' )

# Change the type and dropoff.
cmds.propModCtx( 'PropMod', e=True, d=(0, 1, 0) )

  

Return to Autodesk Index


Your Ad Here