VR: Add select, transform default actions
From xr-controller-support branch.
This commit is contained in:
parent
f358eb205b
commit
4413ca3065
|
@ -32,22 +32,22 @@ actionconfig_data = \
|
|||
],
|
||||
},
|
||||
),
|
||||
("teleport", {"type": 'FLOAT', "user_paths": ['/user/hand/left', '/user/hand/right'], "op": 'wm.xr_navigation_teleport', "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'},
|
||||
("teleport", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_teleport', "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'},
|
||||
{"op_properties":
|
||||
[("interpolation", 0.9),
|
||||
("color", (0.0, 1.0, 1.0, 1.0)),
|
||||
],
|
||||
},
|
||||
{"bindings":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_paths": ['/input/select/click', '/input/select/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/trigger/value', '/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_paths": ['/input/select/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
@ -224,6 +224,33 @@ actionconfig_data = \
|
|||
("scale", True),
|
||||
],
|
||||
},
|
||||
{"bindings":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/home/click', '/input/home/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_paths": ['/input/trackpad/click', '/input/trackpad/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/thumbstick/click', '/input/thumbstick/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "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":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_paths": ['/input/select/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/trigger/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("transform", {"type": 'FLOAT', "user_paths": ['/user/hand/left', '/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":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/back/click', '/input/back/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/a/click', '/input/a/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
|
@ -236,6 +263,30 @@ actionconfig_data = \
|
|||
],
|
||||
},
|
||||
),
|
||||
("undo", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "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":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/volume_down/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/y/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/y/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/y/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/y/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/trackpad/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("redo", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "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":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/input/volume_up/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("vive_focus", {"profile": '/interaction_profiles/htc/vive_focus3_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_paths": ['/input/trackpad/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("haptic", {"type": 'VIBRATION', "user_paths": ['/user/hand/left', '/user/hand/right']}, None,
|
||||
{"bindings":
|
||||
[("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_paths": ['/output/haptic', '/output/haptic']}),
|
||||
|
@ -263,13 +314,13 @@ actionconfig_data = \
|
|||
],
|
||||
},
|
||||
{"bindings":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/trigger_right/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/trigger_left/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly", {"type": 'FLOAT', "user_paths": ['/user/gamepad'], "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":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/trigger_left/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/a/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
@ -373,7 +424,29 @@ actionconfig_data = \
|
|||
],
|
||||
},
|
||||
{"bindings":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/a/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/y/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'FLOAT', "user_paths": ['/user/gamepad'], "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'},
|
||||
{"op_properties":
|
||||
[("from_viewer", True),
|
||||
],
|
||||
},
|
||||
{"bindings":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/trigger_right/value'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("undo", {"type": 'FLOAT', "user_paths": ['/user/gamepad'], "op": 'ed.undo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic_left', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
|
||||
{"bindings":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/x/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
("redo", {"type": 'FLOAT', "user_paths": ['/user/gamepad'], "op": 'ed.redo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic_right', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
|
||||
{"bindings":
|
||||
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_paths": ['/input/b/click'], "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
|
|
@ -36,6 +36,10 @@ class VRDefaultActions(Enum):
|
|||
FLY_TURNLEFT = "fly_turnleft"
|
||||
FLY_TURNRIGHT = "fly_turnright"
|
||||
NAV_RESET = "nav_reset"
|
||||
SELECT = "select"
|
||||
TRANSFORM = "transform"
|
||||
UNDO = "undo"
|
||||
REDO = "redo"
|
||||
HAPTIC = "haptic"
|
||||
HAPTIC_LEFT = "haptic_left"
|
||||
HAPTIC_RIGHT = "haptic_right"
|
||||
|
@ -335,8 +339,7 @@ def vr_defaults_create_default(session_settings):
|
|||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.TELEPORT.value,
|
||||
["/user/hand/left",
|
||||
"/user/hand/right"],
|
||||
["/user/hand/left"],
|
||||
"wm.xr_navigation_teleport",
|
||||
'MODAL',
|
||||
False,
|
||||
|
@ -350,72 +353,63 @@ def vr_defaults_create_default(session_settings):
|
|||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.HUAWEI.value,
|
||||
VRDefaultActionprofiles.HUAWEI.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.INDEX.value,
|
||||
VRDefaultActionprofiles.INDEX.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.OCULUS.value,
|
||||
VRDefaultActionprofiles.OCULUS.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.REVERB_G2.value,
|
||||
VRDefaultActionprofiles.REVERB_G2.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.SIMPLE.value,
|
||||
VRDefaultActionprofiles.SIMPLE.value,
|
||||
["/input/select/click",
|
||||
"/input/select/click"],
|
||||
["/input/select/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE.value,
|
||||
VRDefaultActionprofiles.VIVE.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_COSMOS.value,
|
||||
VRDefaultActionprofiles.VIVE_COSMOS.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_FOCUS.value,
|
||||
VRDefaultActionprofiles.VIVE_FOCUS.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.WMR.value,
|
||||
VRDefaultActionprofiles.WMR.value,
|
||||
["/input/trigger/value",
|
||||
"/input/trigger/value"],
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
@ -1080,6 +1074,162 @@ def vr_defaults_create_default(session_settings):
|
|||
3000.0,
|
||||
0.5,
|
||||
'PRESS')
|
||||
if ami:
|
||||
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/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.OCULUS.value,
|
||||
VRDefaultActionprofiles.OCULUS.value,
|
||||
["/input/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.REVERB_G2.value,
|
||||
VRDefaultActionprofiles.REVERB_G2.value,
|
||||
["/input/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE.value,
|
||||
VRDefaultActionprofiles.VIVE.value,
|
||||
["/input/trackpad/click",
|
||||
"/input/trackpad/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_COSMOS.value,
|
||||
VRDefaultActionprofiles.VIVE_COSMOS.value,
|
||||
["/input/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_FOCUS.value,
|
||||
VRDefaultActionprofiles.VIVE_FOCUS.value,
|
||||
["/input/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.WMR.value,
|
||||
VRDefaultActionprofiles.WMR.value,
|
||||
["/input/thumbstick/click",
|
||||
"/input/thumbstick/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
["/user/hand/right"],
|
||||
"wm.xr_select_raycast",
|
||||
'MODAL',
|
||||
False,
|
||||
"",
|
||||
False,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
'PRESS')
|
||||
if ami:
|
||||
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',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.OCULUS.value,
|
||||
VRDefaultActionprofiles.OCULUS.value,
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
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"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_COSMOS.value,
|
||||
VRDefaultActionprofiles.VIVE_COSMOS.value,
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_FOCUS.value,
|
||||
VRDefaultActionprofiles.VIVE_FOCUS.value,
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.WMR.value,
|
||||
VRDefaultActionprofiles.WMR.value,
|
||||
["/input/trigger/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.TRANSFORM.value,
|
||||
["/user/hand/left",
|
||||
"/user/hand/right"],
|
||||
"wm.xr_transform_grab",
|
||||
'MODAL',
|
||||
True,
|
||||
"",
|
||||
False,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.HUAWEI.value,
|
||||
|
@ -1146,6 +1296,132 @@ def vr_defaults_create_default(session_settings):
|
|||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
["/user/hand/left"],
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False,
|
||||
"haptic",
|
||||
True,
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.HUAWEI.value,
|
||||
VRDefaultActionprofiles.HUAWEI.value,
|
||||
["/input/volume_down/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"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.REVERB_G2.value,
|
||||
VRDefaultActionprofiles.REVERB_G2.value,
|
||||
["/input/y/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_COSMOS.value,
|
||||
VRDefaultActionprofiles.VIVE_COSMOS.value,
|
||||
["/input/y/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_FOCUS.value,
|
||||
VRDefaultActionprofiles.VIVE_FOCUS.value,
|
||||
["/input/y/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.WMR.value,
|
||||
VRDefaultActionprofiles.WMR.value,
|
||||
["/input/trackpad/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
["/user/hand/right"],
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
False,
|
||||
"haptic",
|
||||
True,
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.HUAWEI.value,
|
||||
VRDefaultActionprofiles.HUAWEI.value,
|
||||
["/input/volume_up/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"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.REVERB_G2.value,
|
||||
VRDefaultActionprofiles.REVERB_G2.value,
|
||||
["/input/b/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_COSMOS.value,
|
||||
VRDefaultActionprofiles.VIVE_COSMOS.value,
|
||||
["/input/b/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.VIVE_FOCUS.value,
|
||||
VRDefaultActionprofiles.VIVE_FOCUS.value,
|
||||
["/input/b/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.WMR.value,
|
||||
VRDefaultActionprofiles.WMR.value,
|
||||
["/input/trackpad/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_haptic_action_add(am,
|
||||
VRDefaultActions.HAPTIC.value,
|
||||
["/user/hand/left",
|
||||
|
@ -1218,7 +1494,7 @@ def vr_defaults_create_default_gamepad(session_settings):
|
|||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/trigger_right/value"],
|
||||
["/input/trigger_left/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
@ -1239,7 +1515,7 @@ def vr_defaults_create_default_gamepad(session_settings):
|
|||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/trigger_left/value"],
|
||||
["/input/a/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
@ -1428,7 +1704,70 @@ def vr_defaults_create_default_gamepad(session_settings):
|
|||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/a/click"],
|
||||
["/input/y/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
["/user/gamepad"],
|
||||
"wm.xr_select_raycast",
|
||||
'MODAL',
|
||||
False,
|
||||
"",
|
||||
False,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/trigger_right/value"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
["/user/gamepad"],
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False,
|
||||
"haptic_left",
|
||||
True,
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/x/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
||||
ami = vr_defaults_action_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
["/user/gamepad"],
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
False,
|
||||
"haptic_right",
|
||||
True,
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5,
|
||||
'PRESS')
|
||||
if ami:
|
||||
vr_defaults_actionbinding_add(ami,
|
||||
VRDefaultActionbindings.GAMEPAD.value,
|
||||
VRDefaultActionprofiles.GAMEPAD.value,
|
||||
["/input/b/click"],
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY')
|
||||
|
|
Loading…
Reference in New Issue