VR: Refactor action maps, bindings

By allowing multiple interaction profiles per action map, there now
only needs to be one default action map (plus an additional one for
gamepad input).
This commit is contained in:
Peter Kim 2021-07-28 13:09:43 +09:00
parent fcf49e7cff
commit 45c234f953
5 changed files with 1835 additions and 1934 deletions

View File

@ -51,6 +51,7 @@ classes = (
main.VIEW3D_PT_vr_actions_actionmaps,
main.VIEW3D_PT_vr_actions_actions,
main.VIEW3D_PT_vr_actions_haptics,
main.VIEW3D_PT_vr_actions_bindings,
main.VIEW3D_PT_vr_motion_capture,
main.VIEW3D_PT_vr_viewport_feedback,
@ -72,6 +73,8 @@ classes = (
main.VIEW3D_MT_vr_actionmap_menu,
main.VIEW3D_UL_vr_actions,
main.VIEW3D_MT_vr_action_menu,
main.VIEW3D_UL_vr_actionbindings,
main.VIEW3D_MT_vr_actionbinding_menu,
main.VIEW3D_OT_vr_actionmap_add,
main.VIEW3D_OT_vr_actionmap_remove,
@ -85,6 +88,10 @@ classes = (
main.VIEW3D_OT_vr_action_remove,
main.VIEW3D_OT_vr_action_copy,
main.VIEW3D_OT_vr_actions_clear,
main.VIEW3D_OT_vr_actionbinding_add,
main.VIEW3D_OT_vr_actionbinding_remove,
main.VIEW3D_OT_vr_actionbinding_copy,
main.VIEW3D_OT_vr_actionbindings_clear,
main.VIEW3D_GT_vr_camera_cone,
main.VIEW3D_GT_vr_controller_grip,

View File

@ -1,486 +1,408 @@
actionconfig_version = (3, 0, 8)
actionconfig_version = (3, 0, 13)
actionconfig_data = \
[("blender_oculus",
{"profile": '/interaction_profiles/oculus/touch_controller'},
[("blender_default",
{"items":
[("controller_grip", {"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_grip": 'True', "pose_is_controller_aim": 'False', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
("controller_aim", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/aim/pose', "user_path1": '/user/hand/right', "component_path1": '/input/aim/pose', "pose_is_controller_grip": 'False', "pose_is_controller_aim": 'True', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
[("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)'}),
("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)'}),
("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)'}),
],
},
),
("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)'}),
("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)'}),
("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)'}),
],
},
),
("teleport",
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("interpolation", 0.9),
("color", (0.0, 1.0, 1.0, 1.0)),
],
},
),
("nav_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("lock_rotation", True),
},
{"bindings":
[("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("nav_grab",
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_navigation_grab', "op_flag": 'MODAL', "bimanual": 'True', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("lock_rotation", True),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/squeeze/click', "component_path1": '/input/squeeze/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/squeeze/value', "component_path1": '/input/squeeze/value', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("fly", {"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_FORWARD'),
("lock_location_z", True),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_BACK'),
("lock_location_z", True),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_LEFT'),
("lock_location_z", True),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_RIGHT'),
("lock_location_z", True),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'UP'),
("speed_min", 0.014),
("speed_max", 0.042),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'DOWN'),
("speed_min", 0.014),
("speed_max", 0.042),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNLEFT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNRIGHT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("raycast_select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/select/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("simple", {"profile": '/interaction_profiles/khr/simple_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/x/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/menu/click', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/a/click', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "user_path1": '', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "user_path1": '', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("haptic", {"type": 'HAPTIC', "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'}),
("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'}),
("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'}),
],
},
),
("raycast_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None),
("grab", {"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None),
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic'}, None),
],
},
),
("blender_wmr",
{"profile": '/interaction_profiles/microsoft/motion_controller'},
{"items":
[("controller_grip", {"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_grip": 'True', "pose_is_controller_aim": 'False', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
("controller_aim", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/aim/pose', "user_path1": '/user/hand/right', "component_path1": '/input/aim/pose', "pose_is_controller_grip": 'False', "pose_is_controller_aim": '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": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("interpolation", 0.9),
("color", (0.0, 1.0, 1.0, 1.0)),
],
},
),
("nav_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("lock_rotation", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_FORWARD'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_BACK'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_LEFT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_RIGHT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNRIGHT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
),
("raycast_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None),
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic'}, None),
],
},
),
("blender_vive",
{"profile": '/interaction_profiles/htc/vive_controller'},
{"items":
[("controller_grip", {"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_grip": 'True', "pose_is_controller_aim": 'False', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
("controller_aim", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/aim/pose', "user_path1": '/user/hand/right', "component_path1": '/input/aim/pose', "pose_is_controller_grip": 'False', "pose_is_controller_aim": '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": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("interpolation", 0.9),
("color", (0.0, 1.0, 1.0, 1.0)),
],
},
),
("nav_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("lock_rotation", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_FORWARD'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_BACK'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_LEFT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_RIGHT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNRIGHT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
),
("raycast_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None),
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic'}, None),
],
},
),
("blender_index",
{"profile": '/interaction_profiles/valve/index_controller'},
{"items":
[("controller_grip", {"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_grip": 'True', "pose_is_controller_aim": 'False', "pose_location": '(0.0, 0.0, 0.0)', "pose_rotation": '(0.0, 0.0, 0.0)'}, None),
("controller_aim", {"type": 'POSE', "user_path0": '/user/hand/left', "component_path0": '/input/aim/pose', "user_path1": '/user/hand/right', "component_path1": '/input/aim/pose', "pose_is_controller_grip": 'False', "pose_is_controller_aim": '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": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("interpolation", 0.9),
("color", (0.0, 1.0, 1.0, 1.0)),
],
},
),
("nav_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("lock_rotation", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_FORWARD'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_BACK'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_LEFT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_RIGHT'),
("lock_location_z", True),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNRIGHT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
),
("raycast_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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None),
("grab", {"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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, 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', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_flag": 'PRESS'}, None),
("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic'}, None),
],
},
),
("blender_gamepad",
{"profile": '/interaction_profiles/microsoft/xbox_controller'},
("blender_default_gamepad",
{"items":
[("teleport",
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/trigger_left/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_teleport', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("interpolation", 0.9),
("from_viewer", True),
("color", (0.0, 1.0, 1.0, 1.0)),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/trigger_left/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("fly", {"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/a/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("fly", {"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/a/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'}, None),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_FORWARD'),
("lock_location_z", True),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_left/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_BACK'),
("lock_location_z", True),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_left/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_LEFT'),
("lock_location_z", True),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_left/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'VIEWER_RIGHT'),
("lock_location_z", True),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_left/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'UP'),
("speed_min", 0.014),
("speed_max", 0.042),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_right/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'DOWN'),
("speed_min", 0.014),
("speed_max", 0.042),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_right/y', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNLEFT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_right/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'NEGATIVE'}),
],
},
),
("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', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("mode", 'TURNRIGHT'),
("speed_min", 0.01),
("speed_max", 0.03),
],
},
),
("raycast_select",
{"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/trigger_right/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("from_viewer", True),
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/thumbstick_right/x', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE'}),
],
},
),
("raycast_select",
{"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_flag": 'PRESS'},
{"op_properties":
[("from_viewer", True),
],
},
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/trigger_right/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("undo", {"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'ed.undo', "op_flag": '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_flag": 'PRESS'}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/x/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("redo", {"type": 'BUTTON', "user_path0": '/user/gamepad', "user_path1": '', "op": 'ed.redo', "op_flag": '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_flag": 'PRESS'}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY'}),
],
},
),
("haptic_left", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "user_path1": ''}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/output/haptic_left', "component_path1": ''}),
],
},
),
("haptic_right", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "user_path1": ''}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/output/haptic_right', "component_path1": ''}),
],
},
),
("haptic_lefttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "user_path1": ''}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/output/haptic_left_trigger', "component_path1": ''}),
],
},
),
("haptic_righttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "user_path1": ''}, None,
{"bindings":
[("gamepad", {"profile": '/interaction_profiles/microsoft/xbox_controller', "component_path0": '/output/haptic_right_trigger', "component_path1": ''}),
],
},
),
("undo", {"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/x/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": '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_flag": 'PRESS'}, None),
("redo", {"type": 'BUTTON', "user_path0": '/user/gamepad', "component_path0": '/input/b/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": '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_flag": 'PRESS'}, None),
("haptic_left", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_left', "user_path1": '', "component_path1": ''}, None),
("haptic_right", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_right', "user_path1": '', "component_path1": ''}, None),
("haptic_lefttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_left_trigger', "user_path1": '', "component_path1": ''}, None),
("haptic_righttrigger", {"type": 'HAPTIC', "user_path0": '/user/gamepad', "component_path0": '/output/haptic_right_trigger', "user_path1": '', "component_path1": ''}, None),
],
},
),

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@ __all__ = (
"actionconfig_import_from_data",
"actionconfig_init_from_data",
"actionmap_init_from_data",
"actionmap_item_init_from_data",
)
@ -51,35 +52,14 @@ def repr_f32(f):
return "%.*f" % (i, f_test)
return f_str
def am_args_as_data(am):
s = [
f"\"profile\": '{am.profile}'",
]
return "{" + ", ".join(s) + "}"
def am_data_from_args(am, args):
am.profile = args["profile"]
def ami_args_as_data(ami):
s = [
f"\"type\": '{ami.type}'",
f"\"user_path0\": '{ami.user_path0}'",
f"\"component_path0\": '{ami.component_path0}'",
f"\"user_path1\": '{ami.user_path1}'",
f"\"component_path1\": '{ami.component_path1}'",
]
if ami.type == 'BUTTON' or ami.type == 'AXIS':
s.append(f"\"threshold\": '{ami.threshold}'")
if ami.type == 'BUTTON':
s.append(f"\"axis_flag\": '{ami.axis0_flag}'")
else: # ami.type == 'AXIS':
s.append(f"\"axis0_flag\": '{ami.axis0_flag}'")
s.append(f"\"axis1_flag\": '{ami.axis1_flag}'")
s.append(f"\"op\": '{ami.op}'")
s.append(f"\"op_flag\": '{ami.op_flag}'")
s.append(f"\"bimanual\": '{ami.bimanual}'")
@ -92,8 +72,6 @@ def ami_args_as_data(ami):
elif ami.type == 'POSE':
s.append(f"\"pose_is_controller_grip\": '{ami.pose_is_controller_grip}'")
s.append(f"\"pose_is_controller_aim\": '{ami.pose_is_controller_aim}'")
s.append(f"\"pose_location\": '{ami.pose_location.x, ami.pose_location.y, ami.pose_location.z}'")
s.append(f"\"pose_rotation\": '{ami.pose_rotation.x, ami.pose_rotation.y, ami.pose_rotation.z}'")
return "{" + ", ".join(s) + "}"
@ -102,17 +80,9 @@ def ami_args_as_data(ami):
def ami_data_from_args(ami, args):
ami.type = args["type"]
ami.user_path0 = args["user_path0"]
ami.component_path0 = args["component_path0"]
ami.user_path1 = args["user_path1"]
ami.component_path1 = args["component_path1"]
if ami.type == 'BUTTON' or ami.type == 'AXIS':
ami.threshold = float(args["threshold"])
if ami.type == 'BUTTON':
ami.axis0_flag = args["axis_flag"]
else: # ami.type == 'AXIS':
ami.axis0_flag = args["axis0_flag"]
ami.axis1_flag = args["axis1_flag"]
ami.op = args["op"]
ami.op_flag = args["op_flag"]
ami.bimanual = True if (args["bimanual"] == 'True') else False
@ -125,14 +95,6 @@ def ami_data_from_args(ami, args):
elif ami.type == 'POSE':
ami.pose_is_controller_grip = True if (args["pose_is_controller_grip"] == 'True') else False
ami.pose_is_controller_aim = True if (args["pose_is_controller_aim"] == 'True') else False
l = args["pose_location"].strip(')(').split(', ')
ami.pose_location.x = float(l[0])
ami.pose_location.y = float(l[1])
ami.pose_location.z = float(l[2])
l = args["pose_rotation"].strip(')(').split(', ')
ami.pose_rotation.x = float(l[0])
ami.pose_rotation.y = float(l[1])
ami.pose_rotation.z = float(l[2])
def _ami_properties_to_lines_recursive(level, properties, lines):
@ -185,6 +147,50 @@ def _ami_attrs_or_none(level, ami):
return "".join(lines)
def amb_args_as_data(amb, type):
s = [
f"\"profile\": '{amb.profile}'",
f"\"component_path0\": '{amb.component_path0}'",
f"\"component_path1\": '{amb.component_path1}'",
]
if type == 'BUTTON' or type == 'AXIS':
s.append(f"\"threshold\": '{amb.threshold}'")
if type == 'BUTTON':
s.append(f"\"axis_flag\": '{amb.axis0_flag}'")
else: # type == 'AXIS':
s.append(f"\"axis0_flag\": '{amb.axis0_flag}'")
s.append(f"\"axis1_flag\": '{amb.axis1_flag}'")
elif type == 'POSE':
s.append(f"\"pose_location\": '{amb.pose_location.x, amb.pose_location.y, amb.pose_location.z}'")
s.append(f"\"pose_rotation\": '{amb.pose_rotation.x, amb.pose_rotation.y, amb.pose_rotation.z}'")
return "{" + ", ".join(s) + "}"
def amb_data_from_args(amb, args, type):
amb.profile = args["profile"]
amb.component_path0 = args["component_path0"]
amb.component_path1 = args["component_path1"]
if type == 'BUTTON' or type == 'AXIS':
amb.threshold = float(args["threshold"])
if type == 'BUTTON':
amb.axis0_flag = args["axis_flag"]
else: # type == 'AXIS':
amb.axis0_flag = args["axis0_flag"]
amb.axis1_flag = args["axis1_flag"]
elif type == 'POSE':
l = args["pose_location"].strip(')(').split(', ')
amb.pose_location.x = float(l[0])
amb.pose_location.y = float(l[1])
amb.pose_location.z = float(l[2])
l = args["pose_rotation"].strip(')(').split(', ')
amb.pose_rotation.x = float(l[0])
amb.pose_rotation.y = float(l[1])
amb.pose_rotation.z = float(l[2])
def actionconfig_export_as_data(ac, filepath, *, all_actionmaps=True, sort=False):
export_actionmaps = []
@ -209,18 +215,15 @@ def actionconfig_export_as_data(ac, filepath, *, all_actionmaps=True, sort=False
for am in export_actionmaps:
fw("(")
fw(f"\"{am.name:s}\",\n")
fw(f"{indent(2)}")
am_args = am_args_as_data(am)
fw(am_args)
fw(",\n")
fw(f"{indent(2)}" "{")
fw(f"\"items\":\n")
fw(f"{indent(3)}[")
for ami in am.actionmap_items:
fw(f"(")
fw(f"\"{ami.name:s}\"")
ami_args = ami_args_as_data(ami)
ami_data = _ami_attrs_or_none(4, ami)
fw(f"\"{ami.name:s}\"")
if ami_data is None:
fw(f", ")
else:
@ -228,15 +231,29 @@ def actionconfig_export_as_data(ac, filepath, *, all_actionmaps=True, sort=False
fw(ami_args)
if ami_data is None:
fw(", None),\n")
fw(", None,\n")
else:
fw(",\n")
fw(f"{indent(5)}" "{")
fw(ami_data)
fw(f"{indent(6)}")
fw("},\n" f"{indent(5)}")
fw("),\n")
fw(f"{indent(4)}")
fw("}," f"{indent(5)}")
fw("\n")
fw(f"{indent(5)}" "{")
fw(f"\"bindings\":\n")
fw(f"{indent(6)}[")
for amb in ami.bindings:
fw(f"(")
fw(f"\"{amb.name:s}\"")
fw(f", ")
amb_args = amb_args_as_data(amb, ami.type)
fw(amb_args)
fw("),\n" f"{indent(7)}")
fw("],\n" f"{indent(6)}")
fw("},\n" f"{indent(5)}")
fw("),\n" f"{indent(4)}")
fw("],\n" f"{indent(3)}")
fw("},\n" f"{indent(2)}")
fw("),\n" f"{indent(1)}")
@ -280,9 +297,16 @@ def _ami_props_setattr(ami_props, attr, value):
print(f"Warning: {ex!r}")
def actionmap_item_init_from_data(ami, ami_bindings):
new_fn = getattr(ami.bindings, "new")
for (amb_name, amb_args) in ami_bindings:
amb = new_fn(amb_name, True)
amb_data_from_args(amb, amb_args, ami.type)
def actionmap_init_from_data(am, am_items):
new_fn = getattr(am.actionmap_items, "new")
for (ami_name, ami_args, ami_data) in am_items:
for (ami_name, ami_args, ami_data, ami_content) in am_items:
ami = new_fn(ami_name, True)
ami_data_from_args(ami, ami_args)
if ami_data is not None:
@ -292,6 +316,9 @@ def actionmap_init_from_data(am, am_items):
assert type(ami_props_data) is list
for attr, value in ami_props_data:
_ami_props_setattr(ami_props, attr, value)
ami_bindings = ami_content["bindings"]
assert type(ami_bindings) is list
actionmap_item_init_from_data(ami, ami_bindings)
def actionconfig_init_from_data(ac, actionconfig_data, actionconfig_version):
@ -302,9 +329,8 @@ def actionconfig_init_from_data(ac, actionconfig_data, actionconfig_version):
from .versioning import actionconfig_update
actionconfig_data = actionconfig_update(actionconfig_data, actionconfig_version)
for (am_name, am_args, am_content) in actionconfig_data:
for (am_name, am_content) in actionconfig_data:
am = ac.actionmaps.new(am_name, True)
am_data_from_args(am, am_args)
am_items = am_content["items"]
# Check here instead of inside 'actionmap_init_from_data'
# because we want to allow both tuple & list types in that case.

View File

@ -614,6 +614,14 @@ def vr_actionmap_item_selected_get(am):
)
def vr_actionmap_binding_selected_get(ami):
actionmap_bindings = ami.bindings
return (
None if (len(actionmap_bindings) <
1) else actionmap_bindings[ami.selected_binding]
)
@persistent
def vr_activate_user_actionconfig(context: bpy.context):
# Set user config as active.
@ -645,36 +653,32 @@ def vr_create_actions(context: bpy.context):
controller_grip_name = ""
controller_aim_name = ""
interaction_path0 = ""
interaction_path1 = ""
for ami in am.actionmap_items:
if len(ami.bindings) < 1:
continue
ok = session_state.create_action(context, am.name, ami.name, ami.type,
ami.user_path0, ami.user_path1, ami.threshold, ami.axis0_flag, ami.axis1_flag,
ami.user_path0, ami.user_path1,
ami.op, ami.op_flag, ami.bimanual,
ami.haptic_name, ami.haptic_match_user_paths, ami.haptic_duration, ami.haptic_frequency, ami.haptic_amplitude, ami.haptic_flag)
if not ok:
return
if ami.type == 'POSE':
ok = session_state.create_action_space(context, am.name, ami.name,
ami.user_path0, ami.user_path1,
ami.pose_location, ami.pose_rotation)
if not ok:
return
if ami.pose_is_controller_grip:
controller_grip_name = ami.name
if ami.pose_is_controller_aim:
controller_aim_name = ami.name
interaction_path0 = ami.user_path0 + ami.component_path0
interaction_path1 = ami.user_path1 + ami.component_path1
ok = session_state.create_action_binding(context, am.name, am.profile, ami.name,
interaction_path0, interaction_path1)
if not ok:
return
for amb in ami.bindings:
ok = session_state.create_action_binding(context, am.name, ami.name, ami.type, amb.profile,
ami.user_path0, ami.user_path1,
amb.component_path0, amb.component_path1,
amb.threshold, amb.axis0_flag, amb.axis1_flag,
amb.pose_location, amb.pose_rotation)
if not ok:
return
# Set controller pose actions.
if controller_grip_name and controller_aim_name:
@ -823,6 +827,26 @@ class VIEW3D_MT_vr_action_menu(Menu):
layout.operator("view3d.vr_actions_clear")
class VIEW3D_UL_vr_actionbindings(UIList):
def draw_item(self, context, layout, _data, item, icon, _active_data,
_active_propname, index):
amb = item
layout.emboss = 'NONE'
layout.prop(amb, "name", text="")
class VIEW3D_MT_vr_actionbinding_menu(Menu):
bl_label = "Action Binding Controls"
def draw(self, _context):
layout = self.layout
layout.operator("view3d.vr_actionbinding_copy")
layout.operator("view3d.vr_actionbindings_clear")
class VRActionsPanel:
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@ -859,7 +883,6 @@ class VIEW3D_PT_vr_actions_actionmaps(VRActionsPanel, Panel):
col = row.column(align=True)
col.prop(am, "name", text="Action Map")
col.prop(am, "profile", text="Profile")
class VIEW3D_PT_vr_actions_actions(VRActionsPanel, Panel):
@ -898,17 +921,9 @@ class VIEW3D_PT_vr_actions_actions(VRActionsPanel, Panel):
col.prop(ami, "name", text="Action")
col.prop(ami, "type", text="Type")
col.prop(ami, "user_path0", text="User Path 0")
col.prop(ami, "component_path0", text="Component Path 0")
col.prop(ami, "user_path1", text="User Path 1")
col.prop(ami, "component_path1", text="Component Path 1")
if ami.type == 'BUTTON' or ami.type == 'AXIS':
col.prop(ami, "threshold", text="Threshold")
if ami.type == 'BUTTON':
col.prop(ami, "axis0_flag", text="Axis Flag")
else: # ami.type == 'AXIS'
col.prop(ami, "axis0_flag", text="Axis 0 Flag")
col.prop(ami, "axis1_flag", text="Axis 1 Flag")
col.prop(ami, "op", text="Operator")
col.prop(ami, "op_flag", text="Operator Flag")
col.prop(ami, "bimanual", text="Bimanual")
@ -917,8 +932,6 @@ class VIEW3D_PT_vr_actions_actions(VRActionsPanel, Panel):
elif ami.type == 'POSE':
col.prop(ami, "pose_is_controller_grip", text="Use for Controller Grips")
col.prop(ami, "pose_is_controller_aim", text="Use for Controller Aims")
col.prop(ami, "pose_location", text="Location Offset")
col.prop(ami, "pose_rotation", text="Rotation Offset")
class VIEW3D_PT_vr_actions_haptics(VRActionsPanel, Panel):
@ -952,6 +965,58 @@ class VIEW3D_PT_vr_actions_haptics(VRActionsPanel, Panel):
col.prop(ami, "haptic_flag", text="Haptic Flag")
class VIEW3D_PT_vr_actions_bindings(VRActionsPanel, Panel):
bl_label = "Bindings"
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.use_property_split = True
layout.use_property_decorate = False # No animation.
am = vr_actionmap_selected_get(ac)
if am:
ami = vr_actionmap_item_selected_get(am)
if ami:
col = vr_indented_layout(layout, 2)
row = col.row()
row.template_list("VIEW3D_UL_vr_actionbindings", "", ami, "bindings",
ami, "selected_binding", rows=3)
col = row.column(align=True)
col.operator("view3d.vr_actionbinding_add", icon='ADD', text="")
col.operator("view3d.vr_actionbinding_remove", icon='REMOVE', text="")
col.menu("VIEW3D_MT_vr_actionbinding_menu", icon='DOWNARROW_HLT', text="")
amb = vr_actionmap_binding_selected_get(ami)
if amb:
row = layout.row()
col = row.column(align=True)
col.prop(amb, "name", text="Binding")
col.prop(amb, "profile", text="Profile")
col.prop(amb, "component_path0", text="Component Path 0")
col.prop(amb, "component_path1", text="Component Path 1")
if ami.type == 'BUTTON' or ami.type == 'AXIS':
col.prop(amb, "threshold", text="Threshold")
if ami.type == 'BUTTON':
col.prop(amb, "axis0_flag", text="Axis Flag")
else: # ami.type == 'AXIS'
col.prop(amb, "axis0_flag", text="Axis 0 Flag")
col.prop(amb, "axis1_flag", text="Axis 1 Flag")
elif ami.type == 'POSE':
col.prop(amb, "pose_location", text="Location Offset")
col.prop(amb, "pose_rotation", text="Rotation Offset")
class VIEW3D_OT_vr_actionmap_add(Operator):
bl_idname = "view3d.vr_actionmap_add"
bl_label = "Add VR Action Map"
@ -1233,6 +1298,122 @@ class VIEW3D_OT_vr_actions_clear(Operator):
return {'FINISHED'}
class VIEW3D_OT_vr_actionbinding_add(Operator):
bl_idname = "view3d.vr_actionbinding_add"
bl_label = "Add VR Action Binding"
bl_description = "Add a new VR action binding to the action"
bl_options = {'UNDO', 'REGISTER'}
def execute(self, context):
ac = vr_actionconfig_active_get(context)
if not ac:
return {'CANCELLED'}
am = vr_actionmap_selected_get(ac)
if not am:
return {'CANCELLED'}
ami = vr_actionmap_item_selected_get(am)
if not ami:
return {'CANCELLED'}
amb = ami.bindings.new("binding", False)
if not amb:
return {'CANCELLED'}
# Select newly created binding.
ami.selected_binding = len(ami.bindings) - 1
return {'FINISHED'}
class VIEW3D_OT_vr_actionbinding_remove(Operator):
bl_idname = "view3d.vr_actionbinding_remove"
bl_label = "Remove VR Action Binding"
bl_description = "Delete the selected VR action binding from the action"
bl_options = {'UNDO', 'REGISTER'}
def execute(self, context):
ac = vr_actionconfig_active_get(context)
if not ac:
return {'CANCELLED'}
am = vr_actionmap_selected_get(ac)
if not am:
return {'CANCELLED'}
ami = vr_actionmap_item_selected_get(am)
if not ami:
return {'CANCELLED'}
amb = vr_actionmap_binding_selected_get(ami)
if not amb:
return {'CANCELLED'}
ami.bindings.remove(amb)
return {'FINISHED'}
class VIEW3D_OT_vr_actionbinding_copy(Operator):
bl_idname = "view3d.vr_actionbinding_copy"
bl_label = "Copy VR Action Binding"
bl_description = "Copy selected VR action binding"
bl_options = {'UNDO', 'REGISTER'}
def execute(self, context):
ac = vr_actionconfig_active_get(context)
if not ac:
return {'CANCELLED'}
am = vr_actionmap_selected_get(ac)
if not am:
return {'CANCELLED'}
ami = vr_actionmap_item_selected_get(am)
if not ami:
return {'CANCELLED'}
amb = vr_actionmap_binding_selected_get(ami)
if not amb:
return {'CANCELLED'}
# Copy binding.
amb_new = ami.bindings.new_from_binding(amb)
if not amb_new:
return {'CANCELLED'}
# Select newly created binding.
ami.selected_binding = len(ami.bindings) - 1
return {'FINISHED'}
class VIEW3D_OT_vr_actionbindings_clear(Operator):
bl_idname = "view3d.vr_actionbindings_clear"
bl_label = "Clear VR Action Bindings"
bl_description = "Delete all VR action bindings from the action"
bl_options = {'UNDO', 'REGISTER'}
def execute(self, context):
ac = vr_actionconfig_active_get(context)
if not ac:
return {'CANCELLED'}
am = vr_actionmap_selected_get(ac)
if not am:
return {'CANCELLED'}
ami = vr_actionmap_item_selected_get(am)
if not ami:
return {'CANCELLED'}
while ami.bindings:
ami.bindings.remove(ami.bindings[0])
return {'FINISHED'}
### Motion capture.
def vr_headset_object_update(self, context):
session_settings = context.window_manager.xr_session_settings