Industry Compat keymap: Fix gizmos overriding view manipulation

Previously, if the cursor was over a gizmo, you could not manipulate the view using Alt-key view manipulation

This addresses T60984 for this keymap
This commit is contained in:
William Reynish 2019-05-12 22:50:44 +02:00
parent e2b60f858e
commit 6d89693222
1 changed files with 29 additions and 1 deletions

View File

@ -92,7 +92,7 @@ def _template_items_object_subdivision_set():
def _template_items_gizmo_tweak_value():
return [
("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS', "any": True}, None),
("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS', "any": False}, None),
]
@ -3530,6 +3530,30 @@ def km_transform_modal_map(_params):
return keymap
# ------------------------------------------------------------------------------
# Gizmo System Keymaps
def km_gizmos(_params):
items = []
keymap = (
"Gizmos",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
)
return keymap
def km_transform_gizmo(_params):
keymap = (
"Transform Gizmo",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": _template_items_gizmo_tweak_value()},
)
return keymap
# ------------------------------------------------------------------------------
# Tool System Keymaps
@ -3717,6 +3741,10 @@ def generate_keymaps(params=None):
km_eyedropper_colorramp_pointsampling_map(params),
km_transform_modal_map(params),
# Gizmos.
km_gizmos(params),
km_transform_gizmo(params),
# Tool System.
km_3d_view_tool_move(params),
km_3d_view_tool_rotate(params),