[Bf-extensions-cvs] [a7085241] xr-controller-support: VR: Add haptic feedback settings

Peter Kim noreply at git.blender.org
Fri Jul 2 11:18:33 CEST 2021


Commit: a7085241a1686b89726830a56c34425fd8861971
Author: Peter Kim
Date:   Fri Jul 2 18:15:14 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBAa7085241a1686b89726830a56c34425fd8861971

VR: Add haptic feedback settings

Also, improve usability of "Action Maps" panel via sub panels.

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

M	viewport_vr_preview/__init__.py
M	viewport_vr_preview/configs/default.py
M	viewport_vr_preview/defaults.py
M	viewport_vr_preview/io.py
M	viewport_vr_preview/main.py

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

diff --git a/viewport_vr_preview/__init__.py b/viewport_vr_preview/__init__.py
index b71885f5..534aeb13 100644
--- a/viewport_vr_preview/__init__.py
+++ b/viewport_vr_preview/__init__.py
@@ -48,7 +48,9 @@ classes = (
     main.VIEW3D_PT_vr_session,
     main.VIEW3D_PT_vr_session_view,
     main.VIEW3D_PT_vr_landmarks,
-    main.VIEW3D_PT_vr_actions,
+    main.VIEW3D_PT_vr_actions_actionmaps,
+    main.VIEW3D_PT_vr_actions_actions,
+    main.VIEW3D_PT_vr_actions_haptics,
     main.VIEW3D_PT_vr_motion_capture,
     main.VIEW3D_PT_vr_viewport_feedback,
 
diff --git a/viewport_vr_preview/configs/default.py b/viewport_vr_preview/configs/default.py
index 68789895..2e9aa02c 100644
--- a/viewport_vr_preview/configs/default.py
+++ b/viewport_vr_preview/configs/default.py
@@ -1,11 +1,11 @@
-actionconfig_version = (3, 0, 4)
+actionconfig_version = (3, 0, 5)
 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": '', "component_path1": '', "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', "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)),
@@ -13,43 +13,47 @@ actionconfig_data = \
       },
      ),
     ("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'},
+     {"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'}, 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', "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'},
+     {"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", 'FORWARD'),
+      [("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'},
+     {"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", 'BACK'),
+      [("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'},
+     {"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", 'LEFT'),
+      [("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'},
+     {"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", 'RIGHT'),
+      [("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'},
+     {"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),
@@ -58,7 +62,7 @@ actionconfig_data = \
       },
      ),
     ("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'},
+     {"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),
@@ -67,7 +71,7 @@ actionconfig_data = \
       },
      ),
     ("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'},
+     {"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),
@@ -76,7 +80,7 @@ actionconfig_data = \
       },
      ),
     ("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": 'M

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list