[Bf-extensions-cvs] [031fdbe2] soc-2019-openxr: Hide Toggle VR Session menu entry when WITH_OPENXR is disabled

Julian Eisel noreply at git.blender.org
Tue Aug 20 10:39:15 CEST 2019


Commit: 031fdbe2c31485690e07e747a001b82d26c237b1
Author: Julian Eisel
Date:   Tue Aug 20 00:56:18 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBA031fdbe2c31485690e07e747a001b82d26c237b1

Hide Toggle VR Session menu entry when WITH_OPENXR is disabled

Would prefer to blacklist the add-on completely then, but that doesn't
seem to be supported currently.

===================================================================

M	viewport_vr_preview.py

===================================================================

diff --git a/viewport_vr_preview.py b/viewport_vr_preview.py
index 97820a0f..79b5b478 100644
--- a/viewport_vr_preview.py
+++ b/viewport_vr_preview.py
@@ -26,19 +26,19 @@ bl_info = {
     "version": (0, 0, 1),
     "blender": (2, 81, 0),
     "location": "Window > Toggle VR Session",
-    "description": ("Enable viewing the Blender viewport within virtual "
-                    "reality glasses."),
-    "warning": "This is an early, limited preview of in development VR "
-               "support for Blender.",
+    "description": ("Enable viewing the Blender viewport within "
+                    "virtual reality glasses."),
+    "support": "OFFICIAL",
+    "warning": "This is an early, limited preview of in development "
+               "VR support for Blender.",
     "category": "3D View",
 }
 
 
 def window_menu_append_func(self, context):
-    self.layout.separator()
-
-    # TODO WITH_OPENXR
-    self.layout.operator("wm.xr_session_toggle")
+    if bpy.app.build_options.openxr:
+        self.layout.separator()
+        self.layout.operator("wm.xr_session_toggle")
 
 
 classes = (



More information about the Bf-extensions-cvs mailing list