[Bf-extensions-cvs] [752b4989] soc-2019-openxr: Show new VR session settings in the sidebar

Julian Eisel noreply at git.blender.org
Tue Oct 15 22:12:46 CEST 2019


Commit: 752b4989d6756ee12551be3816d4a0fb269893cb
Author: Julian Eisel
Date:   Tue Oct 15 22:12:21 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBA752b4989d6756ee12551be3816d4a0fb269893cb

Show new VR session settings in the sidebar

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

M	viewport_vr_preview.py

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

diff --git a/viewport_vr_preview.py b/viewport_vr_preview.py
index 052dda17..560f6ee8 100644
--- a/viewport_vr_preview.py
+++ b/viewport_vr_preview.py
@@ -41,7 +41,32 @@ def window_menu_append_func(self, context):
         self.layout.operator("wm.xr_session_toggle")
 
 
+class VIEW3D_PT_vr_session(bpy.types.Panel):
+    bl_space_type = 'VIEW_3D'
+    bl_region_type = 'UI'
+    bl_category = "VR"
+    bl_label = "VR Session"
+
+    def draw(self, context):
+        layout = self.layout
+        session_settings = context.window_manager.xr_session_settings
+
+        layout.use_property_split = True
+        layout.use_property_decorate = False  # No animation.
+
+        layout.prop(session_settings, "shading_type", text="Shading")
+        layout.prop(session_settings, "show_floor", text="Floor")
+        layout.prop(session_settings, "show_annotation", text="Annotations")
+
+        layout.separator()
+
+        col = layout.column(align=True)
+        col.prop(session_settings, "clip_start", text="Clip Start")
+        col.prop(session_settings, "clip_end", text="End")
+
+
 classes = (
+    VIEW3D_PT_vr_session,
 )



More information about the Bf-extensions-cvs mailing list