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

Synopsis

manipRotateContext( [object] , [activeHandle=int], [alignAlong=[float, float, float]], [currentActiveHandle=int], [editPivotMode=boolean], [editPivotPosition=boolean], [mode=int], [modifyTranslation=boolean], [orientAxes=[float, float, float]], [orientTowards=[float, float, float]], [pinPivot=boolean], [position=boolean], [postCommand=script], [postDragCommand=[script, string]], [preCommand=script], [preDragCommand=[script, string]], [preserveChildPosition=boolean], [preserveUV=boolean], [reflection=boolean], [reflectionAbout=int], [reflectionAxis=int], [reflectionTolerance=float], [useCenterPivot=boolean], [useManipPivot=boolean], [useObjectPivot=boolean])

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

manipRotateContext is undoable, queryable, and editable.

This command can be used to create, edit, or query a rotate manip context.

Return value

string(name of the new context)

In query mode, return type is based on queried flag.

Flags

activeHandle, alignAlong, currentActiveHandle, editPivotMode, editPivotPosition, mode, modifyTranslation, orientAxes, orientTowards, pinPivot, position, postCommand, postDragCommand, preCommand, preDragCommand, preserveChildPosition, preserveUV, reflection, reflectionAbout, reflectionAxis, reflectionTolerance, useCenterPivot, useManipPivot, useObjectPivot
Long name (short name) Argument types Properties
mode(m) int queryedit
Arcball mode (0 - Object Space (default), 1 - World Space, 2 - Gimbal Mode, 3 - Custom Axis Orientation)
activeHandle(ah) int queryedit
Sets the default active handle for the manip. That is, the handle which should be initially active when the tool is activated. Values can be:
  • 0 - X axis handle is active
  • 1 - Y axis handle is active
  • 2 - Z axis handle is active
  • 3 - View rotation handle (outer ring) is active (default)
currentActiveHandle(cah) int queryedit
Sets the active handle for the manip. Values can be:
  • 0 - X axis handle is active
  • 1 - Y axis handle is active
  • 2 - Z axis handle is active
  • 3 - View rotation handle (outer ring) is active
  • 4 - Arc Ball is active
position(p) boolean query
Returns the current position of the manipulator.
editPivotPosition(epp) boolean query
Returns the current position of the edit pivot manipulator.
orientAxes(oa) [float, float, float] queryedit
Orients manipulator rotating around axes by specified angles
orientTowards(ot) [float, float, float] createedit
Orients active handle towards world point
alignAlong(aa) [float, float, float] createedit
Aligns active handle along vector.
preCommand(prc) script createedit
Specifies a command to be executed when the tool is entered.
postCommand(psc) script createedit
Specifies a command to be executed when the tool is exited.
reflection(rfl) boolean
This flag is obsolete. Reflection is now managed as part of selection itself using the symmetricModeling command.
reflectionAbout(rab) int
This flag is obsolete. Reflection is now managed as part of selection itself using the symmetricModeling command.
reflectionAxis(rfa) int
This flag is obsolete. Reflection is now managed as part of selection itself using the symmetricModeling command.
reflectionTolerance(rft) float
This flag is obsolete. Reflection is now managed as part of selection itself using the symmetricModeling command.
preDragCommand(prd) [script, string] createedit
Specifies a command and a node type. The command will be executed at the start of a drag when a node of the specified type is in the selection.
postDragCommand(pod) [script, string] createedit
Specifies a command and a node type. The command will be executed at the end of a drag when a node of the specified type is in the selection.
editPivotMode(epm) boolean query
Returns true manipulator is in edit pivot mode
preserveChildPosition(pcp) boolean queryedit
When false, the children objects move when their parent is rotated. When true, the worldspace position of the children will be maintained as the parent is moved. Default is false.
preserveUV(puv) boolean queryedit
When false, the uvs are not changes to match the vertex edit. When true, the uvs are edited to project to new values to stop texture swimming as vertices are moved.
pinPivot(pin) boolean queryedit
Pin component pivot. When the component pivot is set and pinned selection changes will not reset the pivot position and orientation.
useObjectPivot(uop) boolean queryedit
When true, use each object's pivot as the center of its rotation.
useManipPivot(ump) boolean queryedit
When true, use the manipulator's center as the center of the rotation (for all objects).
useCenterPivot(ucp) boolean queryedit
When true, use the center of the selection's bounding box as the center of the rotation (for all objects).
modifyTranslation(mt) boolean queryedit
When false, and an object is rotated about a point other than its rotate pivot, its rotateTranslate attribute is modified to put the object at the correct position. When true, its translate attribute is used instead. Default is false.

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.

Python examples

import maya.cmds as cmds

# To create a new rotate context:
cmds.manipRotateContext()

# To query the mode of an existing context:
cmds.manipRotateContext( 'manipRotateContext1', q=True, mode=True )

# To edit an existing context to come up with the X axis
# handle active by default:
cmds.manipRotateContext( 'manipRotateContext1', e=True, ah=0 )