blendersynth.blender.devices
Blender device management.
- class blendersynth.blender.devices.DeviceList(iterable=(), /)[source]
- property names: List[str]
Return the names of all devices.
- class blendersynth.blender.devices.Devices[source]
A manager for Blender rendering devices (CPU & GPU).
- property available_gpus: DeviceList
Return list of all GPU devices.
- property device_names: List[str]
Return a list of all device names.
- property enabled_device_names: List[str]
Return a list of named devices that are enabled.
- property enabled_gpus: DeviceList
Return list of available GPU devices.
- set_by_name(name, use=True)[source]
Set use/not use based on a device name.
- Parameters:
name (
str
) – Device nameuse (
bool
) – Whether to use the device or not
- set_device_usage(cpu=True, cuda=True, opencl=True, metal=True)[source]
Set/unset all devices of certain types to enabled.
- Parameters:
cpu (
bool
) – Enable/disable CPU devicescuda (
bool
) – Enable/disable CUDA devicesopencl (
bool
) – Enable/disable OpenCL devicesmetal (
bool
) – Enable/disable Metal devices