[Bf-extensions-cvs] [099e4eeb] master: VR Scene Inspection: Show note if built without WITH_XR_OPENXR
Julian Eisel
noreply at git.blender.org
Mon Jul 20 20:48:24 CEST 2020
Commit: 099e4eeb7b1cc9c41e35321e9c076c51c4cd2e6e
Author: Julian Eisel
Date: Mon Jul 20 20:45:04 2020 +0200
Branches: master
https://developer.blender.org/rBA099e4eeb7b1cc9c41e35321e9c076c51c4cd2e6e
VR Scene Inspection: Show note if built without WITH_XR_OPENXR
Otherwise the Add-on causes no visible changes, which can be confusing.
Especially since the flag is disabled by default on macOS.
===================================================================
M viewport_vr_preview.py
===================================================================
diff --git a/viewport_vr_preview.py b/viewport_vr_preview.py
index 8dc865f5..db8dd176 100644
--- a/viewport_vr_preview.py
+++ b/viewport_vr_preview.py
@@ -313,6 +313,20 @@ class VIEW3D_PT_vr_session(bpy.types.Panel):
layout.prop(session_settings, "use_positional_tracking")
+class VIEW3D_PT_vr_info(bpy.types.Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_category = "VR"
+ bl_label = "VR Info"
+
+ @classmethod
+ def poll(cls, context):
+ return not bpy.app.build_options.xr_openxr
+
+ def draw(self, context):
+ layout = self.layout
+ layout.label(icon='ERROR', text="Built without VR/OpenXR features.")
+
class VIEW3D_OT_vr_landmark_add(bpy.types.Operator):
bl_idname = "view3d.vr_landmark_add"
bl_label = "Add VR Landmark"
@@ -503,6 +517,7 @@ classes = (
def register():
if not bpy.app.build_options.xr_openxr:
+ bpy.utils.register_class(VIEW3D_PT_vr_info)
return
for cls in classes:
@@ -529,6 +544,7 @@ def register():
def unregister():
if not bpy.app.build_options.xr_openxr:
+ bpy.utils.unregister_class(VIEW3D_PT_vr_info)
return
for cls in classes:
More information about the Bf-extensions-cvs
mailing list