VR: Add fly navigation, gamepad profile defaults
This commit is contained in:
parent
3012fffba6
commit
2c6f9cb769
|
@ -1,29 +1,93 @@
|
|||
actionconfig_version = (3, 0, 3)
|
||||
actionconfig_version = (3, 0, 4)
|
||||
actionconfig_data = \
|
||||
[("blender_oculus",
|
||||
{"profile": '/interaction_profiles/oculus/touch_controller'},
|
||||
{"items":
|
||||
[("controller_pose", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/grip/pose', "user_path1": '/user/hand/right', "component_path1": '/input/grip/pose', "pose_is_controller": 'True', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(-0.8726646304130554, 0.0, 0.0)'}, None),
|
||||
("teleport",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '/user/hand/right', "component_path1": '/input/trigger/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("interpolation", 0.9),
|
||||
("color", (0.0, 1.0, 1.0, 1.0)),
|
||||
],
|
||||
},
|
||||
),
|
||||
("navigate",
|
||||
("grab",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/squeeze/value', "user_path1": '/user/hand/right', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_grab', "op_flag": 'MODAL', "bimanual": 'True'},
|
||||
{"op_properties":
|
||||
[("lock_rotation", True),
|
||||
("lock_scale", True),
|
||||
],
|
||||
},
|
||||
),
|
||||
("raycast_select", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/x/click', "user_path1": '/user/hand/right', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/y/click', "user_path1": '/user/hand/right', "component_path1": '/input/b/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("fly", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/click', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("fly_forward",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'FORWARD'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_back",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'BACK'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_left",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'LEFT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_right",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'RIGHT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_up",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'UP'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_down",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'DOWN'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnleft",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNLEFT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnright",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/x/click', "user_path1": '/user/hand/right', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/y/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/b/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
],
|
||||
},
|
||||
|
@ -33,25 +97,89 @@ actionconfig_data = \
|
|||
{"items":
|
||||
[("controller_pose", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/grip/pose', "user_path1": '/user/hand/right', "component_path1": '/input/grip/pose', "pose_is_controller": 'True', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(-0.8726646304130554, 0.0, 0.0)'}, None),
|
||||
("teleport",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '/user/hand/right', "component_path1": '/input/trigger/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("interpolation", 0.9),
|
||||
("color", (0.0, 1.0, 1.0, 1.0)),
|
||||
],
|
||||
},
|
||||
),
|
||||
("navigate",
|
||||
("grab",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/squeeze/click', "user_path1": '/user/hand/right', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_grab', "op_flag": 'MODAL', "bimanual": 'True'},
|
||||
{"op_properties":
|
||||
[("lock_rotation", True),
|
||||
("lock_scale", True),
|
||||
],
|
||||
},
|
||||
),
|
||||
("raycast_select", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '/user/hand/right', "component_path1": '/input/trackpad/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("fly", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/click', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("fly_forward",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'FORWARD'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_back",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'BACK'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_left",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'LEFT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_right",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'RIGHT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_up",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'UP'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_down",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'DOWN'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnleft",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNLEFT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnright",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
],
|
||||
},
|
||||
|
@ -61,23 +189,88 @@ actionconfig_data = \
|
|||
{"items":
|
||||
[("controller_pose", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/grip/pose', "user_path1": '/user/hand/right', "component_path1": '/input/grip/pose', "pose_is_controller": 'True', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
|
||||
("teleport",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '/user/hand/right', "component_path1": '/input/trigger/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("interpolation", 0.9),
|
||||
("color", (0.0, 1.0, 1.0, 1.0)),
|
||||
],
|
||||
},
|
||||
),
|
||||
("navigate",
|
||||
("grab",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/squeeze/click', "user_path1": '/user/hand/right', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_grab', "op_flag": 'MODAL', "bimanual": 'True'},
|
||||
{"op_properties":
|
||||
[("lock_rotation", True),
|
||||
("lock_scale", True),
|
||||
],
|
||||
},
|
||||
),
|
||||
("raycast_select", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '/user/hand/right', "component_path1": '/input/trackpad/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("fly_forward",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'FORWARD'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_back",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'BACK'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_left",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'LEFT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_right",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_up",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'UP'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_down",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'DOWN'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnleft",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNLEFT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnright",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
],
|
||||
},
|
||||
|
@ -87,29 +280,167 @@ actionconfig_data = \
|
|||
{"items":
|
||||
[("controller_pose", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/grip/pose', "user_path1": '/user/hand/right', "component_path1": '/input/grip/pose', "pose_is_controller": 'True', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
|
||||
("teleport",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '/user/hand/right', "component_path1": '/input/trigger/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("interpolation", 0.9),
|
||||
("color", (0.0, 1.0, 1.0, 1.0)),
|
||||
],
|
||||
},
|
||||
),
|
||||
("navigate",
|
||||
("grab",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/squeeze/value', "user_path1": '/user/hand/right', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_grab', "op_flag": 'MODAL', "bimanual": 'True'},
|
||||
{"op_properties":
|
||||
[("lock_rotation", True),
|
||||
("lock_scale", True),
|
||||
],
|
||||
},
|
||||
),
|
||||
("raycast_select", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/a/click', "user_path1": '/user/hand/right', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/b/click', "user_path1": '/user/hand/right', "component_path1": '/input/b/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/x', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("fly", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/click', "user_path1": '/user/hand/right', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("fly_forward",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'FORWARD'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_back",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'BACK'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_left",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'LEFT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_right",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'RIGHT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_up",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'UP'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_down",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'DOWN'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnleft",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNLEFT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnright",
|
||||
{"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
|
||||
("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/a/click', "user_path1": '/user/hand/right', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
|
||||
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/b/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/b/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
|
||||
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
],
|
||||
},
|
||||
),
|
||||
("blender_gamepad",
|
||||
{"profile": '/interaction_profiles/microsoft/xbox_controller'},
|
||||
{"items":
|
||||
[("fly_forward",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_left/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'FORWARD'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_back",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_left/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'BACK'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_left",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_left/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'LEFT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_right",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_left/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'RIGHT'),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_up",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_right/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'UP'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_down",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_right/y', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'DOWN'),
|
||||
("speed_min", 0.014),
|
||||
("speed_max", 0.042),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnleft",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_right/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNLEFT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("fly_turnright",
|
||||
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/thumbstick_right/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
|
||||
{"op_properties":
|
||||
[("mode", 'TURNRIGHT'),
|
||||
("speed_min", 0.01),
|
||||
("speed_max", 0.03),
|
||||
],
|
||||
},
|
||||
),
|
||||
("haptic_left", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_left', "user_path1": '', "component_path1": '', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
("haptic_right", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_right', "user_path1": '', "component_path1": '', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
("haptic_lefttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_left_trigger', "user_path1": '', "component_path1": '', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
("haptic_righttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_right_trigger', "user_path1": '', "component_path1": '', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -36,18 +36,32 @@ class VRDefaultActionmaps(Enum):
|
|||
WMR = "blender_wmr"
|
||||
VIVE = "blender_vive"
|
||||
INDEX = "blender_index"
|
||||
GAMEPAD = "blender_gamepad"
|
||||
|
||||
|
||||
# Default actions.
|
||||
class VRDefaultActions(Enum):
|
||||
CONTROLLER_POSE = "controller_pose"
|
||||
TELEPORT = "teleport"
|
||||
NAVIGATE = "navigate"
|
||||
RAYCAST_SELECT = "raycast_select"
|
||||
GRAB = "grab"
|
||||
FLY = "fly"
|
||||
FLY_FORWARD = "fly_forward"
|
||||
FLY_BACK = "fly_back"
|
||||
FLY_LEFT = "fly_left"
|
||||
FLY_RIGHT = "fly_right"
|
||||
FLY_UP = "fly_up"
|
||||
FLY_DOWN = "fly_down"
|
||||
FLY_TURNLEFT = "fly_turnleft"
|
||||
FLY_TURNRIGHT = "fly_turnright"
|
||||
SELECT = "select"
|
||||
TRANSFORM = "transform"
|
||||
UNDO = "undo"
|
||||
REDO = "redo"
|
||||
HAPTIC = "haptic"
|
||||
HAPTIC_LEFT = "haptic_left"
|
||||
HAPTIC_RIGHT = "haptic_right"
|
||||
HAPTIC_LEFTTRIGGER = "haptic_lefttrigger"
|
||||
HAPTIC_RIGHTTRIGGER = "haptic_righttrigger"
|
||||
|
||||
|
||||
def vr_defaults_actionmap_add(ac, name, profile):
|
||||
|
@ -154,16 +168,16 @@ def vr_defaults_create_oculus(ac):
|
|||
VRDefaultActions.TELEPORT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trigger/value",
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_teleport",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.NAVIGATE.value,
|
||||
VRDefaultActions.GRAB.value,
|
||||
"/user/hand/left",
|
||||
"/input/squeeze/value",
|
||||
"/user/hand/right",
|
||||
|
@ -173,13 +187,121 @@ def vr_defaults_create_oculus(ac):
|
|||
'ANY',
|
||||
"wm.xr_navigation_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.RAYCAST_SELECT.value,
|
||||
VRDefaultActions.FLY.value,
|
||||
"/user/hand/left",
|
||||
"/input/x/click",
|
||||
"/input/thumbstick/click",
|
||||
"/user/hand/right",
|
||||
"/input/a/click",
|
||||
"/input/thumbstick/click",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_FORWARD.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_BACK.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_LEFT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_RIGHT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_UP.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_DOWN.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNLEFT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNRIGHT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
|
@ -187,41 +309,41 @@ def vr_defaults_create_oculus(ac):
|
|||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.GRAB.value,
|
||||
VRDefaultActions.TRANSFORM.value,
|
||||
"/user/hand/left",
|
||||
"/input/y/click",
|
||||
"/input/x/click",
|
||||
"/user/hand/right",
|
||||
"/input/b/click",
|
||||
"/input/a/click",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_transform_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/y/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/b/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC.value,
|
||||
"/user/hand/left",
|
||||
|
@ -248,21 +370,21 @@ def vr_defaults_create_wmr(ac):
|
|||
"/input/grip/pose",
|
||||
True,
|
||||
(0, 0, 0),
|
||||
(math.radians(-45), 0, 0))
|
||||
(math.radians(-50), 0, 0))
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.TELEPORT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trigger/value",
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_teleport",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.NAVIGATE.value,
|
||||
VRDefaultActions.GRAB.value,
|
||||
"/user/hand/left",
|
||||
"/input/squeeze/click",
|
||||
"/user/hand/right",
|
||||
|
@ -272,13 +394,121 @@ def vr_defaults_create_wmr(ac):
|
|||
'ANY',
|
||||
"wm.xr_navigation_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.RAYCAST_SELECT.value,
|
||||
VRDefaultActions.FLY.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/click",
|
||||
"/input/thumbstick/click",
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/click",
|
||||
"/input/thumbstick/click",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_FORWARD.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_BACK.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_LEFT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_RIGHT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_UP.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_DOWN.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNLEFT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNRIGHT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
|
@ -286,7 +516,7 @@ def vr_defaults_create_wmr(ac):
|
|||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.GRAB.value,
|
||||
VRDefaultActions.TRANSFORM.value,
|
||||
"/user/hand/left",
|
||||
"/input/menu/click",
|
||||
"/user/hand/right",
|
||||
|
@ -300,23 +530,23 @@ def vr_defaults_create_wmr(ac):
|
|||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/trackpad/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/trackpad/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
|
@ -347,21 +577,21 @@ def vr_defaults_create_vive(ac):
|
|||
"/input/grip/pose",
|
||||
True,
|
||||
(0, 0, 0),
|
||||
(0, 0, 0))
|
||||
(0, 0, 0))
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.TELEPORT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trigger/value",
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_teleport",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.NAVIGATE.value,
|
||||
VRDefaultActions.GRAB.value,
|
||||
"/user/hand/left",
|
||||
"/input/squeeze/click",
|
||||
"/user/hand/right",
|
||||
|
@ -371,21 +601,117 @@ def vr_defaults_create_vive(ac):
|
|||
'ANY',
|
||||
"wm.xr_navigation_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.RAYCAST_SELECT.value,
|
||||
VRDefaultActions.FLY_FORWARD.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/click",
|
||||
"/input/trackpad/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_BACK.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_LEFT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_RIGHT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_UP.value,
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/click",
|
||||
"/input/trackpad/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_DOWN.value,
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNLEFT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNRIGHT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_select_raycast",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.GRAB.value,
|
||||
VRDefaultActions.TRANSFORM.value,
|
||||
"/user/hand/left",
|
||||
"/input/menu/click",
|
||||
"/user/hand/right",
|
||||
|
@ -395,7 +721,31 @@ def vr_defaults_create_vive(ac):
|
|||
'ANY',
|
||||
"wm.xr_transform_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/trackpad/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
"/user/hand/right",
|
||||
"/input/trackpad/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
False)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC.value,
|
||||
"/user/hand/left",
|
||||
|
@ -422,21 +772,21 @@ def vr_defaults_create_index(ac):
|
|||
"/input/grip/pose",
|
||||
True,
|
||||
(0, 0, 0),
|
||||
(0, 0, 0))
|
||||
(0, 0, 0))
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.TELEPORT.value,
|
||||
"/user/hand/left",
|
||||
"/input/trigger/value",
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_teleport",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.NAVIGATE.value,
|
||||
VRDefaultActions.GRAB.value,
|
||||
"/user/hand/left",
|
||||
"/input/squeeze/value",
|
||||
"/user/hand/right",
|
||||
|
@ -446,51 +796,159 @@ def vr_defaults_create_index(ac):
|
|||
'ANY',
|
||||
"wm.xr_navigation_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.RAYCAST_SELECT.value,
|
||||
VRDefaultActions.FLY.value,
|
||||
"/user/hand/left",
|
||||
"/input/a/click",
|
||||
"/input/thumbstick/click",
|
||||
"/user/hand/right",
|
||||
"/input/a/click",
|
||||
"/input/thumbstick/click",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_FORWARD.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_BACK.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_LEFT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_RIGHT.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_UP.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_DOWN.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNLEFT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNRIGHT.value,
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.SELECT.value,
|
||||
"/user/hand/right",
|
||||
"/input/trigger/value",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_select_raycast",
|
||||
'MODAL',
|
||||
False)
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.GRAB.value,
|
||||
VRDefaultActions.TRANSFORM.value,
|
||||
"/user/hand/left",
|
||||
"/input/b/click",
|
||||
"/input/a/click",
|
||||
"/user/hand/right",
|
||||
"/input/b/click",
|
||||
"/input/a/click",
|
||||
0.3,
|
||||
'ANY',
|
||||
'ANY',
|
||||
"wm.xr_transform_grab",
|
||||
'MODAL',
|
||||
True)
|
||||
True)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.UNDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/b/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.undo",
|
||||
'PRESS',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.REDO.value,
|
||||
"/user/hand/left",
|
||||
"/input/thumbstick/x",
|
||||
"/user/hand/right",
|
||||
"/input/thumbstick/x",
|
||||
"/input/b/click",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
'ANY',
|
||||
"ed.redo",
|
||||
'PRESS',
|
||||
|
@ -506,6 +964,147 @@ def vr_defaults_create_index(ac):
|
|||
0.5)
|
||||
|
||||
|
||||
def vr_defaults_create_gamepad(ac):
|
||||
am = vr_defaults_actionmap_add(ac,
|
||||
VRDefaultActionmaps.GAMEPAD.value,
|
||||
"/interaction_profiles/microsoft/xbox_controller")
|
||||
if not am:
|
||||
return
|
||||
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_FORWARD.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_left/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_BACK.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_left/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_LEFT.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_left/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_RIGHT.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_left/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_UP.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_right/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_DOWN.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_right/y",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNLEFT.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_right/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'NEGATIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_actionmap_item_add(am,
|
||||
VRDefaultActions.FLY_TURNRIGHT.value,
|
||||
"/user/gamepad",
|
||||
"/input/thumbstick_right/x",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
'POSITIVE',
|
||||
'ANY',
|
||||
"wm.xr_navigation_fly",
|
||||
'MODAL',
|
||||
False)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC_LEFT.value,
|
||||
"/user/gamepad",
|
||||
"/output/haptic_left",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC_RIGHT.value,
|
||||
"/user/gamepad",
|
||||
"/output/haptic_right",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC_LEFTTRIGGER.value,
|
||||
"/user/gamepad",
|
||||
"/output/haptic_left_trigger",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5)
|
||||
vr_defaults_haptic_actionmap_item_add(am,
|
||||
VRDefaultActions.HAPTIC_RIGHTTRIGGER.value,
|
||||
"/user/gamepad",
|
||||
"/output/haptic_right_trigger",
|
||||
"",
|
||||
"",
|
||||
0.3,
|
||||
3000.0,
|
||||
0.5)
|
||||
|
||||
|
||||
@persistent
|
||||
def vr_init_default_actionconfig(context: bpy.context):
|
||||
context = bpy.context
|
||||
|
@ -531,5 +1130,6 @@ def vr_init_default_actionconfig(context: bpy.context):
|
|||
vr_defaults_create_wmr(ac)
|
||||
vr_defaults_create_vive(ac)
|
||||
vr_defaults_create_index(ac)
|
||||
vr_defaults_create_gamepad(ac)
|
||||
|
||||
main.vr_save_actionmaps(context, filepath, sort=False)
|
||||
|
|
Loading…
Reference in New Issue