pymel.core.general.scale

static general.scale(obj, *args, **kwargs)

The scale command is used to change the sizes of geometric objects. The default behaviour, when no objects or flags are passed, is to do a relative scale on each currently selected object object using each object’s existing scale pivot point.

Modifications:
  • allows any iterable object to be passed as first argument:

    scale("pSphere1", [0,1,2])
    

NOTE: this command also reorders the argument order to be more intuitive, with the object first

Flags:
Long name (short name) Argument Types Properties
absolute (a) bool ../../../_images/create.gif
 
Perform an absolute operation.
centerPivot (cp) bool ../../../_images/create.gif
 
Let the pivot be the center of the bounding box of all objects
deletePriorHistory (dph) bool  
   
distanceOnly (dso) bool ../../../_images/create.gif
 
Scale only the distance between the objects.
localSpace (ls) bool  
   
objectCenterPivot (ocp) bool ../../../_images/create.gif
 
Let the pivot be the center of the bounding box of each object
objectSpace (os) bool  
   
orientAxes (oa) float, float, float  
   
pivot (p) float, float, float ../../../_images/create.gif
 
Define the pivot point for the transformation
preserveChildPosition (pcp) bool  
   
preserveUV (puv) bool ../../../_images/create.gif
 

When true, UV values on scaled components are projected along the axis of scaling in 3d space. For small edits, this will freeze the world space texture mapping on the object. When false, the UV values will not change for a selected vertices. Default is false. Flag can have multiple arguments, passed either as a tuple or a list.

reflection (rfl) bool ../../../_images/create.gif
 
To move the corresponding symmetric components also.
reflectionAboutBBox (rab) bool ../../../_images/create.gif
 
Sets the position of the reflection axis at the geometry bounding box
reflectionAboutOrigin (rao) bool ../../../_images/create.gif
 
Sets the position of the reflection axis at the origin
reflectionAboutX (rax) bool ../../../_images/create.gif
 
Specifies the X=0 as reflection plane
reflectionAboutY (ray) bool ../../../_images/create.gif
 
Specifies the Y=0 as reflection plane
reflectionAboutZ (raz) bool ../../../_images/create.gif
 
Specifies the Z=0 as reflection plane
reflectionTolerance (rft) float ../../../_images/create.gif
 
Specifies the tolerance to findout the corresponding reflected components
relative (r) bool ../../../_images/create.gif
 
Perform a operation relative to the object’s current position
scaleX (x) bool ../../../_images/create.gif
 
Scale in X direction
scaleXY (xy) bool ../../../_images/create.gif
 
Scale in X and Y direction
scaleXYZ (xyz) bool ../../../_images/create.gif
 
Scale in all directions (default)
scaleXZ (xz) bool ../../../_images/create.gif
 
Scale in X and Z direction
scaleY (y) bool ../../../_images/create.gif
 
Scale in Y direction
scaleYZ (yz) bool ../../../_images/create.gif
 
Scale in Y and Z direction
scaleZ (z) bool ../../../_images/create.gif
 
Scale in Z direction
worldSpace (ws) bool  
   

Derived from mel command maya.cmds.scale

Example:

import pymel.core as pm

pm.scale( 1, 1, 1 )
pm.scale( 3, 3, 3, 'curve1', pivot=(1, 0, 0), absolute=True )

Previous topic

pymel.core.general.saveToolSettings

Next topic

pymel.core.general.scaleComponents

Core

Core Modules

Other Modules

This Page