diff options
-rw-r--r-- | release/scripts/presets/keyconfig/keymap_data/blender_default.py | 59 |
1 files changed, 27 insertions, 32 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index f7cd09225b5..e8f21fb8b04 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1513,39 +1513,34 @@ def km_node_editor(params): {"items": items}, ) + def node_select_ops(select_mouse): + return [ + ("node.select", {"type": select_mouse, "value": 'PRESS'}, + {"properties": [("extend", False)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True}, + {"properties": [("extend", False)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "alt": True}, + {"properties": [("extend", False)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "ctrl": True, "alt": True}, + {"properties": [("extend", False)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True}, + {"properties": [("extend", True)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, + {"properties": [("extend", True)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "alt": True}, + {"properties": [("extend", True)]}), + ("node.select", {"type": select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, + {"properties": [("extend", True)]}), + ] + + # Allow node selection with both for RMB select + if params.select_mouse == 'RIGHTMOUSE': + items.extend(node_select_ops('LEFTMOUSE')) + items.extend(node_select_ops('RIGHTMOUSE')) + else: + items.extend(node_select_ops('LEFTMOUSE')) + items.extend([ - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS'}, - {"properties": [("extend", False)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS'}, - {"properties": [("extend", False)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "alt": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True, "alt": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": True}, - {"properties": [("extend", False)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, - {"properties": [("extend", True)]}), - ("node.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, - {"properties": [("extend", True)]}), ("node.select_box", {"type": params.select_tweak, "value": 'ANY'}, {"properties": [("tweak", True)]}), ("node.select_lasso", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True, "alt": True}, |