Add-on to wrap the Toggle VR Session operator
This commit is contained in:
parent
2bbc4c7264
commit
4612e79c52
|
@ -0,0 +1,63 @@
|
|||
# ##### 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>
|
||||
|
||||
import bpy
|
||||
|
||||
bl_info = {
|
||||
"name": "Basic VR Viewer",
|
||||
"author": "Julian Eisel (Severin)",
|
||||
"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.",
|
||||
"category": "3D View",
|
||||
}
|
||||
|
||||
|
||||
def window_menu_append_func(self, context):
|
||||
self.layout.separator()
|
||||
|
||||
# TODO WITH_OPENXR
|
||||
self.layout.operator("wm.xr_session_toggle")
|
||||
|
||||
|
||||
classes = (
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
bpy.types.TOPBAR_MT_window.append(window_menu_append_func)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.types.TOPBAR_MT_window.remove(window_menu_append_func)
|
||||
|
||||
for cls in classes:
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
Loading…
Reference in New Issue