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

Synopsis

manipScaleContext [-activeHandle int] [-alignAlong float float float] [-constrainAlongNormal boolean] [-currentActiveHandle int] [-editPivotMode boolean] [-editPivotPosition] [-exists] [-image1 string] [-image2 string] [-image3 string] [-lastMode int] [-manipVisible boolean] [-mode int] [-orientAxes float float float] [-orientObject string] [-orientTowards float float float] [-pinPivot boolean] [-pivotOriHandle boolean] [-position] [-postCommand script] [-postDragCommand script string] [-preCommand script] [-preDragCommand script string] [-preserveChildPosition boolean] [-preserveUV boolean] [-preventNegativeScale boolean] [-reflection boolean] [-reflectionAbout int] [-reflectionAxis int] [-reflectionTolerance float] [-scale float float float] [-snapPivotOri boolean] [-snapPivotPos boolean] [-tweakMode boolean] [-xformConstraint string] [object]

manipScaleContext is undoable, queryable, and editable.

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

Return value

string(name of the new context)

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

Flags

activeHandle, alignAlong, constrainAlongNormal, currentActiveHandle, editPivotMode, editPivotPosition, exists, image1, image2, image3, lastMode, manipVisible, mode, orientAxes, orientObject, orientTowards, pinPivot, pivotOriHandle, position, postCommand, postDragCommand, preCommand, preDragCommand, preserveChildPosition, preserveUV, preventNegativeScale, reflection, reflectionAbout, reflectionAxis, reflectionTolerance, scale, snapPivotOri, snapPivotPos, tweakMode, xformConstraint
Long name (short name) Argument types Properties
-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 - Center handle (all axes) is active (default)
-alignAlong(-aa) float float float createedit
Aligns active handle along vector.
-constrainAlongNormal(-xn) boolean queryedit
When true, transform constraints are applied along the vertex normal first and only use the closest point when no intersection is found along the normal.
-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 - Center handle (all axes) is active
  • 4 - XY plane handle is active
  • 5 - YZ plane handle is active
  • 6 - XZ plane handle is active
-editPivotMode(-epm) boolean query
Returns true manipulator is in edit pivot mode
-editPivotPosition(-epp) query
Returns the current position of the edit pivot manipulator.
-exists(-ex) create
Returns true or false depending upon whether the specified object exists. Other flags are ignored.
-image1(-i1) string createqueryedit
First of three possible icons representing the tool associated with the context.
-image2(-i2) string createqueryedit
Second of three possible icons representing the tool associated with the context.
-image3(-i3) string createqueryedit
Third of three possible icons representing the tool associated with the context.
-lastMode(-lm) int query
Returns the previous scaling mode.
-manipVisible(-vis) boolean query
Returns true if the scale manipulator is visible.
-mode(-m) int queryedit
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
  • 9 - Component Space
-orientAxes(-oa) float float float queryedit
Orients manipulator rotating around axes by specified angles
-orientObject(-oo) string createedit
Orients manipulator to the passed in object/component
-orientTowards(-ot) float float float createedit
Orients active handle towards world point
-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.
-pivotOriHandle(-poh) boolean queryedit
When true, the pivot manipulator will show the orientation handle during editing. Default is true.
-position(-p) query
Returns the current position of the manipulator.
-postCommand(-psc) script createedit
Specifies a command to be executed when the tool is exited.
-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.
-preCommand(-prc) script createedit
Specifies a command to be executed when the tool is entered.
-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.
-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.
-preventNegativeScale(-pns) boolean query
When this is true, negative scale is not allowed.
-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.
-scale(-sc) float float float queryedit
Returns the scale of the manipulator for its current orientation/mode.
-snapPivotOri(-spo) boolean queryedit
Snap pivot orientation. Modify pivot orientation when snapping the pivot to a component.
-snapPivotPos(-spp) boolean queryedit
Snap pivot position. Modify pivot position when snapping the pivot to a component.
-tweakMode(-twk) boolean queryedit
When true, the manipulator is hidden and highlighted components can be selected and scaled in one step using a click-drag interaction.
-xformConstraint(-xc) string queryedit
  • none - no transform constraint
  • edge - edge transform constraint
  • surface - surface transform constraint

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 be used more than once in a command.

MEL examples

// To create a new scale context:
manipScaleContext;

// To query the active handle of an existing scale context:
manipScaleContext -q -ah manipScaleContext1;

// To edit an exiting scale context so that it comes up with the X axis
// handle active by default:
manipScaleContext -e -ah 0 manipScaleContext1;