pymel.core.context.manipRotateContext — PyMEL 1.0.7 documentation

pymel.core.context.manipRotateContext

manipRotateContext(*args, **kwargs)

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

Flags:

Long Name / Short Name Argument Types Properties
activeHandle / ah int ../../../_images/query.gif ../../../_images/edit.gif
 

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 active1 - Y axis handle is active2 - Z axis handle is active3 - View rotation handle (outer ring) is active (default)

alignAlong / aa float, float, float ../../../_images/create.gif ../../../_images/edit.gif
 
Aligns active handle along vector.
centerTrackball / ctb bool  
   
currentActiveHandle / cah int ../../../_images/query.gif ../../../_images/edit.gif
 

Sets the active handle for the manip. Values can be: 0 - X axis handle is active1 - Y axis handle is active2 - Z axis handle is active3 - View rotation handle (outer ring) is active4 - Arc Ball is active

editPivotMode / epm bool ../../../_images/query.gif
 
Returns true manipulator is in edit pivot mode
editPivotPosition / epp bool ../../../_images/query.gif
 
Returns the current position of the edit pivot manipulator.
exists / ex bool  
   
image1 / i1 unicode  
   
image2 / i2 unicode  
   
image3 / i3 unicode  
   
lastMode / lm int ../../../_images/query.gif
 
Returns the previous rotation mode.
manipVisible / vis bool ../../../_images/query.gif
 
Returns true if the rotate manipulator is visible.
mode / m int ../../../_images/query.gif ../../../_images/edit.gif
 
Arcball mode (0 - Object Space (default), 1 - World Space, 2 - Gimbal Mode, 3 - Custom Axis Orientation), 9 - Component Space
modifyTranslation / mt bool ../../../_images/query.gif ../../../_images/edit.gif
 

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.

orientAxes / oa float, float, float ../../../_images/query.gif ../../../_images/edit.gif
 
Orients manipulator rotating around axes by specified angles
orientTowards / ot float, float, float ../../../_images/create.gif ../../../_images/edit.gif
 
Orients active handle towards world point
pinPivot / pin bool ../../../_images/query.gif ../../../_images/edit.gif
 
Pin component pivot. When the component pivot is set and pinned selection changes will not reset the pivot position and orientation.
position / p bool ../../../_images/query.gif
 
Returns the current position of the manipulator.
postCommand / psc script ../../../_images/create.gif ../../../_images/edit.gif
 
Specifies a command to be executed when the tool is exited.
postDragCommand / pod script, <type ‘unicode’> ../../../_images/create.gif ../../../_images/edit.gif
 
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.
preCommand / prc script ../../../_images/create.gif ../../../_images/edit.gif
 
Specifies a command to be executed when the tool is entered.
preDragCommand / prd script, <type ‘unicode’> ../../../_images/create.gif ../../../_images/edit.gif
 
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.
preserveChildPosition / pcp bool ../../../_images/query.gif ../../../_images/edit.gif
 

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 bool ../../../_images/query.gif ../../../_images/edit.gif
 

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.

reflection / rfl bool  
 
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.
rotate / ro float, float, float ../../../_images/query.gif ../../../_images/edit.gif
 

Returns the rotation of the manipulator for its current orientation/mode. Flag can have multiple arguments, passed either as a tuple or a list.

snap / s bool  
   
snapPivotOri / spo bool ../../../_images/query.gif ../../../_images/edit.gif
 
Snap pivot orientation. Modify pivot orientation when snapping the pivot to a component.
snapPivotPos / spp bool ../../../_images/query.gif ../../../_images/edit.gif
 
Snap pivot position. Modify pivot position when snapping the pivot to a component.
snapRelative / sr bool  
   
snapValue / sv float  
   
tweakMode / twk bool ../../../_images/query.gif ../../../_images/edit.gif
 
When true, the manipulator is hidden and highlighted components can be selected and rotated in one step using a click-drag interaction.
useCenterPivot / ucp bool ../../../_images/query.gif ../../../_images/edit.gif
 
When true, use the center of the selection’s bounding box as the center of the rotation (for all objects).
useManipPivot / ump bool ../../../_images/query.gif ../../../_images/edit.gif
 
When true, use the manipulator’s center as the center of the rotation (for all objects).
useObjectPivot / uop bool ../../../_images/query.gif ../../../_images/edit.gif
 
When true, use each object’s pivot as the center of its rotation.
xformConstraint / xc unicode ../../../_images/query.gif ../../../_images/edit.gif
 
none - no transform constraintedge - edge transform constraintsurface - surface transform constraint

Derived from mel command maya.cmds.manipRotateContext

Example:

import pymel.core as pm

# To create a new rotate context:
pm.manipRotateContext()
# Result: u'manipRotateContext2' #

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

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