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

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

Delete Project Script

tb.ops.project.delete_script(*, path: str) -> Result

Remove a script from the project (saved with the .tb3d; not an undo step).

  • Operation project.delete_script
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
pathstrrequiredScript name or path inside the project's scripts folder (fence.py, tools/fence.py or parts/box.scad).

List Project Scripts

tb.ops.project.list_scripts() -> Result

The scripts saved in this project, Python (.py) and OpenSCAD (.scad): path and size.

  • Operation project.list_scripts
  • In Previewer, Model, Control Rig, Animation, Texture Paint

Read Project Script

tb.ops.project.read_script(*, path: str) -> Result

The text of one project script.

  • Operation project.read_script
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
pathstrrequiredScript name or path inside the project's scripts folder (fence.py, tools/fence.py or parts/box.scad).

Rename Project Script

tb.ops.project.rename_script(*, path: str, to: str) -> Result

Rename a project script.

  • Operation project.rename_script
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
pathstrrequiredScript name or path inside the project's scripts folder (fence.py, tools/fence.py or parts/box.scad).
tostrrequiredThe new name or path.

Save Project Script

tb.ops.project.write_script(*, path: str, text: str) -> Result

Save a Python (.py) or OpenSCAD (.scad) script inside the project (created or replaced). It is saved with the .tb3d; not an undo step.

  • Operation project.write_script
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
pathstrrequiredScript name or path inside the project's scripts folder (fence.py, tools/fence.py or parts/box.scad).
textstrrequiredThe script's source.