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

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

Cancel Interactive Tool

tb.ops.tool.cancel() -> Result

Close the open session and restore the start exactly. Calling it with no session open does nothing.

  • Operation tool.cancel
  • In Previewer, Model, Control Rig, Animation, Texture Paint

Commit Interactive Tool

tb.ops.tool.commit() -> Result

Apply the open session as ONE undo step and close it. A failed commit restores the start and closes the session.

  • Operation tool.commit
  • In Previewer, Model, Control Rig, Animation, Texture Paint

Add Tool Input

tb.ops.tool.input(*, input: Any) -> Result

Add one input to the open session (see tool.list for each tool's inputs); the preview follows.

  • Operation tool.input
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
inputAnyrequiredOne input (see tool.list).

List Interactive Tools

tb.ops.tool.list() -> Result

The registered interactive tools, their operations and the inputs each accepts.

  • Operation tool.list
  • In Previewer, Model, Control Rig, Animation, Texture Paint

Update Tool Parameters

tb.ops.tool.preview(*, params: Any) -> Result

Change the open session's operation parameters (strict: only that operation's parameters); the preview follows.

  • Operation tool.preview
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
paramsAnyrequiredParameters to change.

Run Interactive Tool

tb.ops.tool.run(
    *,
    tool: Literal["knife", "bisect", "drawCutter", "fillHole"],
    params: Any = {},
    inputs: Any = [],
) -> Result

The dialog flow: run a tool once with all its inputs as ONE undo step. Refused while a session is open.

  • Operation tool.run
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
toolLiteral["knife", "bisect", "drawCutter", "fillHole"]requiredTool id. (knife / bisect / drawCutter / fillHole).
paramsAny{}The tool operation's parameters.
inputsAny[]Inputs, in order, as tool.input takes them.

Start Interactive Tool

tb.ops.tool.start(
    *,
    tool: Literal["knife", "bisect", "drawCutter", "fillHole"],
    params: Any = {},
) -> Result

Open an interactive tool session (one at a time). Parameters are the tool operation's own; the live result shows when the operation previews.

  • Operation tool.start
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
toolLiteral["knife", "bisect", "drawCutter", "fillHole"]requiredTool id. (knife / bisect / drawCutter / fillHole).
paramsAny{}The tool operation's parameters.

Interactive Tool State

tb.ops.tool.state() -> Result

The open session (tool, parameters, inputs, preview), or null.

  • Operation tool.state
  • In Previewer, Model, Control Rig, Animation, Texture Paint