diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-21 10:55:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-21 11:14:11 +0300 |
commit | c9d9bfa84ad5cb985e3feccffa702b2f3cc2adf8 (patch) | |
tree | 9cefe8d45141127b71d11812e4023ae185f06271 /release/scripts/modules | |
parent | 52bfa750e74952ddd4e8223d92d21140831902a7 (diff) |
Keymap: preference for fallback-tool with RMB select
Expose a key-map preference "Fallback Tool (RMB)",
disabled by default.
The right mouse button uses the fallback tool
(currently visible selection tool in the toolbar),
instead of always tweaking.
When any selection tool is active, right mouse always tweaks.
To enable fallback selection on RMB, set the "Right Mouse Select Action"
to "Selection Tool".
Internal changes:
- Add fall-back key-maps, separate key-maps needed for when the tool is
run as a fall-back. This is needed so RMB-select can support fall-back
tools, so left-mouse can be used when it's the active tool and RMB
can be used as a fall-back action when another tool is active.
- Add options field to tools so tools without gizmos can enable the
full-back tool keymap.
- Support multiple key-maps for keymap handlers.
- Fall-back keymaps now co-exist with the tool-keymaps.
So both keymaps may be active at once - using different mouse buttons.
When gizmos are in use, a highlighted gizmo prioritizes the
tool-keymap over the fall-back keymap.
Resolves T83690.
Reviewed By: JulienKaspar
Ref D12493
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy/utils/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index afa04a18ef6..3f0248970c6 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -858,6 +858,7 @@ def register_tool(tool_cls, *, after=None, separator=False, group=False): "description": getattr(tool_cls, "bl_description", tool_cls.__doc__), "icon": getattr(tool_cls, "bl_icon", None), "cursor": getattr(tool_cls, "bl_cursor", None), + "options": getattr(tool_cls, "bl_options", None), "widget": getattr(tool_cls, "bl_widget", None), "widget_properties": getattr(tool_cls, "bl_widget_properties", None), "keymap": getattr(tool_cls, "bl_keymap", None), |