diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 05:48:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 05:48:33 +0300 |
commit | ce066f9da7ef7efb8a0ec12b2dfd2b1852b57281 (patch) | |
tree | 1829e13f722dfde5186d0eade7095fa9c52de22f /source/blender | |
parent | 48ad55a03d658e73ae90166e752f5cf81292c8c1 (diff) |
Fix assigning keys to paint operators
Comparing context mode with object flag (decade old bug from 2.5x).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap_utils.c b/source/blender/windowmanager/intern/wm_keymap_utils.c index 35bd3a78142..6d311f148b9 100644 --- a/source/blender/windowmanager/intern/wm_keymap_utils.c +++ b/source/blender/windowmanager/intern/wm_keymap_utils.c @@ -252,10 +252,10 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) } else if (STRPREFIX(opname, "SCULPT_OT")) { switch (CTX_data_mode_enum(C)) { - case OB_MODE_SCULPT: + case CTX_MODE_SCULPT: km = WM_keymap_find_all(C, "Sculpt", 0, 0); break; - case OB_MODE_EDIT: + case CTX_MODE_EDIT_MESH: km = WM_keymap_find_all(C, "UV Sculpt", 0, 0); break; default: @@ -286,13 +286,13 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) else if (STRPREFIX(opname, "PAINT_OT")) { /* check for relevant mode */ switch (CTX_data_mode_enum(C)) { - case OB_MODE_WEIGHT_PAINT: + case CTX_MODE_PAINT_WEIGHT: km = WM_keymap_find_all(C, "Weight Paint", 0, 0); break; - case OB_MODE_VERTEX_PAINT: + case CTX_MODE_PAINT_VERTEX: km = WM_keymap_find_all(C, "Vertex Paint", 0, 0); break; - case OB_MODE_TEXTURE_PAINT: + case CTX_MODE_PAINT_TEXTURE: km = WM_keymap_find_all(C, "Image Paint", 0, 0); break; default: |