diff options
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 06cf69f90ca..aa5f6740933 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -118,6 +118,12 @@ def use_optix(context): return (get_device_type(context) == 'OPTIX' and cscene.device == 'GPU') +def use_multi_device(context): + cscene = context.scene.cycles + if cscene.device != 'GPU': + return False + return context.preferences.addons[__package__].preferences.has_multi_device() + def show_device_active(context): cscene = context.scene.cycles @@ -661,6 +667,10 @@ class CYCLES_RENDER_PT_performance_acceleration_structure(CyclesButtonsPanel, Pa bl_label = "Acceleration Structure" bl_parent_id = "CYCLES_RENDER_PT_performance" + @classmethod + def poll(cls, context): + return not use_optix(context) or has_multi_device(context) + def draw(self, context): import _cycles @@ -673,23 +683,33 @@ class CYCLES_RENDER_PT_performance_acceleration_structure(CyclesButtonsPanel, Pa col = layout.column() - use_embree = False + use_embree = _cycles.with_embree + if use_cpu(context): - use_embree = _cycles.with_embree - if not use_embree: + col.prop(cscene, "debug_use_spatial_splits") + if use_embree: + col.prop(cscene, "debug_use_compact_bvh") + else: + sub = col.column() + sub.active = not cscene.debug_use_spatial_splits + sub.prop(cscene, "debug_bvh_time_steps") + + col.prop(cscene, "debug_use_hair_bvh") + sub = col.column(align=True) sub.label(text="Cycles built without Embree support") sub.label(text="CPU raytracing performance will be poor") + else: + col.prop(cscene, "debug_use_spatial_splits") + sub = col.column() + sub.active = not cscene.debug_use_spatial_splits + sub.prop(cscene, "debug_bvh_time_steps") - col.prop(cscene, "debug_use_spatial_splits") - sub = col.column() - sub.active = not use_embree - sub.prop(cscene, "debug_use_hair_bvh") - sub = col.column() - sub.active = not cscene.debug_use_spatial_splits and not use_embree - sub.prop(cscene, "debug_bvh_time_steps") + col.prop(cscene, "debug_use_hair_bvh") - col.prop(cscene, "debug_use_compact_bvh") + # CPU is used in addition to a GPU + if use_multi_device(context) and use_embree: + col.prop(cscene, "debug_use_compact_bvh") class CYCLES_RENDER_PT_performance_final_render(CyclesButtonsPanel, Panel): |