Fix #119545: Error drawing Cycles denoising settings with NONE device
Pull Request: https://projects.blender.org/blender/blender/pulls/119547
This commit is contained in:
committed by
Brecht Van Lommel
parent
62bd0ea5fd
commit
b8a3560a77
@@ -1606,14 +1606,15 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
||||
compute_device_type = self.get_compute_device_type()
|
||||
|
||||
# We need non-CPU devices, used for rendering and supporting OIDN GPU denoising
|
||||
for device in _cycles.available_devices(compute_device_type):
|
||||
device_type = device[1]
|
||||
if device_type == 'CPU':
|
||||
continue
|
||||
if compute_device_type != 'NONE':
|
||||
for device in _cycles.available_devices(compute_device_type):
|
||||
device_type = device[1]
|
||||
if device_type == 'CPU':
|
||||
continue
|
||||
|
||||
has_device_oidn_support = device[5]
|
||||
if has_device_oidn_support and self.find_existing_device_entry(device).use:
|
||||
return True
|
||||
has_device_oidn_support = device[5]
|
||||
if has_device_oidn_support and self.find_existing_device_entry(device).use:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user