synthpic2.blender

Blender module.

  • Communication with bpy-module

  • Rendering features

  • Generic functionalities with bpy-module

Submodules

Package Contents

Classes

Gpu

Class to control Blenders access to GPU(s).

Functions

render_to_file(→ None)

Renders an image to a file. The output root will be created, if necessary.

class synthpic2.blender.Gpu

Class to control Blenders access to GPU(s).

Use this class to enable gpu for rendering. It throws a warning if gpu is not available.

Example:
>>> Gpu.enable()
static _make_available() None

Enable GPUs in the main settings of Blender, if available.

classmethod enable() None

Enable GPU for Cycles, if there is at least one available.

static disable() None

Disable GPU.

static _is_gpu_available() bool

Check, if a GPU is available.

Returns:

is_gpu_available: True, if a GPU is available.

synthpic2.blender.render_to_file(output_path: synthpic2.custom_types.AnyPath) None

Renders an image to a file. The output root will be created, if necessary.

Args:

output_path (AnyPath): Path of the output image file.