[Bf-blender-cvs] [c4a5c26] master: Fix: Lasso select for Grease Pencil doesn't work in the Nodes Editor

Joshua Leung noreply at git.blender.org
Sun May 8 16:53:32 CEST 2016


Commit: c4a5c26a59b368640b530ba30019ee1724f81150
Author: Joshua Leung
Date:   Mon May 9 02:44:21 2016 +1200
Branches: master
https://developer.blender.org/rBc4a5c26a59b368640b530ba30019ee1724f81150

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.

===================================================================

M	source/blender/editors/gpencil/gpencil_ops.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 9f5633a..d3520ef 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);




More information about the Bf-blender-cvs mailing list