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-08-13 01:04:37 +0300
committerPeter Kim <pk15950@gmail.com>2021-08-13 01:04:37 +0300
commit26fb63e5636836de6c4df26edab9e39dcd2d46b6 (patch)
tree1f5f4f914beb39de1ebc65697313ffa178297d3a
parent5555d7d52d1d5888c8962cb0f7a6a144e6fd2cb6 (diff)
VR: Add toggles for controller profile extensions
Allows users to enable/disable controller bindings that require OpenXR extensions (Reverb G2, Cosmos, Huawei). Extension bindings are disabled by default since runtimes might not support them, but the user can easily enable them now for compatible runtimes instead of having to import separate action maps as was previously necessary.
-rw-r--r--viewport_vr_preview/__init__.py20
-rw-r--r--viewport_vr_preview/configs/default.py161
-rw-r--r--viewport_vr_preview/defaults.py627
-rw-r--r--viewport_vr_preview/main.py48
-rw-r--r--viewport_vr_preview/versioning.py17
5 files changed, 699 insertions, 174 deletions
diff --git a/viewport_vr_preview/__init__.py b/viewport_vr_preview/__init__.py
index a9511c82..cb2a4c74 100644
--- a/viewport_vr_preview/__init__.py
+++ b/viewport_vr_preview/__init__.py
@@ -36,10 +36,10 @@ bl_info = {
if "bpy" in locals():
import importlib
- importlib.reload(main)
importlib.reload(defaults)
+ importlib.reload(main)
else:
- from . import main, defaults
+ from . import defaults, main
import bpy
@@ -52,6 +52,7 @@ classes = (
main.VIEW3D_PT_vr_actions_actions,
main.VIEW3D_PT_vr_actions_haptics,
main.VIEW3D_PT_vr_actions_bindings,
+ main.VIEW3D_PT_vr_actions_extensions,
main.VIEW3D_PT_vr_motion_capture,
main.VIEW3D_PT_vr_viewport_feedback,
@@ -120,6 +121,18 @@ def register():
bpy.types.Scene.vr_landmarks_active = bpy.props.IntProperty(
update=main.vr_landmark_active_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,
+ )
+ bpy.types.Scene.vr_actions_enable_reverb_g2 = bpy.props.BoolProperty(
+ 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_headset_object = bpy.props.PointerProperty(
name="Headset Object",
type=bpy.types.Object,
@@ -164,6 +177,9 @@ def unregister():
del bpy.types.Scene.vr_landmarks
del bpy.types.Scene.vr_landmarks_selected
del bpy.types.Scene.vr_landmarks_active
+ 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_headset_object
del bpy.types.Scene.vr_controller0_object
del bpy.types.Scene.vr_controller1_object
diff --git a/viewport_vr_preview/configs/default.py b/viewport_vr_preview/configs/default.py
index dd24dd54..9d72018f 100644
--- a/viewport_vr_preview/configs/default.py
+++ b/viewport_vr_preview/configs/default.py
@@ -1,24 +1,30 @@
-actionconfig_version = (3, 0, 15)
+actionconfig_version = (3, 0, 17)
actionconfig_data = \
[("blender_default",
{"items":
[("controller_grip", {"type": 'POSE', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "pose_is_controller_grip": 'True', "pose_is_controller_aim": 'False'}, None,
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/grip/pose', "component_path1": '/input/grip/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
],
},
),
("controller_aim", {"type": 'POSE', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "pose_is_controller_grip": 'False', "pose_is_controller_aim": 'True'}, None,
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/aim/pose', "component_path1": '/input/aim/pose', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}),
],
},
),
@@ -30,11 +36,14 @@ actionconfig_data = \
],
},
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
@@ -45,18 +54,23 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/back/click', "component_path1": '/input/back/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
("fly", {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, None,
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
@@ -68,10 +82,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
],
},
),
@@ -83,10 +100,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
],
},
),
@@ -98,10 +118,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
],
},
),
@@ -113,10 +136,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
],
},
),
@@ -129,10 +155,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
],
},
),
@@ -145,10 +174,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
],
},
),
@@ -161,10 +193,13 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'NEGATIVE'}),
],
},
),
@@ -177,58 +212,76 @@ actionconfig_data = \
],
},
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'POSITIVE'}),
],
},
),
("raycast_select", {"type": 'FLOAT', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_select_raycast', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, None,
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
("grab", {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_transform_grab', "op_mode": 'MODAL', "bimanual": 'True', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, None,
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/x/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/home/click', "component_path1": '/input/home/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/a/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/x/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/x/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/a/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
("undo", {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '', "op": 'ed.undo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
("redo", {"type": 'FLOAT', "user_path0": '/user/hand/right', "user_path1": '', "op": 'ed.redo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
{"bindings":
- [("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
- ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
],
},
),
("haptic", {"type": 'VIBRATION', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right'}, None,
{"bindings":
- [("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
- ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ ("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
- ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
+ ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/output/haptic', "component_path1": '/output/haptic'}),
],
},
),
diff --git a/viewport_vr_preview/defaults.py b/viewport_vr_preview/defaults.py
index 1db6a36f..50b581c3 100644
--- a/viewport_vr_preview/defaults.py
+++ b/viewport_vr_preview/defaults.py
@@ -63,21 +63,27 @@ class VRDefaultActions(Enum):
# Default action bindings.
class VRDefaultActionbindings(Enum):
- SIMPLE = "simple"
+ COSMOS = "cosmos"
+ GAMEPAD = "gamepad"
+ HUAWEI = "huawei"
+ INDEX = "index"
OCULUS = "oculus"
- WMR = "wmr"
+ REVERB_G2 = "reverb_g2"
+ SIMPLE = "simple"
VIVE = "vive"
- INDEX = "index"
- GAMEPAD = "gamepad"
+ WMR = "wmr"
class VRDefaultActionprofiles(Enum):
- SIMPLE = "/interaction_profiles/khr/simple_controller"
+ COSMOS = "/interaction_profiles/htc/vive_cosmos_controller"
+ GAMEPAD = "/interaction_profiles/microsoft/xbox_controller"
+ HUAWEI = "/interaction_profiles/huawei/controller"
+ INDEX = "/interaction_profiles/valve/index_controller"
OCULUS = "/interaction_profiles/oculus/touch_controller"
- WMR = "/interaction_profiles/microsoft/motion_controller"
+ REVERB_G2 = "/interaction_profiles/hp/mixed_reality_controller"
+ SIMPLE = "/interaction_profiles/khr/simple_controller"
VIVE = "/interaction_profiles/htc/vive_controller"
- INDEX = "/interaction_profiles/valve/index_controller"
- GAMEPAD = "/interaction_profiles/microsoft/xbox_controller"
+ WMR = "/interaction_profiles/microsoft/motion_controller"
def vr_defaults_actionmap_add(ac, name):
@@ -216,8 +222,22 @@ def vr_defaults_create_default(ac):
False)
if ami:
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/grip/pose",
+ "/input/grip/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/grip/pose",
+ "/input/grip/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
"/input/grip/pose",
"/input/grip/pose",
(0, 0, 0),
@@ -230,8 +250,15 @@ def vr_defaults_create_default(ac):
(0, 0, 0),
(0, 0, 0))
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/grip/pose",
+ "/input/grip/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
"/input/grip/pose",
"/input/grip/pose",
(0, 0, 0),
@@ -244,8 +271,8 @@ def vr_defaults_create_default(ac):
(0, 0, 0),
(0, 0, 0))
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/grip/pose",
"/input/grip/pose",
(0, 0, 0),
@@ -259,8 +286,22 @@ def vr_defaults_create_default(ac):
True)
if ami:
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/aim/pose",
+ "/input/aim/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/aim/pose",
+ "/input/aim/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
"/input/aim/pose",
"/input/aim/pose",
(0, 0, 0),
@@ -273,8 +314,15 @@ def vr_defaults_create_default(ac):
(0, 0, 0),
(0, 0, 0))
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/aim/pose",
+ "/input/aim/pose",
+ (0, 0, 0),
+ (0, 0, 0))
+ vr_defaults_pose_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
"/input/aim/pose",
"/input/aim/pose",
(0, 0, 0),
@@ -287,8 +335,8 @@ def vr_defaults_create_default(ac):
(0, 0, 0),
(0, 0, 0))
vr_defaults_pose_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/aim/pose",
"/input/aim/pose",
(0, 0, 0),
@@ -309,9 +357,25 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
- "/input/select/click",
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/trigger/value",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trigger/value",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/trigger/value",
"",
0.3,
'ANY',
@@ -325,14 +389,22 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/trigger/value",
"",
0.3,
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
+ "/input/select/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.VIVE.value,
VRDefaultActionprofiles.VIVE.value,
"/input/trigger/value",
@@ -341,8 +413,8 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/trigger/value",
"",
0.3,
@@ -364,6 +436,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/squeeze/click",
+ "/input/squeeze/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/back/click",
+ "/input/back/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/squeeze/value",
+ "/input/squeeze/value",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/squeeze/value",
@@ -372,10 +468,10 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
- "/input/squeeze/click",
- "/input/squeeze/click",
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/squeeze/value",
+ "/input/squeeze/value",
0.3,
'ANY',
'ANY')
@@ -388,10 +484,10 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
- "/input/squeeze/value",
- "/input/squeeze/value",
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
+ "/input/squeeze/click",
+ "/input/squeeze/click",
0.3,
'ANY',
'ANY')
@@ -411,6 +507,22 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/click",
+ "/input/thumbstick/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/click",
+ "/input/thumbstick/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/click",
@@ -419,16 +531,16 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/click",
"/input/thumbstick/click",
0.3,
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/click",
"/input/thumbstick/click",
0.3,
@@ -450,6 +562,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/y",
@@ -458,8 +594,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/y",
"",
0.3,
@@ -474,8 +610,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/y",
"",
0.3,
@@ -497,6 +633,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/y",
@@ -505,8 +665,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/y",
"",
0.3,
@@ -521,8 +681,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/y",
"",
0.3,
@@ -544,6 +704,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/x",
@@ -552,8 +736,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/x",
"",
0.3,
@@ -568,8 +752,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/x",
"",
0.3,
@@ -591,6 +775,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/x",
@@ -599,8 +807,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/x",
"",
0.3,
@@ -615,8 +823,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/x",
"",
0.3,
@@ -638,6 +846,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/y",
@@ -646,8 +878,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/y",
"",
0.3,
@@ -662,8 +894,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/y",
"",
0.3,
@@ -685,6 +917,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/y",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/y",
@@ -693,8 +949,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/y",
"",
0.3,
@@ -709,8 +965,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/y",
"",
0.3,
@@ -732,6 +988,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'NEGATIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/x",
@@ -740,8 +1020,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/x",
"",
0.3,
@@ -756,8 +1036,8 @@ def vr_defaults_create_default(ac):
'NEGATIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/x",
"",
0.3,
@@ -779,6 +1059,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/thumbstick/x",
+ "",
+ 0.3,
+ 'POSITIVE',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/thumbstick/x",
@@ -787,8 +1091,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/thumbstick/x",
"",
0.3,
@@ -803,8 +1107,8 @@ def vr_defaults_create_default(ac):
'POSITIVE',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/thumbstick/x",
"",
0.3,
@@ -826,9 +1130,25 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
- "/input/select/click",
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/trigger/value",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trigger/value",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/trigger/value",
"",
0.3,
'ANY',
@@ -842,14 +1162,22 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
"/input/trigger/value",
"",
0.3,
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
+ "/input/select/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.VIVE.value,
VRDefaultActionprofiles.VIVE.value,
"/input/trigger/value",
@@ -858,8 +1186,8 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/input/trigger/value",
"",
0.3,
@@ -881,10 +1209,26 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
- "/input/menu/click",
- "/input/menu/click",
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/x/click",
+ "/input/a/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/home/click",
+ "/input/home/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/a/click",
+ "/input/a/click",
0.3,
'ANY',
'ANY')
@@ -897,8 +1241,16 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/x/click",
+ "/input/a/click",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
"/input/menu/click",
"/input/menu/click",
0.3,
@@ -913,10 +1265,10 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
- "/input/a/click",
- "/input/a/click",
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
+ "/input/menu/click",
+ "/input/menu/click",
0.3,
'ANY',
'ANY')
@@ -936,6 +1288,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/y/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/b/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/y/click",
@@ -944,9 +1320,9 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
- "/input/trackpad/click",
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/y/click",
"",
0.3,
'ANY',
@@ -960,9 +1336,9 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
- "/input/b/click",
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
+ "/input/trackpad/click",
"",
0.3,
'ANY',
@@ -983,6 +1359,30 @@ def vr_defaults_create_default(ac):
'PRESS')
if ami:
vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/input/b/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/input/trackpad/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
+ "/input/b/click",
+ "",
+ 0.3,
+ 'ANY',
+ 'ANY')
+ vr_defaults_actionbinding_add(ami,
VRDefaultActionbindings.OCULUS.value,
VRDefaultActionprofiles.OCULUS.value,
"/input/b/click",
@@ -991,9 +1391,9 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
- "/input/trackpad/click",
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/input/b/click",
"",
0.3,
'ANY',
@@ -1007,9 +1407,9 @@ def vr_defaults_create_default(ac):
'ANY',
'ANY')
vr_defaults_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
- "/input/b/click",
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
+ "/input/trackpad/click",
"",
0.3,
'ANY',
@@ -1021,8 +1421,18 @@ def vr_defaults_create_default(ac):
"/user/hand/right")
if ami:
vr_defaults_haptic_actionbinding_add(ami,
- VRDefaultActionbindings.SIMPLE.value,
- VRDefaultActionprofiles.SIMPLE.value,
+ VRDefaultActionbindings.COSMOS.value,
+ VRDefaultActionprofiles.COSMOS.value,
+ "/output/haptic",
+ "/output/haptic")
+ vr_defaults_haptic_actionbinding_add(ami,
+ VRDefaultActionbindings.HUAWEI.value,
+ VRDefaultActionprofiles.HUAWEI.value,
+ "/output/haptic",
+ "/output/haptic")
+ vr_defaults_haptic_actionbinding_add(ami,
+ VRDefaultActionbindings.INDEX.value,
+ VRDefaultActionprofiles.INDEX.value,
"/output/haptic",
"/output/haptic")
vr_defaults_haptic_actionbinding_add(ami,
@@ -1031,8 +1441,13 @@ def vr_defaults_create_default(ac):
"/output/haptic",
"/output/haptic")
vr_defaults_haptic_actionbinding_add(ami,
- VRDefaultActionbindings.WMR.value,
- VRDefaultActionprofiles.WMR.value,
+ VRDefaultActionbindings.REVERB_G2.value,
+ VRDefaultActionprofiles.REVERB_G2.value,
+ "/output/haptic",
+ "/output/haptic")
+ vr_defaults_haptic_actionbinding_add(ami,
+ VRDefaultActionbindings.SIMPLE.value,
+ VRDefaultActionprofiles.SIMPLE.value,
"/output/haptic",
"/output/haptic")
vr_defaults_haptic_actionbinding_add(ami,
@@ -1041,8 +1456,8 @@ def vr_defaults_create_default(ac):
"/output/haptic",
"/output/haptic")
vr_defaults_haptic_actionbinding_add(ami,
- VRDefaultActionbindings.INDEX.value,
- VRDefaultActionprofiles.INDEX.value,
+ VRDefaultActionbindings.WMR.value,
+ VRDefaultActionprofiles.WMR.value,
"/output/haptic",
"/output/haptic")
diff --git a/viewport_vr_preview/main.py b/viewport_vr_preview/main.py
index 93551125..a53678bf 100644
--- a/viewport_vr_preview/main.py
+++ b/viewport_vr_preview/main.py
@@ -20,9 +20,10 @@
if "bpy" in locals():
import importlib
+ importlib.reload(defaults)
importlib.reload(io)
else:
- from . import io
+ from . import defaults, io
import bpy
from bpy.types import (
@@ -635,7 +636,6 @@ def vr_activate_user_actionconfig(context: bpy.context):
def vr_create_actions(context: bpy.context):
# Create all vr action sets and actions.
context = bpy.context
-
ac = vr_actionconfig_active_get(context)
if not ac:
return
@@ -644,6 +644,8 @@ def vr_create_actions(context: bpy.context):
if not session_state:
return
+ scene = context.scene
+
for am in ac.actionmaps:
if len(am.actionmap_items) < 1:
continue
@@ -670,6 +672,17 @@ def vr_create_actions(context: bpy.context):
controller_aim_name = ami.name
for amb in ami.bindings:
+ # Check for bindings that require OpenXR extensions.
+ 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:
+ continue
+ elif amb.name == defaults.VRDefaultActionbindings.HUAWEI.value:
+ if not scene.vr_actions_enable_huawei:
+ continue
+
ok = session_state.action_binding_create(context, am, ami, amb)
if not ok:
return
@@ -852,11 +865,13 @@ class VIEW3D_PT_vr_actions_actionmaps(VRActionsPanel, Panel):
bl_label = "Action Maps"
def draw(self, context):
- layout = self.layout
ac = vr_actionconfig_active_get(context)
if not ac:
return
-
+
+ scene = context.scene
+
+ layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
@@ -884,11 +899,11 @@ class VIEW3D_PT_vr_actions_actions(VRActionsPanel, Panel):
bl_parent_id = "VIEW3D_PT_vr_actions_actionmaps"
def draw(self, context):
- layout = self.layout
ac = vr_actionconfig_active_get(context)
if not ac:
return
-
+
+ layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
@@ -933,11 +948,11 @@ class VIEW3D_PT_vr_actions_haptics(VRActionsPanel, Panel):
bl_parent_id = "VIEW3D_PT_vr_actions_actions"
def draw(self, context):
- layout = self.layout
ac = vr_actionconfig_active_get(context)
if not ac:
return
+ layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
@@ -964,11 +979,11 @@ class VIEW3D_PT_vr_actions_bindings(VRActionsPanel, Panel):
bl_parent_id = "VIEW3D_PT_vr_actions_actions"
def draw(self, context):
- layout = self.layout
ac = vr_actionconfig_active_get(context)
if not ac:
return
+ layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
@@ -1011,6 +1026,23 @@ class VIEW3D_PT_vr_actions_bindings(VRActionsPanel, Panel):
col.prop(amb, "pose_rotation", text="Rotation Offset")
+class VIEW3D_PT_vr_actions_extensions(VRActionsPanel, Panel):
+ bl_label = "Extensions"
+ bl_parent_id = "VIEW3D_PT_vr_actions_actionmaps"
+
+ def draw(self, context):
+ scene = context.scene
+
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ col = layout.column(align=True)
+ col.prop(scene, "vr_actions_enable_reverb_g2", text="HP Reverb G2")
+ col.prop(scene, "vr_actions_enable_cosmos", text="HTC Vive Cosmos")
+ col.prop(scene, "vr_actions_enable_huawei", text="Huawei")
+
+
class VIEW3D_OT_vr_actionmap_add(Operator):
bl_idname = "view3d.vr_actionmap_add"
bl_label = "Add VR Action Map"
diff --git a/viewport_vr_preview/versioning.py b/viewport_vr_preview/versioning.py
index 70bbb55a..8ee2755e 100644
--- a/viewport_vr_preview/versioning.py
+++ b/viewport_vr_preview/versioning.py
@@ -28,7 +28,7 @@ def actionconfig_update(actionconfig_data, actionconfig_version):
if actionconfig_version >= blender_version:
return actionconfig_data
-## # Version the action-map.
+## # Version the action map.
## import copy
## has_copy = False
##
@@ -38,8 +38,17 @@ def actionconfig_update(actionconfig_data, actionconfig_version):
## actionconfig_data = copy.deepcopy(actionconfig_data)
## has_copy = True
##
-## for _am_name, _am_parms, am_items_data in actionconfig_data:
-## for (_item_op, item_event, _item_prop) in am_items_data["items"]:
-## # Apply version updates here.
+## for (am_name, am_content) in actionconfig_data:
+## # Apply action map updates.
+##
+## am_items = am_content["items"]
+##
+## for (ami_name, ami_args, ami_data, ami_content) in am_items
+## # Apply action map item updates.
+##
+## ami_bindings = ami_content["bindings"]
+##
+## for (amb_name, amb_args) in ami_bindings:
+## # Apply action map binding updates.
return actionconfig_data