Go to: Synopsis. Flags. Return value. Python examples.
manipMoveContext(
[object]
, [activeHandle=int], [activeHandleNormal=int], [alignAlong=[double, double, double]], [interactiveUpdate=boolean], [mode=int], [orientAxes=[double, double, double]], [orientTowards=[double, double, double]], [position=boolean], [reflection=boolean], [reflectionAbout=boolean], [reflectionAxis=boolean], [reflectionTolerance=boolean], [snap=boolean], [snapComponentsRelative=boolean], [snapLiveFaceCenter=boolean], [snapLivePoint=boolean], [snapRelative=boolean], [snapValue=double])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
manipMoveContext is undoable, queryable, and editable.
This command can be used to create, edit, or query a move
manip context.
Note that the flags -s, -sv, -sr, -scr, -slp, -slf control
the global behaviour of all move manip context. Changing one
context independently is not allowed. Changing a context's
behaviour using the above flags, will change all existing move
manip context.
activeHandle, activeHandleNormal, alignAlong, interactiveUpdate, mode, orientAxes, orientTowards, position, reflection, reflectionAbout, reflectionAxis, reflectionTolerance, snap, snapComponentsRelative, snapLiveFaceCenter, snapLivePoint, snapRelative, snapValue
| Long name (short name) |
[argument types] |
Properties |
mode(m)
|
int
|

|
|
Translate mode
0 - Object Space
1 - Local Space
2 - World Space (default)
3 - Move Along Vertex Normal
4 - Move Along Rotation Axis
5 - Move Along Live Object Axis
6 - Custom Axis Orientation
In query mode, this flag needs a value.
|
|
activeHandle(ah)
|
int
|

|
|
Values can be:
0 - X axis handle is active
1 - Y axis handle is active
2 - Z axis handle is active
3 - Center handle (all 3 axes) is active (default)
In query mode, this flag needs a value.
|
|
position(p)
|
boolean
|
|
|
Returns the current position of the manipulator
In query mode, this flag needs a value.
|
|
orientAxes(oa)
|
[double, double, double]
|

|
|
Orients manipulator rotating around axes by specified angles
In query mode, this flag needs a value.
|
|
orientTowards(ot)
|
[double, double, double]
|

|
|
Orients active handle towards world point
|
|
alignAlong(aa)
|
[double, double, double]
|

|
|
Aligns active handle along vector.
|
|
interactiveUpdate(iu)
|
boolean
|

|
|
Value can be : true or false.
This flag value is valid only if the mode is 3 i.e. move vertex normal.
In query mode, this flag needs a value.
|
|
activeHandleNormal(ahn)
|
int
|
|
|
0 - U axis handle is active
1 - V axis handle is active
2 - N axis handle is active ( default )
3 - Center handle (all 3 axes) is active
applicable only when the manip mode is 3.
|
|
snap(s)
|
boolean
|

|
|
Value can be : true or false.
Enable/Disable the discrete move.
If set to true, the move manipulator of all the
move contexts would snap at discrete points
along the active handle during mouse drag. The
interval between the points can be controlled
using the 'snapValue' flag.
In query mode, this flag needs a value.
|
|
snapValue(sv)
|
double
|

|
|
Applicable only when the snap is enabled.
The manipulator of all move contexts would move in
steps of 'snapValue'
In query mode, this flag needs a value.
|
|
snapRelative(sr)
|
boolean
|

|
|
Value can be : true or false.
Applicable only when the snap is enabled.
If true, the snapValue is treated relative to the
original position before moving.
If false, the snapValue is treated relative to the
world origin.
NOTE: If in local/object Space Mode,
the snapRelative should be ON.
Absolute discrete move is not supported
in local/object mode.
In query mode, this flag needs a value.
|
|
snapComponentsRelative(scr)
|
boolean
|

|
|
Value can be : true or false.
If true, while snapping a group of CVs/Vertices, the
relative spacing between them will be preserved.
If false, all the CVs/Vertices will be snapped to the
target point
(is used during grid snap(hotkey 'x'), and
point snap(hotkey 'v'))
Depress the 'x' key before click-dragging the manip handle
and check to see the behaviour of moving a bunch of CVs,
with this flag ON and OFF.
In query mode, this flag needs a value.
|
|
snapLivePoint(slp)
|
boolean
|

|
|
Value can be : true or false.
If true, while moving on the live polygon object, the
move manipulator will snap to the vertices of the object.
In query mode, this flag needs a value.
|
|
snapLiveFaceCenter(slf)
|
boolean
|

|
|
Value can be : true or false.
If true, while moving on the live polygon object, the
move manipulator will snap to the face centers of the object.
In query mode, this flag needs a value.
|
|
reflection(rfl)
|
boolean
|
 
|
|
Value can be true or false.
If true, the corresponding symmetric components also will be moved
C: Default is False. Q : When queried, it returns a boolean.
In query mode, this flag needs a value.
|
|
reflectionAbout(rab)
|
boolean
|
 
|
|
Sets the position of the reflection axis either at the origin or the bounding box
Value can be
0 - at origin
1 - at the bounding box center.
C: Default is 1. Q : When queried, it returns an int
In query mode, this flag needs a value.
|
|
reflectionAxis(rfa)
|
boolean
|
 
|
|
Specifies the reflection axis either X or Y or Z
Value can be
0 - X = 0 plane
1 - Y =0 plane.
2 - Z =0 plane.
C: Default is 0. Q : When queried, it returns an int
In query mode, this flag needs a value.
|
|
reflectionTolerance(rft)
|
boolean
|

|
|
Specifies the tolerance to findout the corresponding symmetric components
In query mode, this flag needs a value.
|
|
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.
|
string (the name of the new context)
import maya.cmds as cmds
# To create a new move context:
cmds.manipMoveContext()
# To query the mode of an existing context:
cmds.manipMoveContext( 'manipMoveContext1', q=True, mode=True )
# To edit an existing context to come up with the X axis handle
# active by default:
cmds.manipMoveContext( 'manipMoveContext1', e=True, ah=0 )
cmds.spaceLocator( p=(0, 0, 0), name='locatorA' )
cmds.manipMoveContext( 'manipMoveContext1', e=True, m=2 ) # WorldSpace
cmds.manipMoveContext( 'manipMoveContext1', e=True, snap=True )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snapValue=0.4 )
# Now, dragging any of the move handles will
# move the object in steps of 0.4 units.
cmds.move( 0.8, 0, 0, 'locatorA', a=True )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snap=True )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snapValue=2 )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snapRelative=False )
# Now, dragging X-axis handle will
# move the object in steps of 2 units, and will
# place the object anywhere in (0,0,0) (2,0,0) (4,0,0) ...etc
# NOTE: If in objectSpace Mode, the snapRelative should be ON.
# Absolute discrete move is not supported in objectSpace mode.
cmds.move( 0.8, 0, 0, 'locatorA', a=True )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snap=True )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snapValue=2 )
cmds.manipMoveContext( 'manipMoveContext1', e=True, snapRelative=True )
# Now, dragging X-axis handle will
# move the object in steps of 2 units, and will
# place the object anywhere in (2.8,0,0) (4.8,0,0) (6.8,0,0) ...etc
Return to Autodesk Index