Cycles: Do more user-friendly indication that GPU devices are not found
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Dec 2018 13:47:35 +0000 (14:47 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 7 Dec 2018 13:53:29 +0000 (14:53 +0100)
intern/cycles/blender/addon/properties.py

index d986ba8c7a8e21ad76ef92e85e1981ebbc924e77..3f17d53fda7819c97a6e90f90579e3b7288d5c8d 100644 (file)
@@ -1516,7 +1516,11 @@ class CyclesPreferences(bpy.types.AddonPreferences):
         return self.get_num_gpu_devices() > 0
 
     def draw_impl(self, layout, context):
+        available_device_types = self.get_device_types(context)
         layout.label(text="Cycles Compute Device:")
+        if len(available_device_types) == 1:
+            layout.label(text="No compatible GPUs found", icon='INFO')
+            return
         layout.row().prop(self, "compute_device_type", expand=True)
 
         cuda_devices, opencl_devices = self.get_devices()