pymel.core.general.rotate

rotate(obj, *args, **kwargs)

The rotate command is used to change the rotation of geometric objects. The rotation values are specified as Euler angles (rx, ry, rz). The values are interpreted based on the current working unit for Angular measurements. Most often this is degrees. The default behaviour, when no objects or flags are passed, is to do a absolute rotate on each currently selected object in the world space.

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

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

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

Flags:
  • absolute : a (bool) [create]

    Perform an absolute operation.

  • centerPivot : cp (bool) [create]

    Let the pivot be the center of the bounding box of all objects

  • deletePriorHistory : dph (bool) []

  • euler : eu (bool) [create]

    Modifer for -relative flag that specifies rotation values should be added to current XYZ rotation values.

  • objectCenterPivot : ocp (bool) [create]

    Let the pivot be the center of the bounding box of each object

  • objectSpace : os (bool) [create]

    Perform rotation about object-space axis.

  • pivot : p (float, float, float) [create]

    Define the pivot point for the transformation

  • preserveChildPosition : pcp (bool) []

  • preserveUV : puv (bool) [create]

    When true, UV values on rotated components are projected across the rotation 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) [create]

    To move the corresponding symmetric components also.

  • reflectionAboutBBox : rab (bool) [create]

    Sets the position of the reflection axis at the geometry bounding box

  • reflectionAboutOrigin : rao (bool) [create]

    Sets the position of the reflection axis at the origin

  • reflectionAboutX : rax (bool) [create]

    Specifies the X=0 as reflection plane

  • reflectionAboutY : ray (bool) [create]

    Specifies the Y=0 as reflection plane

  • reflectionAboutZ : raz (bool) [create]

    Specifies the Z=0 as reflection plane

  • reflectionTolerance : rft (float) [create]

    Specifies the tolerance to findout the corresponding reflected components

  • relative : r (bool) [create]

    Perform a operation relative to the object’s current position

  • rotateX : x (bool) [create]

    Rotate in X direction

  • rotateXY : xy (bool) [create]

    Rotate in X and Y direction

  • rotateXYZ : xyz (bool) [create]

    Rotate in all directions (default)

  • rotateXZ : xz (bool) [create]

    Rotate in X and Z direction

  • rotateY : y (bool) [create]

    Rotate in Y direction

  • rotateYZ : yz (bool) [create]

    Rotate in Y and Z direction

  • rotateZ : z (bool) [create]

    Rotate in Z direction

  • worldSpace : ws (bool) [create]

    Perform rotation about global world-space axis.

Derived from mel command maya.cmds.rotate

Previous topic

pymel.core.general.resetTool

Next topic

pymel.core.general.saveToolSettings

Core

Core Modules

Other Modules

This Page