Fix T96885: drag fallback on tweak is using active tool instead

Ensure the fallback transforms on drag when used as a fallback.
This commit is contained in:
Campbell Barton 2022-04-05 12:29:31 +10:00
parent f2b9bbd194
commit 0f530b0b03

View File

@ -470,6 +470,13 @@ def _template_items_tool_select(params, operator, cursor_operator, fallback):
{"properties": [("deselect_all", True)]}),
(operator, {"type": 'LEFTMOUSE', "value": 'CLICK' if fallback else 'PRESS', "shift": True},
{"properties": [("toggle", True)]}),
# Fallback key-map must transform as the primary tool is expected
# to be accessed via gizmos in this case. See: T96885.
*(() if not fallback else (
("transform.translate", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
{"properties": [("release_confirm", True)]}),
))
]
else:
# Experimental support for LMB interaction for the tweak tool.