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

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

Add Joint

tb.ops.skeleton.add_joint(
    *,
    name: str = ...,
    parent: str = ...,
    translation: Vec3Like = ...,
    rotation: Vec3Like = ...,
) -> Result

Add a plain joint (Maya's Create Joint) under a parent joint, or as a new root: its rest translation and rotation (Euler degrees, XYZ) are local to the parent. It is bound where it stands, so the skin does not move. Without a parent it goes under the one selected joint; without a translation it lands halfway along the parent's bone (towards its first child, or on past a chain end); without a name it is joint1, joint2, ….

  • Operation skeleton.add_joint
  • In Control Rig
ArgumentTypeDefaultDescription
namestr—Joint name (default: the next free jointN).
parentstr—Parent joint name or id (default: the one selected joint; none: a new root).
translationVec3Like—Translation.
rotationVec3Like—Rotation.

Orient Joints

tb.ops.skeleton.orient_joints(
    *,
    joints: Any = ...,
    aim_axis: Literal["X", "-X", "Y", "-Y", "Z", "-Z"] = "X",
    up_axis: Literal["X", "-X", "Y", "-Y", "Z", "-Z"] = "Y",
    world_up: Vec3Like = [0.0, 1.0, 0.0],
) -> Result

Re-orient joints: each aims its aim axis at its first child and points its up axis toward the world-up vector; joints stay in place and the skin stays bound. Clips that animate them are reconciled at the next switch or save.

  • Operation skeleton.orient_joints
  • In Control Rig
ArgumentTypeDefaultDescription
jointsAny—Joint names (default: every joint).
aim_axisLiteral["X", "-X", "Y", "-Y", "Z", "-Z"]"X"Aim Axis (X / -X / Y / -Y / Z / -Z).
up_axisLiteral["X", "-X", "Y", "-Y", "Z", "-Z"]"Y"Up Axis (X / -X / Y / -Y / Z / -Z).
world_upVec3Like[0.0, 1.0, 0.0]World Up.

Rename Joint

tb.ops.skeleton.rename_joint(*, joint: str = ..., name: str) -> Result

Rename a joint. Everything that names it follows in the same step: clip curves, control-rig guides, module and tech-joint settings, the pose library, retarget setups and mixer masks. Joint names are unique within the skeleton; joints the control rig's modules make are renamed through their module.

  • Operation skeleton.rename_joint
  • In Previewer
ArgumentTypeDefaultDescription
jointstr—Joint name or id (default: the single selected joint).
namestrrequiredNew name.

Scale Joint Chain

tb.ops.skeleton.scale_chain(
    *,
    joint: str,
    factor: float,
    keep_ground: bool = True,
) -> Result

Lengthen or shorten the chain below a joint (e.g. a leg by 1.2). With keepGround (default) the skeleton moves vertically so its lowest joint stays on the ground. The skin stays bound; clips adapt at the next switch or save.

  • Operation skeleton.scale_chain
  • In Control Rig
ArgumentTypeDefaultDescription
jointstrrequiredJoint.
factorfloatrequiredFactor (0.05…20).
keep_groundboolTrueKeep Ground.

Set Joint Rest

tb.ops.skeleton.set_joint(
    *,
    joint: str,
    translation: Vec3Like = ...,
    rotation: Vec3Like = ...,
    scale: Vec3Like = ...,
    keep_children: bool = True,
) -> Result

Set a joint's rest translation, rotation (Euler degrees in its order) or scale. With keepChildren (default) its children keep their world placement. The skin stays bound.

  • Operation skeleton.set_joint
  • In Control Rig
ArgumentTypeDefaultDescription
jointstrrequiredJoint.
translationVec3Like—Translation.
rotationVec3Like—Rotation.
scaleVec3Like—Scale.
keep_childrenboolTrueKeep Children.

Set Rotation Order

tb.ops.skeleton.set_rotation_order(
    *,
    joints: Any = ...,
    order: Literal["xyz", "xzy", "yzx", "yxz", "zxy", "zyx"],
) -> Result

Set the rotation order joints' animation curves use. The rest pose is unchanged; clips are re-encoded in the new order at the next switch or save.

  • Operation skeleton.set_rotation_order
  • In Control Rig
ArgumentTypeDefaultDescription
jointsAny—Joints.
orderLiteral["xyz", "xzy", "yzx", "yxz", "zxy", "zyx"]requiredOrder (xyz / xzy / yzx / yxz / zxy / zyx).