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:
authorCampbell Barton <ideasman42@gmail.com>2021-03-14 10:00:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-14 10:08:05 +0300
commit06245d0d9471b793cc29e4dd584459254050c5d5 (patch)
treedfe583d442bfec01ef6c7d70fc918dd1d247b049 /release/scripts/presets/keyconfig/keymap_data/blender_default.py
parent2e95eaed55a9881d8d8568a226492bee6ec3dc32 (diff)
Cleanup: remove redundant keymap arguments
Also add missing space-type argument, while not required this is used by convention elsewhere in the key-map.
Diffstat (limited to 'release/scripts/presets/keyconfig/keymap_data/blender_default.py')
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py48
1 files changed, 25 insertions, 23 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 6e6f5e3da35..cf6a8152cff 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -368,7 +368,11 @@ def _template_items_tool_select_actions_simple(operator, *, type, value, propert
def _template_items_legacy_tools_from_numbers():
return [
("wm.tool_set_by_index",
- {"type": NUMBERS_1[i % 10], "value": 'PRESS', "shift": i >= 10},
+ {
+ "type": NUMBERS_1[i % 10],
+ "value": 'PRESS',
+ **({"shift": True} if i >= 10 else {}),
+ },
{"properties": [("index", i)]})
for i in range(20)
]
@@ -5589,28 +5593,26 @@ def km_sculpt_expand_modal(_params):
("CANCEL", {"type": 'ESC', "value": 'PRESS', "any": True}, None),
("CANCEL", {"type": 'RIGHTMOUSE', "value": 'PRESS', "any": True}, None),
("CONFIRM", {"type": 'LEFTMOUSE', "value": 'PRESS', "any": True}, None),
- ("INVERT", {"type": 'F', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("PRESERVE", {"type": 'E', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("GRADIENT", {"type": 'G', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("RECURSION_STEP_GEODESIC", {"type": 'R', "value": 'PRESS', "repeat" : False}, None),
- ("RECURSION_STEP_TOPOLOGY", {"type": 'R', "value": 'PRESS', "alt" : True ,"any": True, "repeat" : False}, None),
- ("MOVE_TOGGLE", {"type": 'SPACE', "value": 'ANY', "any": True, "repeat" : False}, None),
- ("FALLOFF_GEODESICS", {"type": 'ONE', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("FALLOFF_TOPOLOGY", {"type": 'TWO', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("FALLOFF_TOPOLOGY_DIAGONALS", {"type": 'THREE', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("FALLOFF_SPHERICAL", {"type": 'FOUR', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("SNAP_TOGGLE", {"type": 'LEFT_CTRL', "value": 'ANY', "repeat" : False}, None),
- ("LOOP_COUNT_INCREASE", {"type": 'W', "value": 'PRESS', "any": True, "repeat" : True}, None),
- ("LOOP_COUNT_DECREASE", {"type": 'Q', "value": 'PRESS', "any": True, "repeat" : True}, None),
- ("BRUSH_GRADIENT_TOGGLE", {"type": 'B', "value": 'PRESS', "any": True, "repeat" : False}, None),
- ("TEXTURE_DISTORTION_INCREASE", {"type": 'Y', "value": 'PRESS', "any": False, "repeat" : True}, None),
- ("TEXTURE_DISTORTION_DECREASE", {"type": 'T', "value": 'PRESS', "any": False, "repeat" : True}, None),
+ ("INVERT", {"type": 'F', "value": 'PRESS', "any": True}, None),
+ ("PRESERVE", {"type": 'E', "value": 'PRESS', "any": True}, None),
+ ("GRADIENT", {"type": 'G', "value": 'PRESS', "any": True}, None),
+ ("RECURSION_STEP_GEODESIC", {"type": 'R', "value": 'PRESS'}, None),
+ ("RECURSION_STEP_TOPOLOGY", {"type": 'R', "value": 'PRESS', "alt": True}, None),
+ ("MOVE_TOGGLE", {"type": 'SPACE', "value": 'ANY', "any": True}, None),
+ ("FALLOFF_GEODESICS", {"type": 'ONE', "value": 'PRESS', "any": True}, None),
+ ("FALLOFF_TOPOLOGY", {"type": 'TWO', "value": 'PRESS', "any": True}, None),
+ ("FALLOFF_TOPOLOGY_DIAGONALS", {"type": 'THREE', "value": 'PRESS', "any": True}, None),
+ ("FALLOFF_SPHERICAL", {"type": 'FOUR', "value": 'PRESS', "any": True}, None),
+ ("SNAP_TOGGLE", {"type": 'LEFT_CTRL', "value": 'ANY'}, None),
+ ("LOOP_COUNT_INCREASE", {"type": 'W', "value": 'PRESS', "any": True, "repeat": True}, None),
+ ("LOOP_COUNT_DECREASE", {"type": 'Q', "value": 'PRESS', "any": True, "repeat": True}, None),
+ ("BRUSH_GRADIENT_TOGGLE", {"type": 'B', "value": 'PRESS', "any": True}, None),
+ ("TEXTURE_DISTORTION_INCREASE", {"type": 'Y', "value": 'PRESS'}, None),
+ ("TEXTURE_DISTORTION_DECREASE", {"type": 'T', "value": 'PRESS'}, None),
])
return keymap
-
-
# Fallback for gizmos that don't have custom a custom key-map.
def km_generic_gizmo(_params):
keymap = (
@@ -5715,7 +5717,7 @@ def km_popup_toolbar(_params):
def km_generic_tool_annotate(params):
return (
"Generic Tool: Annotate",
- {"region_type": 'WINDOW'},
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": [
("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
{"properties": [("mode", 'DRAW'), ("wait_for_input", False)]}),
@@ -5728,7 +5730,7 @@ def km_generic_tool_annotate(params):
def km_generic_tool_annotate_line(params):
return (
"Generic Tool: Annotate Line",
- {"region_type": 'WINDOW'},
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": [
("gpencil.annotate", {"type": params.tool_tweak, "value": 'ANY'},
{"properties": [("mode", 'DRAW_STRAIGHT'), ("wait_for_input", False)]}),
@@ -5741,7 +5743,7 @@ def km_generic_tool_annotate_line(params):
def km_generic_tool_annotate_polygon(params):
return (
"Generic Tool: Annotate Polygon",
- {"region_type": 'WINDOW'},
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": [
("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
{"properties": [("mode", 'DRAW_POLY'), ("wait_for_input", False)]}),
@@ -5754,7 +5756,7 @@ def km_generic_tool_annotate_polygon(params):
def km_generic_tool_annotate_eraser(params):
return (
"Generic Tool: Annotate Eraser",
- {"region_type": 'WINDOW'},
+ {"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items": [
("gpencil.annotate", {"type": params.tool_mouse, "value": 'PRESS'},
{"properties": [("mode", 'ERASER'), ("wait_for_input", False)]}),