Skip to content
AlphaToolBox3D is in early alpha: features are incomplete and things can break. Use it at your own risk and keep copies of your files. Report a problem
ToolBox3D

Docs · Python API

tb.ops.limits

2 operations. Without targets=, an operation works on the current selection, like its button in the editor.

Get Transform Limits

tb.ops.limits.get(
    *,
    node: ObjectRef = ...,
    joint: str = ...,
    control: str = ...,
) -> Result

Read the transform limits of an object, a joint or a control: for translate, rotate and scale, each axis's min, max, minEnabled and maxEnabled. Default: the active selected object, else the last selected joint or control. Read-only.

  • Operation limits.get
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
nodeObjectRef—Object.
jointstr—Joint name or id.
controlstr—Control name or id.

Set Transform Limits

tb.ops.limits.set(
    *,
    nodes: Sequence[ObjectRef] = ...,
    joints: Any = ...,
    controls: Any = ...,
    channel: Literal["translate", "rotate", "scale"],
    axis: Literal["x", "y", "z"] = ...,
    min: float = ...,
    max: float = ...,
    min_enabled: bool = ...,
    max_enabled: bool = ...,
) -> Result

Set the minimum and/or maximum of one transform channel and switch each bound on or off on objects (Model), joints or controls (Control Rig). Rotate limits are Euler degrees in the transform's rotation order (for a joint, the turn away from its rest orientation). Omit axis to set X, Y and Z together. Targets: nodes, joints or controls, else the selected objects, joints or controls. Enabling a bound clamps an object or a control at once; afterwards the gizmo, typed values and scripts stop at the bounds. A joint's posed channels (clips, posing) stay inside them; its rest pose is not moved.

  • Operation limits.set
  • In Model, Control Rig
ArgumentTypeDefaultDescription
nodesSequence[ObjectRef]—Objects to limit.
jointsAny—Joint names or ids to limit.
controlsAny—Control names or ids to limit.
channelLiteral["translate", "rotate", "scale"]requiredChannel (translate / rotate / scale).
axisLiteral["x", "y", "z"]—One axis (default: all three). (x / y / z).
minfloat—Lower bound.
maxfloat—Upper bound.
min_enabledbool—Apply the lower bound.
max_enabledbool—Apply the upper bound.