pymel.core.modeling.propMove

propMove(*args, **kwargs)

Performs a proportional translate, scale or rotate operation on any number of objects. The percentages to rotate, scale or translate by can be specified using either the -p flags or -px, -py, -pz flags. Each selected object must have a corresponding -p or -px, -py, -pz flag. The rotate, scale or translate performed is relative.

Flags:
Long name (short name) Argument Types Properties
percent (p) float ../../../_images/create.gif
 

The percentage effect that the specified x,y,z has on an object. This flag must be specified once for each object, ie. if there are 4 objects specified, there must be 4 -pflags, (otherwise a percentage of 1.0 will be used). This flag generally has a range between 0.0 and 1.0, but can be any float value.

percentX (px) float ../../../_images/create.gif
 

The percentage effect that the specified x has on an object. This flag is specified one per object. The value ranges between 0.0 and 1.0, but can be any float value. If the -p flag has been specified, this flag usage is invalid.

percentY (py) float ../../../_images/create.gif
 

The percentage effect that the specified y has on an object. This flag is specified one per object. The value ranges between 0.0 and 1.0, but can be any float value. If the -p flag has been specified, this flag usage is invalid.

percentZ (pz) float ../../../_images/create.gif
 

The percentage effect that the specified z has on an object. This flag is specified one per object. The value ranges between 0.0 and 1.0, but can be any float value. If the -p flag has been specified, this flag usage is invalid.

pivot (pi) float, float, float ../../../_images/create.gif
 

Specify the pivot about which a rotation or scale will occur. The change in pivot lasts only as long as the current ‘propMove’ command, and so must be used in conjunction with one of the above move flags for any effect to be noticeable. Flag can have multiple arguments, passed either as a tuple or a list.

rotate (r) float, float, float ../../../_images/create.gif
 

Proportionally rotate each object by the given angles. The rotation values are scaled by the percentage specified by that object’s corresponding -percentflag. All angles are in degrees. The rotation is about the pivot specified by the -pivotflag, or (0, 0, 0) if the -pivotflag is not present.

scale (s) float, float, float ../../../_images/create.gif
 

Proportionally scale each object by the given amounts. The scale values are scaled by the percentage specified by that object’s corresponding -percentflag. The position and size of each object is measured relative to the pivot specified by the -pivotflag, and defaults to each object’s individual pivot. In the case of control vertices, or some other object component, the default is the parent object’s pivot.

translate (t) float, float, float ../../../_images/create.gif
 

Proportionally translate each object by the given amounts. The translation values are scaled by the percentage specified by that object’s corresponding -percentflag. The -pivotflag has no effect on translation.

worldSpace (ws) bool  
   

Derived from mel command maya.cmds.propMove

Example:

import pymel.core as pm

pm.propMove( 3, 6, 0, 'surface1', 'surface2', 'surface3', 'surface4', 'surface5', 'surface6', 'surface7', p=[0.1, 0.5, 0.7, 1.0, 0.7, 0.5, 0.1] )
# This performs a proportional translate of (3,6,0) on seven surfaces.
# Note that there are 7 "-p" flags, one for each surface.

pm.propMove( 'surface1', 'surface2', 'surface3', 'surface4', 'surface5', 'surface6', 'surface7', p=[0.1, 0.5, 0.7, 1.0, 0.7, 0.5, 0.1], pivot=(1, 1, 1), s=(3, 3, 3) )
# This performs a proportional scale of (3,3,3) on seven surfaces.
# Note that there are 7 "-p" flags, one for each surface. The scale
# happened about the specified pivot (1,1,1).

pm.propMove( 'surface1', 'surface2', 'surface3', 'surface4', 'surface5', 'surface6', 'surface7', p=[0.1, 0.5, 0.7, 1.0, 0.7, 0.5, 0.1], r=(30, 60, 90) )
# This performs a proportional rotate of (30,60,90) on seven surfaces.
# Note that there are 7 "-p" flags, one for each surface.

pm.propMove( 'surface1', 'surface2', 'surface3', 'surface4', 'surface5', 'surface6', 'surface7', px=[0.1, 0.5, 0.7, 1.0, 0.7, 0.5, 0.1], r=(30, 60, 90) )
# This performs a proportional rotate of (30,60,90) on seven surfaces.
# The percentages are only applied on the rotation 30 about the X axis. The
# percentages along Y and Z are  1.0. Note that there are 7 "-px" flags, one
# for each surface. The surfaces are rotated by 60, 90 in Y and Z.

Previous topic

pymel.core.modeling.projectTangent

Next topic

pymel.core.modeling.querySubdiv

Core

Core Modules

Other Modules

This Page