Go to: Synopsis. Return value. Flags. Python examples.
manipScaleContext(
[object]
, [activeHandle=int], [alignAlong=[float, float, float]], [currentActiveHandle=int], [editPivotMode=boolean], [editPivotPosition=boolean], [mode=int], [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], [preventNegativeScale=boolean], [reflection=boolean], [reflectionAbout=int], [reflectionAxis=int], [reflectionTolerance=float])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
manipScaleContext is undoable, queryable, and editable.
This command can be used to create, edit, or query a scale manip context.
string | (name of the new context) |
In query mode, return type is based on queried flag.
activeHandle, alignAlong, currentActiveHandle, editPivotMode, editPivotPosition, mode, orientAxes, orientTowards, pinPivot, position, postCommand, postDragCommand, preCommand, preDragCommand, preserveChildPosition, preserveUV, preventNegativeScale, reflection, reflectionAbout, reflectionAxis, reflectionTolerance
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
|
|
activeHandle(ah)
|
int
|

|
|
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 - Center handle (all axes) is active (default)
|
|
currentActiveHandle(cah)
|
int
|

|
|
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 - Center handle (all axes) is active
|
|
position(p)
|
boolean
|
|
|
Returns the current position of the manipulator.
|
|
editPivotPosition(epp)
|
boolean
|
|
|
Returns the current position of the edit pivot manipulator.
|
|
orientAxes(oa)
|
[float, float, float]
|

|
|
Orients manipulator rotating around axes by specified angles
|
|
orientTowards(ot)
|
[float, float, float]
|

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

|
|
Aligns active handle along vector.
|
|
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.
|
|
preCommand(prc)
|
script
|

|
|
Specifies a command to be executed when the tool is entered.
|
|
postCommand(psc)
|
script
|

|
|
Specifies a command to be executed when the tool is exited.
|
|
preDragCommand(prd)
|
[script, string]
|

|
|
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]
|

|
|
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
|
|
|
Returns true manipulator is in edit pivot mode
|
|
preserveChildPosition(pcp)
|
boolean
|

|
|
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
|

|
|
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
|

|
|
Pin component pivot. When the component pivot is set and pinned selection
changes will not reset the pivot position and orientation.
|
|
preventNegativeScale(pns)
|
boolean
|
|
|
When this is true, negative scale is not allowed.
|
|
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.
|
import maya.cmds as cmds
# To create a new scale context:
cmds.manipScaleContext()
# To query the active handle of an existing scale context:
cmds.manipScaleContext( 'manipScaleContext1', q=True, ah=True )
# To edit an exiting scale context so that it comes up with the X axis
# handle active by default:
cmds.manipScaleContext( 'manipScaleContext1', e=True, ah=0 )