[Bf-extensions-cvs] [2c6f9cb7] xr-controller-support: VR: Add fly navigation, gamepad profile defaults

Peter Kim noreply at git.blender.org
Wed Jun 23 13:36:04 CEST 2021


Commit: 2c6f9cb76954820537c5732d44d4e5607ccea6c1
Author: Peter Kim
Date:   Wed Jun 23 20:32:42 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBA2c6f9cb76954820537c5732d44d4e5607ccea6c1

VR: Add fly navigation, gamepad profile defaults

===================================================================

M	viewport_vr_preview/configs/default.py
M	viewport_vr_preview/defaults.py

===================================================================

diff --git a/viewport_vr_preview/configs/default.py b/viewport_vr_preview/configs/default.py
index ac4a9e61..18f117b7 100644
--- a/viewport_vr_preview/configs/default.py
+++ b/viewport_vr_preview/configs/default.py
@@ -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', "thres

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list