Controllers#
Controllers are special data graph objects that act as interactive 3D widgets in the viewport.
Use a controller when the user should manipulate something visually and directly in 3D, but the thing they click on is not itself the target scientific object. In other words, a controller is a handle, gizmo, or manipulator that affects other nodes.
Examples include translation, rotation, scaling, or camera-style interaction widgets. For example, see the existing move editors in SAMSON.

Mental model#
A controller is itself a node, but it exists mainly to control other nodes.
The main classes are:
SBDControllerfor the controller objectSBDControllerNodefor the individual interactive pieces of the controller
A controller may contain several controller nodes. In the translation example above, separate nodes handle movement along X, Y, Z, and in the camera plane.
Where controllers fit#
Controllers often work together with other extension types:
- an editor decides when a controller should be created, shown, or activated
- the controller receives interaction through its controller nodes
- the controller updates the actual target nodes in the data graph
That makes controllers a good choice for reusable viewport manipulators.
When to use a controller#
Choose a controller when:
- the interaction is spatial and should stay visible in the 3D view
- the user needs handles, axes, pivots, or drag targets
- the same manipulation behavior may be reused across tools
Do not use a controller for simple command buttons or non-spatial settings panels. Those usually belong in an app or editor.
Example scenario#
Suppose you are building a custom move tool for a new object type:
- the editor activates the tool
- the controller appears around the current selection
- the user drags one controller node
- the controller converts that drag into transforms applied to the underlying data graph nodes
That pattern keeps viewport manipulation logic separate from the higher-level editor workflow.
What to read next#
- Read Editors for the event-routing side of interactive tools.
- Read Data graph if you need to understand how controllers relate to other nodes.