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:
authorWilliam Reynish <billrey@me.com>2020-01-05 14:43:16 +0300
committerWilliam Reynish <billrey@me.com>2020-01-05 14:43:16 +0300
commit295647212db1463c26081e2f3936daf7bb944e87 (patch)
treebededda5b5f5b219700f6c8cef834dfc6eb7baa5 /release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
parent85d43943ddec06409099d9bc326cfaed0ac14f8b (diff)
Industry Compat keymap: Properly support Grease Pencil Edit Mode
Many things weren't working correctly in GP Edit Mode, such as select/deselect/invert all, basic tools, extrude, snap etc. Now this mode works consistently with other modes.
Diffstat (limited to 'release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py38
1 files changed, 9 insertions, 29 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index 2ce7c3fc41e..656199dfee8 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -770,7 +770,6 @@ def km_mask_editing(params):
("mask.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
("mask.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
("mask.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
- #*_template_items_select_actions(params, "mask.select_all"),
("mask.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
("mask.select_linked_pick", {"type": 'L', "value": 'PRESS'},
{"properties": [("deselect", False)]}),
@@ -2256,10 +2255,12 @@ def km_grease_pencil(_params):
def _grease_pencil_selection(params):
return [
- # Select all
- ("gpencil.select_box", {"type": 'A', "value": 'PRESS', "ctrl": True}, None),
("gpencil.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
{"properties": [("extend", True), ("toggle", True)]}),
+ # Select all
+ ("gpencil.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
+ ("gpencil.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("gpencil.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
# Select linked
("gpencil.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
# Select alternate
@@ -2272,14 +2273,6 @@ def _grease_pencil_selection(params):
]
-def _grease_pencil_display():
- return [
- ("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True},
- {"properties": [("data_path", 'space_data.overlay.use_gpencil_edit_lines')]}),
- ("wm.context_toggle", {"type": 'Q', "value": 'PRESS', "shift": True, "alt": True},
- {"properties": [("data_path", 'space_data.overlay.use_gpencil_multiedit_line_only')]}),
- ]
-
def km_grease_pencil_stroke_edit_mode(params):
items = []
@@ -2290,18 +2283,13 @@ def km_grease_pencil_stroke_edit_mode(params):
)
items.extend([
- # Interpolation
- ("gpencil.interpolate", {"type": 'E', "value": 'PRESS', "ctrl": True, "alt": True}, None),
- ("gpencil.interpolate_sequence", {"type": 'E', "value": 'PRESS', "shift": True, "ctrl": True}, None),
# Normal select
- ("gpencil.select", {"type": 'LEFTMOUSE', "value": 'PRESS'},
+ ("gpencil.select", {"type": 'LEFTMOUSE', "value": 'CLICK'},
{"properties": [("deselect_all", True)]}),
# Selection
*_grease_pencil_selection(params),
# Duplicate and move selected points
("gpencil.duplicate_move", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
- # Extrude and move selected points
- ("gpencil.extrude_move", {"type": 'E', "value": 'PRESS'}, None),
# Delete
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}),
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'DEL', "value": 'PRESS'}),
@@ -2321,20 +2309,13 @@ def km_grease_pencil_stroke_edit_mode(params):
("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
("gpencil.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
# Snap
- op_menu("GPENCIL_MT_snap", {"type": 'S', "value": 'PRESS', "shift": True}),
+ op_menu("GPENCIL_MT_snap", {"type": 'X', "value": 'PRESS', "shift": True}),
# Show/hide
("gpencil.reveal", {"type": 'H', "value": 'PRESS', "alt": True}, None),
("gpencil.hide", {"type": 'H', "value": 'PRESS', "ctrl": True},
{"properties": [("unselected", False)]}),
- ("gpencil.hide", {"type": 'H', "value": 'PRESS', "shift": True},
- {"properties": [("unselected", True)]}),
- ("gpencil.selection_opacity_toggle", {"type": 'H', "value": 'PRESS', "ctrl": True}, None),
- # Display
- *_grease_pencil_display(),
# Isolate layer
("gpencil.layer_isolate", {"type": 'NUMPAD_ASTERIX', "value": 'PRESS'}, None),
- # Move to layer
- ("gpencil.move_to_layer", {"type": 'G', "value": 'PRESS'}, None),
# Transform tools
("transform.translate", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None),
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
@@ -2350,6 +2331,9 @@ def km_grease_pencil_stroke_edit_mode(params):
{"properties": [("mode", 2)]}),
# Tools
*_template_items_basic_tools(),
+ op_tool_cycle("builtin.extrude", {"type": 'E', "value": 'PRESS', "ctrl": True}),
+ op_tool_cycle("builtin.radius", {"type": 'R', "value": 'PRESS', "ctrl": True}),
+ op_tool_cycle("builtin.bend", {"type": 'B', "value": 'PRESS', "ctrl": True}),
])
@@ -2514,8 +2498,6 @@ def km_grease_pencil_stroke_sculpt_mode(params):
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.brush.size')]}),
# Context menu
*_template_items_context_panel("VIEW3D_PT_gpencil_sculpt_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
- # Display
- *_grease_pencil_display(),
])
return keymap
@@ -2543,8 +2525,6 @@ def km_grease_pencil_stroke_weight_mode(params):
# Brush size.
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
{"properties": [("data_path_primary", 'tool_settings.gpencil_sculpt.weight_brush.size')]}),
- # Display
- *_grease_pencil_display(),
])
return keymap