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

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

List Library Animations

tb.ops.library.list(*, query: str = "", category: str = "") -> Result

The Animation Library (Universal Animation Library 1 & 2 by Quaternius, CC0): every clip with its category, duration, loop flag and root motion, filtered by a search and a category. Read only.

  • Operation library.list
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
querystr""Words that must all appear in the name, label, category or tags.
categorystr""Only this category (empty: all).

Retarget Library Animations

tb.ops.library.retarget(
    *,
    clips: Any,
    clip_options: Any = ...,
    name: str = "",
    options: Any = ...,
    setup: str = "",
    save_setup: bool = True,
    setup_name: str = "",
    confirm_dissimilar: bool = False,
    output: str = "",
    rig: str = "",
    control_options: Any = ...,
    ground: Sequence[ObjectRef] = ...,
    adjust_layer: bool = False,
) -> Result

Put Animation Library clips on this document's character in one step: the clips (with their clip options) are retargeted with the library's mapping preset and the recommended settings, exactly as the Retarget workspace's Library tab does, and written as new skeleton (or control-rig) clips credited to Quaternius (CC0), in one undo step.

  • Operation library.retarget
  • In Animation
ArgumentTypeDefaultDescription
clipsAnyrequiredClip names or labels, or {clip, options} objects.
clip_optionsAny—ClipOptions for every clip without its own.
namestr""The source's name in the locked setup.
optionsAny—RetargetOptions (default: the recommended settings).
setupstr""A saved retarget setup (id or name) to reuse.
save_setupboolTrueLock the mapping as a retarget setup (re-imports of this skeleton reuse it).
setup_namestr""Setup Name.
confirm_dissimilarboolFalseBake even when the characters are very different.
outputstr""skeleton | controlRig | both (default: both when a rig is given, else skeleton).
rigstr""Token of a staged built rig (tb_api::stage_target_rig) for control-rig outputs; empty = the document's own control rig when an output wants one.
control_optionsAny—ControlBakeOptions: per limb IK / FK / both (limbModes), matchIkFk.
groundSequence[ObjectRef]—Mesh objects the character walks on (stairs, rocks, terrain): planted feet stand on them and the body rises and falls with them. Empty = the flat floor.
adjust_layerboolFalseGive every baked skeleton clip an Adjust layer: relative full-body IK offsets on a normal additive layer, with the planted feet held from the contacts.

Stage Library Animations

tb.ops.library.stage(*, clips: Any, clip_options: Any = ..., name: str = "") -> Result

Stage Animation Library clips (with Mixamo-style options: rootMotion, trim, speed, mirror, looping) as a retarget source; pass the returned token as 'source' to animation.retarget. Read only.

  • Operation library.stage
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
clipsAnyrequiredClip names or labels, or {clip, options} objects.
clip_optionsAny—ClipOptions for every clip without its own.
namestr""The source's name (default: the clip, or "Animation Library (N clips)").