Control the object location. An example config file using this control can be found here:

class threedb.controls.blender.position.PositionControl(root_folder: str)

Bases: threedb.controls.base_control.PreProcessControl

This control changes the position of the object (i.e. translates it)


The change in position is relative to the object’s original position.

Continuous Parameters:

  • offset_x: Translation component along the world’s x-axis (default range: [-1, 1])

  • offset_y: Translation component along the world’s y-axis (default range: [-1, 1])

  • offset_z: Translation component along the world’s z-axis (default range: [-1, 1])

Example images

Varying the position across the relevant parameters.

__init__(root_folder: str)

Construct a BaseControl


root_folder – The folder containing all the data for this 3DB experiment. All paths are lative to his folder

apply(context: Dict[str, Any], control_args: Dict[str, Any])None

Modify the target give a combination of the inputs the control needs

  • context (Dict[str, Any]) – A dictionary representation of the current scene.

  • control_args (Dict[str, Any]) – a dict containing an entry for each of the discrete and continuous parameters declared by the Control

  • the scene in-place (Modifies) –

  • return value. (no) –

unapply(context: Dict[str, Any])None

Undo the modification on a scene


Most of the time, recreating a scene is very expensive, therefore, controls are asked to implement a reverse operation to undo their changes. Controls that need to store state in order to undo their actions should add data to the target object they received.


context (Dict[str, Any]) – The description of the scene to render


alias of threedb.controls.blender.position.PositionControl