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.
This commit is contained in:
Brecht Van Lommel 2020-11-11 17:29:54 +01:00
parent dad228a19c
commit f17dfd575c
1 changed files with 6 additions and 0 deletions

View File

@ -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