blenderproc.python.utility.Initializer module

This module provides functions to init a BlenderProc scene.

class blenderproc.python.utility.Initializer._Initializer[source]

Bases: object

This is the initializer class used to init a BlenderProc scene.

static remove_all_data(remove_camera=True)[source]

Remove all data blocks except opened scripts, the default scene and the camera.

Parameters:

remove_camera (bool) – If True, also the default camera is removed.

static remove_custom_properties()[source]

Remove all custom properties registered at global entities like the scene.

static set_default_parameters()[source]

Loads and sets default parameters defined in DefaultConfig.py

blenderproc.python.utility.Initializer.clean_up(clean_up_camera=False)[source]

Resets the scene to its clean state.

This method removes all objects, camera poses and cleans up the world background. All (renderer) settings and the UI are kept as they are.

Parameters:

clean_up_camera (bool) – If True, also the camera is set back to its clean state.

blenderproc.python.utility.Initializer.init(clean_up_scene=True)[source]

Initializes BlenderProc.

Cleans up the whole scene at first and then initializes basic blender settings, the world, the renderer and the camera. This method should only be called once in the beginning. If you want to clean up the scene afterwards, use bproc.clean_up()

Parameters:

clean_up_scene (bool) – Set to False, if you want to keep all scene data.