diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 11:02:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 11:11:50 +0300 |
commit | e8dd96516c60c4c43c8eb217f2c2cc61761cd0a0 (patch) | |
tree | caca01d39d7072747bc2f6a3ea1046ef15715ee6 /source/blender/windowmanager/intern/wm_keymap.c | |
parent | 03b2fc1a615b442902a6565b27b73d1c5bf4ecbe (diff) |
Keymap: disallow modal key-maps in add-ons keyconfig
Disable functionality reported in T60766 & only partially worked.
This could be used if the key-map was added after Blender started
as a way to customize modal key-maps, however it didn't work with
the add-on enabled on startup.
Add-on key-maps are intended to extend existing key-maps
so they can call the add-on, not as a way to change modal key-maps
for Blender's built-in functionality.
Disable this since it's not needed as add-ons
can't yet define modal key-maps.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index c1a4595ec6b..ab4888d4d31 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -1900,6 +1900,8 @@ void WM_keyconfig_update(wmWindowManager *wm) addonmap = WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid); usermap = WM_keymap_list_find(&U.user_keymaps, km->idname, km->spaceid, km->regionid); + /* For now only the default map defines modal key-maps, + * if we support modal keymaps for 'addonmap', these will need to be enabled too. */ wm_user_modal_keymap_set_items(wm, defaultmap); /* add */ |