[Bf-blender-cvs] [f17dfd575ce] blender-v2.91-release: Fix empty Cycles render devices panel showing in preferences on macOS
Brecht Van Lommel
noreply at git.blender.org
Thu Nov 12 20:23:35 CET 2020
Commit: f17dfd575ce23c2e9fd383f0c87676d524a1124b
Author: Brecht Van Lommel
Date: Wed Nov 11 17:29:54 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rBf17dfd575ce23c2e9fd383f0c87676d524a1124b
Fix empty Cycles render devices panel showing in preferences on macOS
There is no GPU rendering support on macOS, so showing the panel only adds
confusion. Also hide the panels in builds without Cycles.
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index b96e317e2e9..73cad81b1e9 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -575,6 +575,12 @@ class USERPREF_PT_system_sound(SystemPanel, CenterAlignMixIn, Panel):
class USERPREF_PT_system_cycles_devices(SystemPanel, CenterAlignMixIn, Panel):
bl_label = "Cycles Render Devices"
+ @classmethod
+ def poll(cls, context):
+ # No GPU rendering on macOS currently.
+ import sys
+ return bpy.app.build_options.cycles and sys.platform != "darwin"
+
def draw_centered(self, context, layout):
prefs = context.preferences
More information about the Bf-blender-cvs
mailing list