diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-13 06:04:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-13 06:04:00 +0300 |
commit | b323167600062feccd55d08ac383b69f6f9a4980 (patch) | |
tree | 3c931cd7932c005a3061496953f8775161e04528 /release | |
parent | ed4f204d86425098824cdf27b38f307ab04a86c0 (diff) |
GP: box/lasso support for select-operations
This adds support for more adbvanced select operations
matching 3D view select operators.
Also de-duplicate box/lasso select code.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index b4d0779e676..4ebf98ad5cb 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -2727,18 +2727,18 @@ def _grease_pencil_selection(params): ("gpencil.select_box", {"type": 'B', "value": 'PRESS'}, None), # Lasso select ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True}, - {"properties": [("deselect", False)]}), + {"properties": [("mode", 'ADD')]}), ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "shift": True, "ctrl": True}, - {"properties": [("deselect", True)]}), + {"properties": [("mode", 'SUB')]}), # 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? ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True, "alt": True}, - {"properties": [("deselect", False)]}), + {"properties": [("mode", 'ADD')]}), ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "shift": True, "ctrl": True, "alt": True}, - {"properties": [("deselect", True)]}), + {"properties": [("mode", 'SUB')]}), ("gpencil.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, {"properties": [("extend", True), ("toggle", True)]}), # Whole stroke select @@ -2918,8 +2918,7 @@ def km_grease_pencil_stroke_paint_draw_brush(_params): # Box select ("gpencil.select_box", {"type": 'B', "value": 'PRESS'}, None), # Lasso select - ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True, "alt": True}, - {"properties": [("deselect", False)]}), + ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True, "alt": True}, None), ]) return keymap @@ -2942,8 +2941,7 @@ def km_grease_pencil_stroke_paint_erase(_params): # Box select (used by eraser) ("gpencil.select_box", {"type": 'B', "value": 'PRESS'}, None), # Lasso select - ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True, "alt": True}, - {"properties": [("deselect", False)]}), + ("gpencil.select_lasso", {"type": 'EVT_TWEAK_A', "value": 'ANY', "ctrl": True, "alt": True}, None), ]) return keymap |