Go to: Synopsis. Return value. Flags. Python examples.
transformLimits(
[object]
, [enableRotationX=[boolean, boolean]], [enableRotationY=[boolean, boolean]], [enableRotationZ=[boolean, boolean]], [enableScaleX=[boolean, boolean]], [enableScaleY=[boolean, boolean]], [enableScaleZ=[boolean, boolean]], [enableTranslationX=[boolean, boolean]], [enableTranslationY=[boolean, boolean]], [enableTranslationZ=[boolean, boolean]], [remove=boolean], [rotationX=[angle, angle]], [rotationY=[angle, angle]], [rotationZ=[angle, angle]], [scaleX=[float, float]], [scaleY=[float, float]], [scaleZ=[float, float]], [translationX=[linear, linear]], [translationY=[linear, linear]], [translationZ=[linear, linear]])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
transformLimits is undoable, queryable, and editable.
The transformLimits command allows us to set, edit, or query
the limits of the transformation that can be applied to objects.
We can also turn any limits off which may have been previously set.
When an object is first created, all the transformation limits are off
by default.
Transformation limits allow us to control how much an object can
be transformed. This is most useful for joints, although it can be
used any place we would like to limit the movement of an object.
Default values are:
( -1, 1) for translation,
( -1, 1) for scaling, and
(-45,45) for rotation.
None
In query mode, return type is based on queried flag.
enableRotationX, enableRotationY, enableRotationZ, enableScaleX, enableScaleY, enableScaleZ, enableTranslationX, enableTranslationY, enableTranslationZ, remove, rotationX, rotationY, rotationZ, scaleX, scaleY, scaleZ, translationX, translationY, translationZ
Long name (short name) |
Argument types |
Properties |
|
enableRotationX(erx)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper x-rotation limits
When queried, it returns boolean boolean
|
|
enableRotationY(ery)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper y-rotation limits
When queried, it returns boolean boolean
|
|
enableRotationZ(erz)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper z-rotation limits
When queried, it returns boolean boolean
|
|
enableScaleX(esx)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper x-scale limits
When queried, it returns boolean boolean
|
|
enableScaleY(esy)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper y-scale limits
When queried, it returns boolean boolean
|
|
enableScaleZ(esz)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper z-scale limits
When queried, it returns boolean boolean
|
|
enableTranslationX(etx)
|
[boolean, boolean]
|
|
|
enable/disable the ower and upper x-translation limits
When queried, it returns boolean boolean
|
|
enableTranslationY(ety)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper y-translation limits
When queried, it returns boolean boolean
|
|
enableTranslationZ(etz)
|
[boolean, boolean]
|
|
|
enable/disable the lower and upper z-translation limits
When queried, it returns boolean boolean
|
|
remove(rm)
|
boolean
|
|
|
turn all the limits off and reset them to their default values
|
|
rotationX(rx)
|
[angle, angle]
|
|
|
set the lower and upper x-rotation limits
When queried, it returns angle angle
|
|
rotationY(ry)
|
[angle, angle]
|
|
|
set the lower and upper y-rotation limits
When queried, it returns angle angle
|
|
rotationZ(rz)
|
[angle, angle]
|
|
|
set the lower and upper z-rotation limits
When queried, it returns angle angle
|
|
scaleX(sx)
|
[float, float]
|
|
|
set the lower and upper x-scale limits
When queried, it returns float float
|
|
scaleY(sy)
|
[float, float]
|
|
|
set the lower and upper y-scale limits
When queried, it returns float float
|
|
scaleZ(sz)
|
[float, float]
|
|
|
set the lower and upper z-scale limits
When queried, it returns float float
|
|
translationX(tx)
|
[linear, linear]
|
|
|
set the lower and upper x-translation limits
When queried, it returns linear linear
|
|
translationY(ty)
|
[linear, linear]
|
|
|
set the lower and upper y-translation limits
When queried, it returns linear linear
|
|
translationZ(tz)
|
[linear, linear]
|
|
|
set the lower and upper z-translation limits
When queried, it returns linear linear
|
|
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
# Create an object, e.g.
cmds.cone()
# 1. To set the limits for the translation of the cone to within
# a unit volume centered at the origin
cmds.transformLimits( tx=(-1, 1), ty=(-1, 1), tz=(-1, 1) )
# 2. To disable the lower limits
cmds.transformLimits( etx=(False, True), ety=(False, True), etz=(False, True ) )