diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-03-12 08:45:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-03-12 20:00:17 +0300 |
commit | 68ca973f7f81e551889532d0c1b76485d9f40245 (patch) | |
tree | d6b64626d19861c63df6fb2895a530418d4cf8dd /intern | |
parent | 76015f98aec0c186240ed9cf515a2e89d2c1894c (diff) |
Fix T50628: gray out cycles device menu when no device configured only for GPU Compute.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 3a689913230..c9b98956c93 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -86,12 +86,10 @@ def use_sample_all_lights(context): return cscene.sample_all_lights_direct or cscene.sample_all_lights_indirect -def show_device_selection(context): - type = get_device_type(context) - if type == 'NETWORK': +def show_device_active(context): + cscene = context.scene.cycles + if cscene.device != 'GPU': return True - if not type in {'CUDA', 'OPENCL'}: - return False return context.user_preferences.addons[__package__].preferences.has_active_device() @@ -1636,7 +1634,7 @@ def draw_device(self, context): split = layout.split(percentage=1/3) split.label("Device:") row = split.row() - row.active = show_device_selection(context) + row.active = show_device_active(context) row.prop(cscene, "device", text="") if engine.with_osl() and use_cpu(context): |