[Bf-extensions-cvs] [9c20bc08] xr-controller-support: VR: Rename some actions for better clarity

Peter Kim noreply at git.blender.org
Sat Jun 26 12:34:03 CEST 2021


Commit: 9c20bc08b34995e74ede358c403ec5ac6ed8b409
Author: Peter Kim
Date:   Sat Jun 26 19:29:43 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBA9c20bc08b34995e74ede358c403ec5ac6ed8b409

VR: Rename some actions for better clarity

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

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 18f117b7..68789895 100644
--- a/viewport_vr_preview/configs/default.py
+++ b/viewport_vr_preview/configs/default.py
@@ -12,7 +12,7 @@ actionconfig_data = \
        ],
       },
      ),
-    ("grab",
+    ("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'},
      {"op_properties":
       [("lock_rotation", True),
@@ -84,8 +84,8 @@ actionconfig_data = \
        ],
       },
      ),
-    ("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),
+    ("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'}, 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'}, 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),
@@ -104,7 +104,7 @@ actionconfig_data = \
        ],
       },
      ),
-    ("grab",
+    ("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'},
      {"op_properties":
       [("lock_rotation", True),
@@ -171,13 +171,13 @@ actionconfig_data = \
      {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/thumbstick/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
      {"op_properties":
       [("mode", 'TURNRIGHT'),
-       ("speed_min", 0.014),
-       ("speed_max", 0.042),
+       ("speed_min", 0.01),
+       ("speed_max", 0.03),
        ],
       },
      ),
-    ("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
-    ("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
+    ("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'}, None),
+    ("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
     ("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
     ("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
     ("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
@@ -196,7 +196,7 @@ actionconfig_data = \
        ],
       },
      ),
-    ("grab",
+    ("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'},
      {"op_properties":
       [("lock_rotation", True),
@@ -227,7 +227,7 @@ actionconfig_data = \
     ("fly_right",
      {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/x', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'POSITIVE', "op": 'wm.xr_navigation_fly', "op_flag": 'MODAL', "bimanual": 'False'},
      {"op_properties":
-      [("mode", 'TURNRIGHT'),
+      [("mode", 'RIGHT'),
        ],
       },
      ),
@@ -267,8 +267,8 @@ actionconfig_data = \
        ],
       },
      ),
-    ("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
-    ("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
+    ("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'}, None),
+    ("grab", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/menu/click', "user_path1": '/user/hand/right', "component_path1": '/input/menu/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
     ("undo", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.undo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
     ("redo", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trackpad/click', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'ed.redo', "op_flag": 'PRESS', "bimanual": 'False'}, None),
     ("haptic", {"type": 'HAPTIC', "user_path0": '/user/hand/left', "component_path0": '/output/haptic', "user_path1": '/user/hand/right', "component_path1": '/output/haptic', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5'}, None),
@@ -287,7 +287,7 @@ actionconfig_data = \
        ],
       },
      ),
-    ("grab",
+    ("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'},
      {"op_properties":
       [("lock_rotation", True),
@@ -359,8 +359,8 @@ actionconfig_data = \
        ],
       },
      ),
-    ("select", {"type": 'BUTTON', "user_path0": '/user/hand/right', "component_path0": '/input/trigger/value', "user_path1": '', "component_path1": '', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_select_raycast', "op_flag": 'MODAL', "bimanual": 'False'}, None),
-    ("transform", {"type": 'BUTTON', "user_path0": '/user/hand/left', "component_path0": '/input/a/click', "user_path1": '/user/hand/right', "component_path1": '/input/a/click', "threshold": '0.30000001192092896', "axis_flag": 'ANY', "op": 'wm.xr_transform_grab', "op_flag": 'MODAL', "bimanual": 'True'}, None),
+    ("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": 'MOD

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list