Realtime Compositor: Warn about unsupported MacOS

This patch warns the user that MacOS is not supported for the viewport
compositor in the shading panel.

See T102353.
This commit is contained in:
Omar Emara 2022-11-24 09:25:44 +02:00
parent 38573d515e
commit 2dcdfab94c
1 changed files with 6 additions and 2 deletions

View File

@ -6211,10 +6211,14 @@ class VIEW3D_PT_shading_compositor(Panel):
def draw(self, context):
shading = context.space_data.shading
row = self.layout.row()
import sys
row.active = sys.platform != "darwin"
is_macos = sys.platform == "darwin"
row = self.layout.row()
row.active = not is_macos
row.prop(shading, "use_compositor", expand=True)
if is_macos and shading.use_compositor != "DISABLED":
self.layout.label(text="Compositor not supported on MacOS.", icon="ERROR")
class VIEW3D_PT_gizmo_display(Panel):