Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-09-21 10:55:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-21 11:14:11 +0300
commitc9d9bfa84ad5cb985e3feccffa702b2f3cc2adf8 (patch)
tree9cefe8d45141127b71d11812e4023ae185f06271 /source/blender/windowmanager/gizmo
parent52bfa750e74952ddd4e8223d92d21140831902a7 (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 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index 213a3c2e342..22bdf65a169 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -265,6 +265,8 @@ void WM_gizmogroup_ensure_init(const bContext *C, wmGizmoGroup *gzgroup)
{
/* prepare for first draw */
if (UNLIKELY((gzgroup->init_flag & WM_GIZMOGROUP_INIT_SETUP) == 0)) {
+
+ gzgroup->use_fallback_keymap = true;
gzgroup->type->setup(C, gzgroup);
/* Not ideal, initialize keymap here, needed for RNA runtime generated gizmos. */