diff options
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 7 | ||||
-rw-r--r-- | intern/cycles/blender/addon/version_update.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 950a0b5f08f..8cecddbc711 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1475,10 +1475,11 @@ class CyclesPreferences(bpy.types.AddonPreferences): # Update name in case it changed entry.name = device[0] - def get_devices(self): + # Gets all devices types by default. + def get_devices(self, compute_device_type=''): import _cycles # Layout of the device tuples: (Name, Type, Persistent ID) - device_list = _cycles.available_devices(self.compute_device_type) + device_list = _cycles.available_devices(compute_device_type) # Make sure device entries are up to date and not referenced before # we know we don't add new devices. This way we guarantee to not # hold pointers to a resized array. @@ -1535,7 +1536,7 @@ class CyclesPreferences(bpy.types.AddonPreferences): row = layout.row() row.prop(self, "compute_device_type", expand=True) - cuda_devices, opencl_devices = self.get_devices() + cuda_devices, opencl_devices = self.get_devices(self.compute_device_type) row = layout.row() if self.compute_device_type == 'CUDA': self._draw_devices(row, 'CUDA', cuda_devices) diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py index f3d60d62e02..7fb43af8b7c 100644 --- a/intern/cycles/blender/addon/version_update.py +++ b/intern/cycles/blender/addon/version_update.py @@ -254,7 +254,7 @@ def do_versions(self): pass # Init device list for UI - prop.get_devices() + prop.get_devices(prop.compute_device_type) # We don't modify startup file because it assumes to # have all the default values only. |