Fix T48395: Grease Pencil, pressing Ekey to sculpt don't work for left click configurations

When using Left Click select, it wasn't possible to sculpt using E+LMB.

I've changed the order of things in the keymap so that the select operator won't
end up catching and blocking all these events.
This commit is contained in:
Joshua Leung 2016-05-18 17:23:16 +12:00
parent 1139e51be6
commit e3218ded41
Notes: blender-bot 2023-02-14 07:54:54 +01:00
Referenced by issue #48395, Grease Pencil, pressing Ekey to sculpt don't work for left click configurations
1 changed files with 30 additions and 30 deletions

View File

@ -140,6 +140,36 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path_primary", "user_preferences.edit.grease_pencil_eraser_radius");
/* Sculpting ------------------------------------- */
/* Brush-Based Editing:
* EKEY + LMB = Single stroke, draw immediately
* + Other Modifiers (Ctrl/Shift) = Invert, Smooth, etc.
*
* For the modal version, use D+E -> Sculpt
*/
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, 0, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, KM_CTRL, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
/*RNA_boolean_set(kmi->ptr, "use_invert", true);*/
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, KM_SHIFT, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
/*RNA_boolean_set(kmi->ptr, "use_smooth", true);*/
/* Shift-FKEY = Sculpt Strength */
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.strength");
/* Ctrl-FKEY = Sculpt Brush Size */
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.size");
/* Selection ------------------------------------- */
/* select all */
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_all", AKEY, KM_PRESS, 0, 0);
@ -238,36 +268,6 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "GPENCIL_OT_move_to_layer", MKEY, KM_PRESS, 0, 0);
/* Brush-Based Editing:
* EKEY + LMB = Single stroke, draw immediately
* + Other Modifiers (Ctrl/Shift) = Invert, Smooth, etc.
*
* For the modal version, use D+E -> Sculpt
*/
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, 0, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, KM_CTRL, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
/*RNA_boolean_set(kmi->ptr, "use_invert", true);*/
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_brush_paint", LEFTMOUSE, KM_PRESS, KM_SHIFT, EKEY);
RNA_boolean_set(kmi->ptr, "wait_for_input", false);
/*RNA_boolean_set(kmi->ptr, "use_smooth", true);*/
/* Shift-FKEY = Sculpt Strength */
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0);
RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.strength");
/* Ctrl-FKEY = Sculpt Brush Size */
kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, KM_PRESS, KM_CTRL, 0);
RNA_string_set(kmi->ptr, "data_path_primary", "tool_settings.gpencil_sculpt.brush.size");
/* Transform Tools */
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0);