Fix industry compat keymap transform gizmo plane constraint
authorCampbell Barton <ideasman42@gmail.com>
Thu, 30 May 2019 05:33:37 +0000 (15:33 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 30 May 2019 05:33:37 +0000 (15:33 +1000)
Modifier keys were disabled, removing support for shift-clicking
on the transform gizmo to constrain to the plane.

The gizmo keymap matches the default, no need to re-define it.

release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py

index 64f61477f7c3c13156ec288796e4f99f0a453024..adcaf2c0310cadc9d27dd1751e77e867ef8378aa 100644 (file)
@@ -90,12 +90,6 @@ def _template_items_object_subdivision_set():
     ]
 
 
-def _template_items_gizmo_tweak_value():
-    return [
-        ("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS', "any": False}, None),
-    ]
-
-
 def _template_items_animation():
     return [
         ("screen.frame_offset", {"type": 'LEFT_ARROW', "value": 'PRESS'},
@@ -3515,53 +3509,6 @@ def km_transform_modal_map(_params):
     return keymap
 
 
-# ------------------------------------------------------------------------------
-# Gizmo System Keymaps
-
-# Fallback for gizmos that don't have custom a custom key-map.
-def km_generic_gizmo(_params):
-    keymap = (
-        "Generic Gizmo",
-        {"space_type": 'EMPTY', "region_type": 'WINDOW'},
-        {"items": _template_items_gizmo_tweak_value()},
-    )
-
-    return keymap
-
-
-def km_generic_gizmo_select(_params):
-    keymap = (
-        "Generic Gizmo Select",
-        {"space_type": 'EMPTY', "region_type": 'WINDOW'},
-        # TODO, currently in C code.
-        {"items": _template_items_gizmo_tweak_value()},
-    )
-
-    return keymap
-
-
-def km_generic_gizmo_tweak_modal_map(_params):
-    keymap = (
-        "Generic Gizmo Tweak Modal Map",
-        {"space_type": 'EMPTY', "region_type": 'WINDOW', "modal": True},
-        {"items": [
-            ("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
-            ("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None),
-            ("CONFIRM", {"type": 'RET', "value": 'PRESS', "any": True}, None),
-            ("CONFIRM", {"type": 'NUMPAD_ENTER', "value": 'PRESS', "any": True}, None),
-            ("PRECISION_ON", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "any": True}, None),
-            ("PRECISION_OFF", {"type": 'RIGHT_SHIFT', "value": 'RELEASE', "any": True}, None),
-            ("PRECISION_ON", {"type": 'LEFT_SHIFT', "value": 'PRESS', "any": True}, None),
-            ("PRECISION_OFF", {"type": 'LEFT_SHIFT', "value": 'RELEASE', "any": True}, None),
-            ("SNAP_ON", {"type": 'RIGHT_CTRL', "value": 'PRESS', "any": True}, None),
-            ("SNAP_OFF", {"type": 'RIGHT_CTRL', "value": 'RELEASE', "any": True}, None),
-            ("SNAP_ON", {"type": 'LEFT_CTRL', "value": 'PRESS', "any": True}, None),
-            ("SNAP_OFF", {"type": 'LEFT_CTRL', "value": 'RELEASE', "any": True}, None),
-        ]},
-    )
-    return keymap
-
-
 # ------------------------------------------------------------------------------
 # Tool System Keymaps
 
@@ -3772,11 +3719,6 @@ def generate_keymaps(params=None):
         km_eyedropper_colorramp_pointsampling_map(params),
         km_transform_modal_map(params),
 
-        # Gizmos.
-        km_generic_gizmo(params),
-        km_generic_gizmo_select(params),
-        km_generic_gizmo_tweak_modal_map(params),
-
         # Tool System.
         km_3d_view_tool_transform(params),
         km_3d_view_tool_move(params),