blendersynth.blender.render

blendersynth.blender.render.ENGINES = ['BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'CYCLES']

List of valid render engines

blendersynth.blender.render.render(animation=False)[source]

Render the scene

Parameters:

animation (bool) – If True, render the animation. Otherwise, render a single frame.

blendersynth.blender.render.render_depth()[source]

Enable the depth pass of the renderer

blendersynth.blender.render.render_with_cpu()[source]

Render with CPU

blendersynth.blender.render.render_with_gpu(force_enable=True, silent=False)[source]

Render with GPU.

Parameters:
  • force_enable – If True, enable all GPU devices. Otherwise, use the devices that are already enabled. To enable separately, either change your settings in blender, or see blendersynth.blender.devices.Devices.set_device_usage

  • silent – If True, do not print information about device being used.

blendersynth.blender.render.set_cycles_samples(samples)[source]

Set the number of samples for the Cycles renderer

blendersynth.blender.render.set_engine(engine)[source]

Set the render engine

Parameters:

engine (str) – The render engine to use. See ENGINES for valid options.

blendersynth.blender.render.set_resolution(x, y)[source]

Set the render resolution

Parameters:
  • x (int) – The width of the image in pixels

  • y (int) – The height of the image in pixels

blendersynth.blender.render.set_transparent(scene=None)[source]

Set the background of the scene to transparent

Parameters:

scene – The scene to set the background of. If None, use the active scene.