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>2022-02-18 11:08:53 +0300
committerPeter Kim <pk15950@gmail.com>2022-02-18 11:08:53 +0300
commitb0274e50da58bc1f0086794a16029ec6e2e9b927 (patch)
tree899523f00f00702e08556a2d504784b7fdaddaa6 /viewport_vr_preview/action_map.py
parent4803bc04f3fc6b0cfcda638d9aa89dee40e6bfc5 (diff)
VR: Add action bindings for Vive Focus 3 controller
Although the HTC Vive Focus 3 controller extension is currently not supported by any OpenXR runtimes (save for the dedicated Focus 3 runtime in developer early-access), the bindings are still useful to have for the future.
Diffstat (limited to 'viewport_vr_preview/action_map.py')
-rw-r--r--viewport_vr_preview/action_map.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/viewport_vr_preview/action_map.py b/viewport_vr_preview/action_map.py
index 46b6dd65..6c62c05d 100644
--- a/viewport_vr_preview/action_map.py
+++ b/viewport_vr_preview/action_map.py
@@ -79,8 +79,11 @@ def vr_create_actions(context: bpy.context):
if amb.name == defaults.VRDefaultActionbindings.REVERB_G2.value:
if not scene.vr_actions_enable_reverb_g2:
continue
- elif amb.name == defaults.VRDefaultActionbindings.COSMOS.value:
- if not scene.vr_actions_enable_cosmos:
+ elif amb.name == defaults.VRDefaultActionbindings.VIVE_COSMOS.value:
+ if not scene.vr_actions_enable_vive_cosmos:
+ continue
+ elif amb.name == defaults.VRDefaultActionbindings.VIVE_FOCUS.value:
+ if not scene.vr_actions_enable_vive_focus:
continue
elif amb.name == defaults.VRDefaultActionbindings.HUAWEI.value:
if not scene.vr_actions_enable_huawei:
@@ -130,10 +133,6 @@ def register():
default=False,
update=vr_actions_use_gamepad_update,
)
- bpy.types.Scene.vr_actions_enable_cosmos = bpy.props.BoolProperty(
- description="Enable bindings for the HTC Vive Cosmos controllers. Note that this may not be supported by all OpenXR runtimes",
- default=False,
- )
bpy.types.Scene.vr_actions_enable_huawei = bpy.props.BoolProperty(
description="Enable bindings for the Huawei controllers. Note that this may not be supported by all OpenXR runtimes",
default=False,
@@ -142,6 +141,14 @@ def register():
description="Enable bindings for the HP Reverb G2 controllers. Note that this may not be supported by all OpenXR runtimes",
default=False,
)
+ bpy.types.Scene.vr_actions_enable_vive_cosmos = bpy.props.BoolProperty(
+ description="Enable bindings for the HTC Vive Cosmos controllers. Note that this may not be supported by all OpenXR runtimes",
+ default=False,
+ )
+ bpy.types.Scene.vr_actions_enable_vive_focus = bpy.props.BoolProperty(
+ description="Enable bindings for the HTC Vive Focus 3 controllers. Note that this may not be supported by all OpenXR runtimes",
+ default=False,
+ )
bpy.app.handlers.xr_session_start_pre.append(vr_create_actions)
@@ -149,8 +156,9 @@ def register():
def unregister():
del bpy.types.Scene.vr_actions_enable
del bpy.types.Scene.vr_actions_use_gamepad
- del bpy.types.Scene.vr_actions_enable_cosmos
del bpy.types.Scene.vr_actions_enable_huawei
del bpy.types.Scene.vr_actions_enable_reverb_g2
+ del bpy.types.Scene.vr_actions_enable_vive_cosmos
+ del bpy.types.Scene.vr_actions_enable_vive_focus
bpy.app.handlers.xr_session_start_pre.remove(vr_create_actions)