26 BL::RenderSettings b_r = b_scene.render();
28 if (b_r.threads_mode() == BL::RenderSettings::threads_mode_FIXED) {
85 "kernel_optimization_level",
101 for (BL::Addon &b_addon : b_preferences.addons) {
102 if (b_addon.module() ==
"cycles") {
103 cpreferences = b_addon.preferences().ptr;
112 preferences_device = cpu_device;
140 RNA_BEGIN (&cpreferences, device,
"devices") {
145 used_devices.push_back(info);
153 if (!used_devices.empty()) {
169 if (devices.empty()) {
180 if (
get_enum(cscene,
"device") == 1) {
181 device = preferences_device;
#define RNA_BEGIN(sptr, itemptr, propname)
static void adjust_device_info_from_preferences(DeviceInfo &info, PointerRNA cpreferences)
DeviceInfo blender_device_info(BL::Preferences &b_preferences, BL::Scene &b_scene, bool background, bool preview, DeviceInfo &preferences_device)
static void adjust_device_info(DeviceInfo &device, PointerRNA cpreferences, bool preview)
int blender_device_threads(BL::Scene &b_scene)
static DeviceTypeMask device_override
KernelOptimizationLevel kernel_optimization_level
vector< DeviceInfo > multi_devices
bool use_metalrt_by_default
bool use_hardware_raytracing
static DeviceInfo dummy_device(const string &error_msg="")
static vector< DeviceInfo > available_devices(uint device_type_mask=DEVICE_MASK_ALL)
static DeviceInfo get_multi_device(const vector< DeviceInfo > &subdevices, int threads, bool background)
static bool get_boolean(PointerRNA &ptr, const char *name)
static int get_enum(PointerRNA &ptr, const char *name, int num_values=-1, int default_value=-1)
static string get_string(PointerRNA &ptr, const char *name)
#define CCL_NAMESPACE_END
@ KERNEL_OPTIMIZATION_LEVEL_OFF
@ KERNEL_OPTIMIZATION_LEVEL_FULL
@ KERNEL_OPTIMIZATION_NUM_LEVELS
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)