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:
authorPeter Kim <pk15950@gmail.com>2021-10-26 07:45:00 +0300
committerPeter Kim <pk15950@gmail.com>2021-10-26 07:45:16 +0300
commit823910c50d1c4814c4aa1962a31b91e4dc1c183b (patch)
tree58c449c9808dcfb782ae03ea8926eaf515e98d6a /viewport_vr_preview/__init__.py
parentc49c16c38d4bce29a1e0518d5fad5d90f42ab5e7 (diff)
VR: Default Actions, Controller Visualization
This updates the VR Scene Inspection add-on with functionality for loading and using default controller actions, including controller poses and haptics, and visualizing VR controllers both in-headset and in the regular 3D viewport. In other words, users can finally view their VR controllers and use them to navigate their scene in VR. Controller actions (enabled by default) are available as an option in the "VR Session" panel. For controller bindings that require OpenXR extensions (Reverb G2, Vive Cosmos, Huawei), there is a new "Action Maps" panel where users can toggle these bindings. Bindings that require extensions are disabled by default since not all OpenXR runtimes may support them, which will lead to an error during action creation at session start. There is also an option in the "Action Maps" panel to use a gamepad (Xbox Controller) instead of motion controllers for VR actions/viewport navigation. In addition to default actions, this update adds new options for VR controller visualization. For in-headset (VR) visualization, controller visibility as well as style (dark/light, ray/no ray) can be set via the "View" panel. For visualization in the regular 3D viewport, there is a new option in the "Viewport Feedback" panel to draw controllers as gizmos, similar to the existing option for the VR camera (headset). Finally, this update also changes the VR Landmark "Custom Camera" type to "Custom Object", so users can specify any object (not just cameras) as a base pose reference, and adds a base scale option for custom object and custom pose-type landmarks. Reviewed By: Severin Differential Revision: https://developer.blender.org/D11271
Diffstat (limited to 'viewport_vr_preview/__init__.py')
-rw-r--r--viewport_vr_preview/__init__.py68
1 files changed, 68 insertions, 0 deletions
diff --git a/viewport_vr_preview/__init__.py b/viewport_vr_preview/__init__.py
new file mode 100644
index 00000000..352470ca
--- /dev/null
+++ b/viewport_vr_preview/__init__.py
@@ -0,0 +1,68 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+bl_info = {
+ "name": "VR Scene Inspection",
+ "author": "Julian Eisel (Severin), Sebastian Koenig, Peter Kim (muxed-reality)",
+ "version": (0, 10, 0),
+ "blender": (3, 0, 0),
+ "location": "3D View > Sidebar > VR",
+ "description": ("View the viewport with virtual reality glasses "
+ "(head-mounted displays)"),
+ "support": "OFFICIAL",
+ "warning": "This is an early, limited preview of in development "
+ "VR support for Blender.",
+ "doc_url": "{BLENDER_MANUAL_URL}/addons/3d_view/vr_scene_inspection.html",
+ "category": "3D View",
+}
+
+
+if "bpy" in locals():
+ import importlib
+ importlib.reload(action_map)
+ importlib.reload(gui)
+ importlib.reload(operators)
+ importlib.reload(properties)
+else:
+ from . import action_map, gui, operators, properties
+
+import bpy
+
+
+def register():
+ if not bpy.app.build_options.xr_openxr:
+ bpy.utils.register_class(gui.VIEW3D_PT_vr_info)
+ return
+
+ action_map.register()
+ gui.register()
+ operators.register()
+ properties.register()
+
+
+def unregister():
+ if not bpy.app.build_options.xr_openxr:
+ bpy.utils.unregister_class(gui.VIEW3D_PT_vr_info)
+ return
+
+ action_map.unregister()
+ gui.unregister()
+ operators.unregister()
+ properties.unregister()