diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-03 14:41:09 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-03 14:41:16 +0300 |
commit | 0a2a8d702ad28016eb73819dfd2be1b26f1cf05b (patch) | |
tree | 44a5e069376dc5d371e5d49f90d1e8c9d7c70fd2 | |
parent | 3b51d9065c8aced32b3d506b55422d471bd4f7ff (diff) |
Fix: Curves sculpt mode keymaps missing in preferences
These changes make the curves sculpt mode keymap consistent
with other modes. They now show up in the keymap, for potential
editing of tool shortcuts, etc. I don't fully understand this system,
but at least these changes should make it consistent.
Differential Revision: https://developer.blender.org/D15112
-rw-r--r-- | release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap_utils.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py index a648375557a..7172d7809f2 100644 --- a/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py +++ b/release/scripts/modules/bl_keymap_utils/keymap_hierarchy.py @@ -88,6 +88,10 @@ _km_hierarchy = [ _km_expand_from_toolsystem('VIEW_3D', 'SCULPT'), ]), + ('Sculpt Curves', 'EMPTY', 'WINDOW', [ + _km_expand_from_toolsystem('VIEW_3D', 'CURVES_SCULPT'), + ]), + ('Particle', 'EMPTY', 'WINDOW', [ _km_expand_from_toolsystem('VIEW_3D', 'PARTICLE'), ]), diff --git a/source/blender/windowmanager/intern/wm_keymap_utils.c b/source/blender/windowmanager/intern/wm_keymap_utils.c index 5a35570296a..531da3cf2e8 100644 --- a/source/blender/windowmanager/intern/wm_keymap_utils.c +++ b/source/blender/windowmanager/intern/wm_keymap_utils.c @@ -270,6 +270,9 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) break; } } + else if (STRPREFIX(opname, "CURVES_SCULPT_OT")) { + km = WM_keymap_find_all(wm, "Sculpt Curves", 0, 0); + } else if (STRPREFIX(opname, "MBALL_OT")) { km = WM_keymap_find_all(wm, "Metaball", 0, 0); |