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

Synopsis

xformConstraint([alongNormal=int], [live=boolean], [type=string])

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

xformConstraint is undoable, queryable, and editable.

This command allows you to change the transform constraint used by the transform tools during component transforms.

Return value

None

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

Related

move, rotate, scale

Flags

alongNormal, live, type
Long name (short name) Argument types Properties
alongNormal(n) int queryedit
When set the transform constraint will first be applied along the vertex normals of the components being transformed. When queried, returns the current state of this option.
live(l) boolean query
Query-only flag that can be used to check whether the current live surface will be used as a transform constraint.
type(t) string createqueryedit
Set the type of transform constraint to use. When queried, returns the current transform constraint as a string.
  • none - no constraint
  • surface - constrain components to their surface
  • edge - constrain components to surface edges

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

# Return the current transform constraint
cmds.xformConstraint(query=True, type=True)

# Constrain moving components to the surface
cmds.symmetricModelling(type="surface")