Fix #123228: GPU subdivision setting can be adjusted on an unsupported device

GPU subdivision is only supported on OpenGL backend. Exclude this
property for metal backend then.

Pull Request: https://projects.blender.org/blender/blender/pulls/123313
This commit is contained in:
Pratik Borhade
2024-06-26 13:31:37 +02:00
committed by Pratik Borhade
parent 5dbb769c08
commit 1dd017ac62
+6
View File
@@ -900,6 +900,12 @@ class USERPREF_PT_viewport_subdivision(ViewportPanel, CenterAlignMixIn, Panel):
bl_label = "Subdivision"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
import gpu
backend = gpu.platform.backend_type_get()
return backend == "OPENGL"
def draw_centered(self, context, layout):
prefs = context.preferences
system = prefs.system