Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-07-20 21:45:04 +0300
committerJulian Eisel <julian@blender.org>2020-07-20 21:45:04 +0300
commit099e4eeb7b1cc9c41e35321e9c076c51c4cd2e6e (patch)
treebef7e0960d9af11f11189ba1b134b3797c4e7279 /viewport_vr_preview.py
parent0657e99e1f4ff01118591d19ffc740694869ba96 (diff)
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.
Diffstat (limited to 'viewport_vr_preview.py')
-rw-r--r--viewport_vr_preview.py16
1 files changed, 16 insertions, 0 deletions
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: