blenderproc.python.utility.Initializer module

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

Bases: object

static _remove_all_data()[source]

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

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.cleanup()[source]

Resets the scene to its clean state, but keeping the UI as it is

blenderproc.python.utility.Initializer.init(horizon_color=[0.05, 0.05, 0.05], compute_device='GPU', compute_device_type=None, use_experimental_features=False, clean_up_scene=True)[source]

Initializes basic blender settings, the world and the camera.

Also cleans up the whole scene at first.

Parameters:
  • horizon_color (list) – The color to use for the world background.
  • compute_device (str) – The compute device to use for the Cycles Render Engine i.e. CPU or GPU. (default: GPU).
  • compute_device_type (Optional[str]) – The compute device type to use for the Cycles Render Engine i.e. OPTIX or CUDA. Only necessary to specify, if compute device is GPU. If None is given, the available device type is used (OPTIX is preferred).
  • use_experimental_features (bool) – Set to True, if you want to use the Experimental features of the Cycles Render Engine i.e Adaptive subdivision. (default: False).
  • clean_up_scene (bool) – Set to False, if you want to keep all scene data.