Keymap: remove D-Key shortcuts for annotations

Use tools for annotations instead.
This commit is contained in:
Campbell Barton
2018-11-22 05:56:04 +11:00
parent 7d985fcc1b
commit 2ad4cd097a

View File

@@ -2769,37 +2769,38 @@ def km_animation_channels(params):
# Modes
def km_grease_pencil(_params):
def km_grease_pencil(params):
items = []
keymap = (
"Grease Pencil",
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": items},
{"items": []},
)
items.extend([
# Draw
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "key_modifier": 'D'},
{"properties": [("mode", 'DRAW'), ("wait_for_input", False)]}),
# Draw - straight lines
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True, "key_modifier": 'D'},
{"properties": [("mode", 'DRAW_STRAIGHT'), ("wait_for_input", False)]}),
# Draw - poly lines
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True, "key_modifier": 'D'},
{"properties": [("mode", 'DRAW_POLY'), ("wait_for_input", False)]}),
# Erase
("gpencil.annotate", {"type": 'RIGHTMOUSE', "value": 'PRESS', "key_modifier": 'D'},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
if params.legacy:
items.extend([
# Draw
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "key_modifier": 'D'},
{"properties": [("mode", 'DRAW'), ("wait_for_input", False)]}),
# Draw - straight lines
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True, "key_modifier": 'D'},
{"properties": [("mode", 'DRAW_STRAIGHT'), ("wait_for_input", False)]}),
# Draw - poly lines
("gpencil.annotate", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True, "key_modifier": 'D'},
{"properties": [("mode", 'DRAW_POLY'), ("wait_for_input", False)]}),
# Erase
("gpencil.annotate", {"type": 'RIGHTMOUSE', "value": 'PRESS', "key_modifier": 'D'},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),
# Enter edit mode
("gpencil.editmode_toggle", {"type": 'TAB', "value": 'PRESS', "key_modifier": 'D'}, None),
# Add blank frame (B because it's easy to reach from D).
("gpencil.blank_frame_add", {"type": 'B', "value": 'PRESS', "key_modifier": 'D'}, None),
# Delete active frame - for easier video tutorials/review sessions.
# This works even when not in edit mode.
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "key_modifier": 'D'}, None),
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "key_modifier": 'D'}, None),
])
# Enter edit mode
("gpencil.editmode_toggle", {"type": 'TAB', "value": 'PRESS', "key_modifier": 'D'}, None),
# Add blank frame (B because it's easy to reach from D).
("gpencil.blank_frame_add", {"type": 'B', "value": 'PRESS', "key_modifier": 'D'}, None),
# Delete active frame - for easier video tutorials/review sessions.
# This works even when not in edit mode.
("gpencil.active_frames_delete_all", {"type": 'X', "value": 'PRESS', "key_modifier": 'D'}, None),
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "key_modifier": 'D'}, None),
])
return keymap