Cancel Interactive Tool
tb.ops.tool.cancel() -> ResultClose the open session and restore the start exactly. Calling it with no session open does nothing.
Docs · Python API
tb.ops.tool8 operations. Without targets=, an operation works on the current selection, like its button in the editor.
tb.ops.tool.cancel() -> ResultClose the open session and restore the start exactly. Calling it with no session open does nothing.
tb.ops.tool.commit() -> ResultApply the open session as ONE undo step and close it. A failed commit restores the start and closes the session.
tb.ops.tool.input(*, input: Any) -> ResultAdd one input to the open session (see tool.list for each tool's inputs); the preview follows.
| Argument | Type | Default | Description |
|---|---|---|---|
input | Any | required | One input (see tool.list). |
tb.ops.tool.list() -> ResultThe registered interactive tools, their operations and the inputs each accepts.
tb.ops.tool.preview(*, params: Any) -> ResultChange the open session's operation parameters (strict: only that operation's parameters); the preview follows.
| Argument | Type | Default | Description |
|---|---|---|---|
params | Any | required | Parameters to change. |
tb.ops.tool.run(
*,
tool: Literal["knife", "bisect", "drawCutter", "fillHole"],
params: Any = {},
inputs: Any = [],
) -> ResultThe dialog flow: run a tool once with all its inputs as ONE undo step. Refused while a session is open.
| Argument | Type | Default | Description |
|---|---|---|---|
tool | Literal["knife", "bisect", "drawCutter", "fillHole"] | required | Tool id. (knife / bisect / drawCutter / fillHole). |
params | Any | {} | The tool operation's parameters. |
inputs | Any | [] | Inputs, in order, as tool.input takes them. |
tb.ops.tool.start(
*,
tool: Literal["knife", "bisect", "drawCutter", "fillHole"],
params: Any = {},
) -> ResultOpen an interactive tool session (one at a time). Parameters are the tool operation's own; the live result shows when the operation previews.
| Argument | Type | Default | Description |
|---|---|---|---|
tool | Literal["knife", "bisect", "drawCutter", "fillHole"] | required | Tool id. (knife / bisect / drawCutter / fillHole). |
params | Any | {} | The tool operation's parameters. |
tb.ops.tool.state() -> ResultThe open session (tool, parameters, inputs, preview), or null.