本日はBlender枠です。
BlenderではOpenXR規格を使用してVRと接続することができます。
〇環境
・Windows11PC
・Blender4.1
〇VR Scene Inspectionの場所
VRSceneInspectionのPythonコードのパスは以下になります。
C:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\addons\viewport_vr_preview
これはアドオンのフォルダであり、プリインストールされているアドオンとして存在します。

#Blender登録時のInfo
bl_info = {
"name": "VR Scene Inspection",
"author": "Julian Eisel (Severin), Sebastian Koenig, Peter Kim (muxed-reality)",
"version": (0, 11, 2),
"blender": (3, 2, 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",
}
#bpyがローカルにある場合の処理
#すでにBlenderのモジュールが読みこまれているか?そうでない場合、モジュールを再読み込みをして変更を反映
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
#Blenderの登録
def register():
#OpenXRモジュールが存在するか?
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()
本質的にはOpenXRが使用できるかを判別して、action_map、gui、operators、properties の関数を実行しています。

以上がVR Scene Inspectionのコア実装になります。
次回はGUIを見ていきます。GUIはBlender上で表示されるUIを意味していると思われます。
ボタンと関数の対応などが見れると思っています。