[Bf-extensions-cvs] [1bbddad8] xr-controller-support: VR: Add reset navigation, toggle matview defaults

Peter Kim noreply at git.blender.org
Tue Aug 31 11:22:43 CEST 2021


Commit: 1bbddad89934a1e18e8d22da75a78838af9e16b3
Author: Peter Kim
Date:   Tue Aug 31 18:00:22 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rBA1bbddad89934a1e18e8d22da75a78838af9e16b3

VR: Add reset navigation, toggle matview 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 9d72018f..33d2ac7c 100644
--- a/viewport_vr_preview/configs/default.py
+++ b/viewport_vr_preview/configs/default.py
@@ -1,4 +1,4 @@
-actionconfig_version = (3, 0, 17)
+actionconfig_version = (3, 0, 18)
 actionconfig_data = \
 [("blender_default",
   {"items":
@@ -64,16 +64,6 @@ actionconfig_data = \
        ],
       },
      ),
-    ("fly", {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '/user/hand/right', "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, None,
-     {"bindings":
-      [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '/input/thumbstick/click', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ],
-      },
-     ),
     ("fly_forward",
      {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '', "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'},
      {"op_properties":
@@ -222,6 +212,42 @@ actionconfig_data = \
        ],
       },
      ),
+    ("nav_reset",
+     {"type": 'FLOAT', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_navigation_reset', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'},
+     {"op_properties":
+      [("location", False),
+       ("rotation", False),
+       ("scale", True),
+       ],
+      },     
+     {"bindings":
+      [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ],
+      },
+     ),
+    ("toggle_matview",
+     {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '', "op": 'view3d.toggle_shading', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'},
+     {"op_properties":
+      [("type", 'MATERIAL'),
+       ],
+      },     
+     {"bindings":
+      [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/thumbstick/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
+       ],
+      },
+     ),
     ("raycast_select", {"type": 'FLOAT', "user_path0": '/user/hand/right', "user_path1": '', "op": 'wm.xr_select_raycast', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, None,
      {"bindings":
       [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/trigger/value', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
@@ -251,11 +277,9 @@ actionconfig_data = \
     ("undo", {"type": 'FLOAT', "user_path0": '/user/hand/left', "user_path1": '', "op": 'ed.undo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
      {"bindings":
       [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/y/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("wmr", {"profile": '/interaction_profiles/microsoft/motion_controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ],
       },
@@ -263,11 +287,9 @@ actionconfig_data = \
     ("redo", {"type": 'FLOAT', "user_path0": '/user/hand/right', "user_path1": '', "op": 'ed.redo', "op_mode": 'PRESS', "bimanual": 'False', "haptic_name": 'haptic', "haptic_match_user_paths": 'True', "haptic_duration": '0.30000001192092896', "haptic_frequency": '3000.0', "haptic_amplitude": '0.5', "haptic_mode": 'PRESS'}, None,
      {"bindings":
       [("cosmos", {"profile": '/interaction_profiles/htc/vive_cosmos_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("huawei", {"profile": '/interaction_profiles/huawei/controller', "component_path0": '/input/trackpad/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("index", {"profile": '/interaction_profiles/valve/index_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("oculus", {"profile": '/interaction_profiles/oculus/touch_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
        ("reverb_g2", {"profile": '/interaction_profiles/hp/mixed_reality_controller', "component_path0": '/input/b/click', "component_path1": '', "threshold": '0.30000001192092896', "axis_region": 'ANY'}),
-       ("vive", {"profile": '/interaction_profiles/htc/vive_controller', "component_path0": '/input/trackpad

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list