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:
authorJoshua Leung <aligorith@gmail.com>2016-05-08 17:44:21 +0300
committerJoshua Leung <aligorith@gmail.com>2016-05-08 17:44:21 +0300
commitc4a5c26a59b368640b530ba30019ee1724f81150 (patch)
tree868b834214fd9dda463d28184e16e59c07e87182 /source/blender/editors/gpencil/gpencil_ops.c
parent491ad6664ee20efdaf9843d3275b38bdc60f5ba5 (diff)
Fix: Lasso select for Grease Pencil doesn't work in the Nodes Editor
In the nodes editor, Ctrl-LMB-drag is taken by "Cut", and it seems impossible for any other keymap to override that. Instead, the default lasso select hotkey there is Ctrl-Alt-LMB-drag instead. To get Grease Pencil lasso select (in GP Editmode) to work in the Nodes Editor too, this commit adds the Ctrl-Alt-LMB-drag binding here too. However, to make things easier, this extra binding will be part of the Grease Pencil keymap everywhere. There doesn't seem to be any conflicts with having this in place - until we find them, this should be ok to have.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_ops.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 9f5633ae668..d3520ef3e32 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -160,6 +160,15 @@ static void ed_keymap_gpencil_editing(wmKeyConfig *keyconf)
kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "deselect", true);
+ /* In the Node Editor, lasso select needs ALT modifier too (as somehow CTRL+LMB drag gets taken for "cut" quite early)
+ * There probably isn't too much harm adding this for other editors too as part of standard GP editing keymap. This hotkey
+ * combo doesn't seem to see much use under standard scenarios?
+ */
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "deselect", false);
+ kmi = WM_keymap_add_item(keymap, "GPENCIL_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL | KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "deselect", true);
+
/* normal select */
WM_keymap_add_item(keymap, "GPENCIL_OT_select", SELECTMOUSE, KM_PRESS, 0, 0);