From 8cebc726ca679fb735d26f3896c00b3070f8718d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 6 Aug 2018 16:42:46 +0200 Subject: [PATCH] Only show device enum when needed --- benchmark/space/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/benchmark/space/__init__.py b/benchmark/space/__init__.py index 54e6654..ddfeb62 100644 --- a/benchmark/space/__init__.py +++ b/benchmark/space/__init__.py @@ -424,10 +424,12 @@ class BENCHMARK_PT_main(Panel): sub.scale_y = 64.0 sub.separator() - sub = col.row() - sub.scale_y = 1.5 - sub.prop(context.scene, "compute_device", text="") - sub.separator() + compute_device_list_get(None, context) + if len(global_cached_compute_devices) > 1: + sub = col.row() + sub.scale_y = 1.5 + sub.prop(context.scene, "compute_device", text="") + sub.separator() sub = col.row() sub.scale_y = 2.25