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

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

Get Preferences

tb.ops.preferences.get(*, key: str = ...) -> Result

Read the application preferences (Settings ▸ Camera & Navigation, Animation & Time, Manipulators & Selection, Units, Undo & Files, Performance): one key ("camera.fieldOfView"), or every key when none is given.

  • Operation preferences.get
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
keystr—A key from preferences.list; omit for all.

List Preferences

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

Every application preference: key, Settings section and group, label, help, kind (bool, number with range and unit, choice with options, color) and default.

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

Reset Preferences

tb.ops.preferences.reset(
    *,
    section: Literal["viewport", "camera", "animation", "manipulators", "units", "files", "performance"] = ...,
) -> Result

Restore one section's preferences (viewport, camera, animation, manipulators, units, files, performance) to the defaults, or every preference when no section is given.

  • Operation preferences.reset
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
sectionLiteral["viewport", "camera", "animation", "manipulators", "units", "files", "performance"]—Section (viewport / camera / animation / manipulators / units / files / performance).

Set Preferences

tb.ops.preferences.set(*, values: Any) -> Result

Change application preferences: {"values": {key: value, …}} (keys and allowed values from preferences.list). Applies at once to every editor and is remembered on this device; no document Undo step. Returns every preference.

  • Operation preferences.set
  • In Previewer, Model, Control Rig, Animation, Texture Paint
ArgumentTypeDefaultDescription
valuesAnyrequired{key: value}, e.g. {"camera.fieldOfView": 35}.