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
Notes: blender-bot 2023-02-14 05:16:25 +01:00
Referenced by issue #98615, Regression: Tweak mode broken
Referenced by issue #96885, Regression: Drag Fallback on Tweak is using Move instead
1 changed files with 7 additions and 0 deletions

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.