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 <campbell@blender.org>2022-04-20 09:21:04 +0300
committerCampbell Barton <campbell@blender.org>2022-04-20 09:21:04 +0300
commit3adef61942a662892f7ffa86756fceb179fbed1d (patch)
treecc77adbc3450345e2e96cdc478a83fb6f77cdc4b
parent41b8e0316a16c6bb5c38321f8e2dbbfc6f9c09fb (diff)
Cleanup: run autopep8 on release/scripts/presets
-rw-r--r--release/scripts/presets/keyconfig/Blender.py1
-rw-r--r--release/scripts/presets/keyconfig/Industry_Compatible.py2
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py48
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py171
4 files changed, 131 insertions, 91 deletions
diff --git a/release/scripts/presets/keyconfig/Blender.py b/release/scripts/presets/keyconfig/Blender.py
index 7ce9a5650bd..2e77f233ca4 100644
--- a/release/scripts/presets/keyconfig/Blender.py
+++ b/release/scripts/presets/keyconfig/Blender.py
@@ -319,6 +319,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
col.label(text="File Browser")
col.row().prop(self, "use_file_single_click")
+
blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py"))
diff --git a/release/scripts/presets/keyconfig/Industry_Compatible.py b/release/scripts/presets/keyconfig/Industry_Compatible.py
index 2a3eb2a0f9d..4e17555fef9 100644
--- a/release/scripts/presets/keyconfig/Industry_Compatible.py
+++ b/release/scripts/presets/keyconfig/Industry_Compatible.py
@@ -10,6 +10,7 @@ import bpy
DIRNAME, FILENAME = os.path.split(__file__)
IDNAME = os.path.splitext(FILENAME)[0]
+
def update_fn(_self, _context):
load()
@@ -33,5 +34,6 @@ def load():
keyconfig_init_from_data(kc, keyconfig_data)
+
if __name__ == "__main__":
load()
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 6408873f13e..9b47a7b35b5 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -19,6 +19,7 @@ __all__ = (
# ------------------------------------------------------------------------------
# Configurable Parameters
+
class Params:
__slots__ = (
"apple",
@@ -604,18 +605,18 @@ def km_window(params):
{"type": k, "value": 'PRESS', "shift": True},
{"properties": [("space_type", t)]})
for k, t in (
- ('F1', 'FILE_BROWSER'),
- ('F2', 'CLIP_EDITOR'),
- ('F3', 'NODE_EDITOR'),
- ('F4', 'CONSOLE'),
- ('F5', 'VIEW_3D'),
- ('F6', 'GRAPH_EDITOR'),
- ('F7', 'PROPERTIES'),
- ('F8', 'SEQUENCE_EDITOR'),
- ('F9', 'OUTLINER'),
- ('F10', 'IMAGE_EDITOR'),
- ('F11', 'TEXT_EDITOR'),
- ('F12', 'DOPESHEET_EDITOR'),
+ ('F1', 'FILE_BROWSER'),
+ ('F2', 'CLIP_EDITOR'),
+ ('F3', 'NODE_EDITOR'),
+ ('F4', 'CONSOLE'),
+ ('F5', 'VIEW_3D'),
+ ('F6', 'GRAPH_EDITOR'),
+ ('F7', 'PROPERTIES'),
+ ('F8', 'SEQUENCE_EDITOR'),
+ ('F9', 'OUTLINER'),
+ ('F10', 'IMAGE_EDITOR'),
+ ('F11', 'TEXT_EDITOR'),
+ ('F12', 'DOPESHEET_EDITOR'),
)
),
@@ -7168,7 +7169,7 @@ def km_3d_view_tool_edit_curve_pen(params):
("curve.pen", {"type": params.tool_mouse, "value": 'PRESS', "ctrl": True},
{"properties": [("insert_point", True), ("delete_point", True)]}),
("curve.pen", {"type": params.tool_mouse, "value": 'DOUBLE_CLICK'},
- {"properties": [("toggle_vector", True), ("cycle_handle_type", True),]}),
+ {"properties": [("toggle_vector", True), ("cycle_handle_type", True), ]}),
]},
)
@@ -7433,7 +7434,8 @@ def km_3d_view_tool_paint_gpencil_line(params):
("gpencil.primitive_line", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": [("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7448,7 +7450,8 @@ def km_3d_view_tool_paint_gpencil_polyline(params):
("gpencil.primitive_polyline", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
{"properties": [("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7465,7 +7468,8 @@ def km_3d_view_tool_paint_gpencil_box(params):
("gpencil.primitive_box", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": [("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7482,7 +7486,8 @@ def km_3d_view_tool_paint_gpencil_circle(params):
("gpencil.primitive_circle", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": [("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7499,7 +7504,8 @@ def km_3d_view_tool_paint_gpencil_arc(params):
("gpencil.primitive_curve", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": [("type", 'ARC'), ("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7512,7 +7518,8 @@ def km_3d_view_tool_paint_gpencil_curve(params):
("gpencil.primitive_curve", params.tool_maybe_tweak_event,
{"properties": [("type", 'CURVE'), ("wait_for_input", False)]}),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@@ -7524,7 +7531,8 @@ def km_3d_view_tool_paint_gpencil_cutter(params):
{"items": [
("gpencil.stroke_cutter", {"type": params.tool_mouse, "value": 'PRESS'}, None),
# Lasso select
- ("gpencil.select_lasso", {"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
+ ("gpencil.select_lasso", {"type": params.action_mouse,
+ "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
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 64039f200e9..e1977bf7df2 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -67,12 +67,14 @@ def _template_items_context_menu(menu, key_args_primary):
for kmi_args in (key_args_primary, {"type": 'APP', "value": 'PRESS'})
]
+
def _template_items_context_panel(menu, key_args_primary):
return [
op_panel(menu, kmi_args)
for kmi_args in (key_args_primary, {"type": 'APP', "value": 'PRESS'})
]
+
def _template_items_object_subdivision_set():
return [
("object.subdivision_set",
@@ -116,6 +118,7 @@ def _template_items_basic_tools(*, connected=False):
op_tool_cycle("builtin.cursor", {"type": 'C', "value": 'PRESS'}),
]
+
def _template_items_tool_select(params, operator, *, extend):
return [
(operator, {"type": 'LEFTMOUSE', "value": 'PRESS'},
@@ -436,7 +439,8 @@ def km_property_editor(params):
("object.modifier_remove", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}),
("object.modifier_copy", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
# Grease pencil modifier panels
- ("object.gpencil_modifier_remove", {"type": 'BACK_SPACE', "value": 'PRESS'}, {"properties": [("report", True)]}),
+ ("object.gpencil_modifier_remove", {"type": 'BACK_SPACE',
+ "value": 'PRESS'}, {"properties": [("report", True)]}),
("object.gpencil_modifier_remove", {"type": 'DEL', "value": 'PRESS'}, {"properties": [("report", True)]}),
("object.gpencil_modifier_copy", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
# ShaderFX panels
@@ -517,7 +521,8 @@ def km_outliner(params):
("outliner.show_one_level", {"type": 'NUMPAD_MINUS', "value": 'PRESS'},
{"properties": [("open", False)]}),
("outliner.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("outliner.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("outliner.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("outliner.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("outliner.keyingset_add_selected", {"type": 'K', "value": 'PRESS'}, None),
("outliner.keyingset_remove_selected", {"type": 'K', "value": 'PRESS', "alt": True}, None),
@@ -577,7 +582,8 @@ def km_uv_editor(params):
("uv.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("uv.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("uv.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("uv.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("uv.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("uv.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("uv.hide", {"type": 'H', "value": 'PRESS', "ctrl": True},
{"properties": [("unselected", False)]}),
@@ -621,6 +627,7 @@ def km_view3d_generic(_params):
return keymap
+
# 3D View: main region.
def km_view3d(params):
items = []
@@ -722,7 +729,7 @@ def km_view3d(params):
*((operator,
{"type": 'LEFTMOUSE', "value": 'CLICK', **{m: True for m in mods}},
{"properties": [(c, True) for c in props]},
- ) for operator, props, mods in (
+ ) for operator, props, mods in (
("view3d.select", ("deselect_all",), ()),
("view3d.select", ("toggle",), ("shift",)),
("view3d.select", ("center", "object"), ("ctrl",)),
@@ -768,7 +775,8 @@ def km_mask_editing(params):
("mask.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
{"properties": [("extend", False), ("deselect", False), ("toggle", True)]}),
("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": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("mask.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("mask.select_linked", {"type": 'L', "value": 'PRESS', "ctrl": True}, None),
("mask.select_linked_pick", {"type": 'L', "value": 'PRESS'},
@@ -832,7 +840,8 @@ def km_markers(params):
{"properties": [("extend", True), ("camera", True)]}),
("marker.select_box", {"type": 'Q', "value": 'PRESS'}, None),
("marker.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("marker.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("marker.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("marker.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("marker.delete", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
("marker.delete", {"type": 'DEL', "value": 'PRESS'}, None),
@@ -895,18 +904,19 @@ def km_graph_editor(params):
("graph.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
("graph.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("graph.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("graph.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("graph.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("graph.select_box", {"type": 'Q', "value": 'PRESS'},
{"properties": [("axis_range", False)]}),
("graph.select_box", {"type": 'Q', "value": 'PRESS', "alt": True},
{"properties": [("axis_range", True)]}),
("graph.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
- {"properties":[("tweak", True), ("axis_range", False), ("mode", 'SET')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("mode", 'SET')]}),
("graph.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True},
- {"properties":[("tweak", True), ("axis_range", False), ("mode", 'ADD')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("mode", 'ADD')]}),
("graph.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True},
- {"properties":[("tweak", True), ("axis_range", False), ("mode", 'SUB')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("mode", 'SUB')]}),
("graph.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("graph.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
("graph.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
@@ -1121,7 +1131,8 @@ def km_node_editor(params):
("node.delete_reconnect", {"type": 'BACK_SPACE', "value": 'PRESS', "ctrl": True}, None),
("node.delete_reconnect", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None),
("node.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("node.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("node.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("node.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("node.select_linked_to", {"type": 'LEFT_BRACKET', "value": 'PRESS', "shift": True}, None),
("node.select_linked_from", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, None),
@@ -1260,7 +1271,7 @@ def km_file_browser_main(params):
{"properties": [("open", False), ("deselect_all", True)]}),
("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "ctrl": True},
{"properties": [("extend", True), ("open", False)]}),
- ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True,},
+ ("file.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True, },
{"properties": [("extend", True), ("fill", True), ("open", False)]}),
("file.select", {"type": 'RIGHTMOUSE', "value": 'CLICK', "shift": True},
{"properties": [("extend", True), ("open", False)]}),
@@ -1379,18 +1390,19 @@ def km_dopesheet(params):
("action.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
("action.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("action.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("action.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("action.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("action.select_box", {"type": 'Q', "value": 'PRESS'},
{"properties": [("axis_range", False)]}),
("action.select_box", {"type": 'Q', "value": 'PRESS', "alt": True},
{"properties": [("axis_range", True)]}),
("action.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
- {"properties":[("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'SET')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'SET')]}),
("action.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True},
- {"properties":[("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'ADD')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'ADD')]}),
("action.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True},
- {"properties":[("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'SUB')]}),
+ {"properties": [("tweak", True), ("axis_range", False), ("wait_for_input", False), ("mode", 'SUB')]}),
("action.select_column", {"type": 'K', "value": 'PRESS'},
{"properties": [("mode", 'KEYS')]}),
("action.select_column", {"type": 'K', "value": 'PRESS', "ctrl": True},
@@ -1505,18 +1517,19 @@ def km_nla_editor(params):
("nla.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'RIGHT'), ("extend", False)]}),
("nla.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("nla.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("nla.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("nla.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("nla.select_box", {"type": 'Q', "value": 'PRESS'},
{"properties": [("axis_range", False)]}),
("nla.select_box", {"type": 'Q', "value": 'PRESS', "alt": True},
{"properties": [("axis_range", True)]}),
("nla.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
- {"properties":[("tweak", True), ("mode", 'SET')]}),
+ {"properties": [("tweak", True), ("mode", 'SET')]}),
("nla.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True},
- {"properties":[("tweak", True), ("mode", 'ADD')]}),
+ {"properties": [("tweak", True), ("mode", 'ADD')]}),
("nla.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True},
- {"properties":[("tweak", True), ("mode", 'SUB')]}),
+ {"properties": [("tweak", True), ("mode", 'SUB')]}),
("nla.view_all", {"type": 'A', "value": 'PRESS'}, None),
("nla.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
("nla.view_selected", {"type": 'F', "value": 'PRESS'}, None),
@@ -1739,7 +1752,8 @@ def km_sequencer(params):
("wm.search_menu", {"type": 'TAB', "value": 'PRESS'}, None),
*_template_items_animation(),
("sequencer.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("sequencer.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("sequencer.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("sequencer.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("sequencer.split", {"type": 'B', "value": 'PRESS', "ctrl": True},
{"properties": [("type", 'SOFT')]}),
@@ -1816,11 +1830,11 @@ def km_sequencer(params):
{"properties": [("extend", True)]}),
("sequencer.select_linked", {"type": 'RIGHT_BRACKET', "value": 'PRESS', "ctrl": True}, None),
("sequencer.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'},
- {"properties":[("tweak", True), ("mode", 'SET')]}),
+ {"properties": [("tweak", True), ("mode", 'SET')]}),
("sequencer.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True},
- {"properties":[("tweak", True), ("mode", 'ADD')]}),
+ {"properties": [("tweak", True), ("mode", 'ADD')]}),
("sequencer.select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True},
- {"properties":[("tweak", True), ("mode", 'SUB')]}),
+ {"properties": [("tweak", True), ("mode", 'SUB')]}),
("sequencer.select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}, None),
("sequencer.slip", {"type": 'R', "value": 'PRESS'}, None),
("wm.context_set_int", {"type": 'O', "value": 'PRESS'},
@@ -1873,7 +1887,7 @@ def km_sequencer_channels(params):
# Rename.
("sequencer.rename_channel", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, None),
("sequencer.rename_channel", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'}, None),
- ])
+ ])
return keymap
@@ -2032,7 +2046,8 @@ def km_clip_editor(params):
{"properties": [("extend", True)]}),
("clip.select_box", {"type": 'Q', "value": 'PRESS'}, None),
("clip.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("clip.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("clip.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("clip.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
op_menu("CLIP_MT_select_grouped", {"type": 'G', "value": 'PRESS', "shift": True}),
("clip.add_marker_slide", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, None),
@@ -2146,6 +2161,7 @@ def km_clip_dopesheet_editor(_params):
return keymap
+
def km_spreadsheet_generic(_params):
items = []
keymap = (
@@ -2213,7 +2229,6 @@ def km_animation_channels(params):
{"items": items},
)
-
items.extend([
# Click select.
("anim.channels_click", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
@@ -2231,13 +2246,16 @@ def km_animation_channels(params):
# Find (setting the name filter).
("anim.channels_select_filter", {"type": 'F', "value": 'PRESS', "ctrl": True}, None),
# Selection.
- ("anim.channels_select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("anim.channels_select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
- ("anim.channels_select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
+ ("anim.channels_select_all", {"type": 'A', "value": 'PRESS',
+ "ctrl": True}, {"properties": [("action", 'SELECT')]}),
+ ("anim.channels_select_all", {"type": 'A', "value": 'PRESS',
+ "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("anim.channels_select_all", {"type": 'I', "value": 'PRESS',
+ "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("anim.channels_select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG'}, None),
- ("anim.channels_select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True,},
+ ("anim.channels_select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "shift": True, },
{"properties": [("extend", True)]}),
- ("anim.channels_select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True,},
+ ("anim.channels_select_box", {"type": 'LEFTMOUSE', "value": 'CLICK_DRAG', "ctrl": True, },
{"properties": [("deselect", True)]}),
# Delete.
("anim.channels_delete", {"type": 'BACK_SPACE', "value": 'PRESS'}, None),
@@ -2300,7 +2318,8 @@ def _grease_pencil_selection(params):
{"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": '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),
@@ -2385,7 +2404,6 @@ def km_grease_pencil_stroke_edit_mode(params):
op_tool_cycle("builtin.bend", {"type": 'B', "value": 'PRESS', "ctrl": True}),
])
-
return keymap
@@ -2764,7 +2782,8 @@ def km_grease_pencil_stroke_weight_mode(params):
("wm.radial_control", {"type": 'S', "value": 'PRESS'},
{"properties": [("data_path_primary", 'tool_settings.gpencil_weight_paint.brush.size')]}),
# Context menu
- *_template_items_context_panel("VIEW3D_PT_gpencil_weight_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
+ *_template_items_context_panel("VIEW3D_PT_gpencil_weight_context_menu",
+ {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
])
return keymap
@@ -2813,6 +2832,7 @@ def km_grease_pencil_stroke_vertex_mode(params):
return keymap
+
def km_grease_pencil_stroke_vertex_draw(params):
items = []
keymap = (
@@ -2928,6 +2948,7 @@ def km_grease_pencil_stroke_vertex_replace(params):
return keymap
+
def km_face_mask(params):
items = []
keymap = (
@@ -2937,9 +2958,12 @@ def km_face_mask(params):
)
items.extend([
- ("paint.face_select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("paint.face_select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
- ("paint.face_select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
+ ("paint.face_select_all", {"type": 'A', "value": 'PRESS',
+ "ctrl": True}, {"properties": [("action", 'SELECT')]}),
+ ("paint.face_select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("paint.face_select_all", {"type": 'I', "value": 'PRESS',
+ "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("paint.face_select_hide", {"type": 'H', "value": 'PRESS', "ctrl": True},
{"properties": [("unselected", False)]}),
("paint.face_select_hide", {"type": 'H', "value": 'PRESS', "shift": True},
@@ -2995,7 +3019,8 @@ def km_pose(params):
("pose.paste", {"type": 'V', "value": 'PRESS', "shift": True, "ctrl": True},
{"properties": [("flipped", True)]}),
("pose.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("pose.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("pose.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("pose.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("pose.select_parent", {"type": 'UP_ARROW', "value": 'PRESS', "ctrl": True}, None),
("pose.select_hierarchy", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
@@ -3030,7 +3055,6 @@ def km_pose(params):
op_tool_cycle("builtin.measure", {"type": 'M', "value": 'PRESS'}),
])
-
return keymap
@@ -3044,9 +3068,10 @@ def km_object_mode(params):
items.extend([
*_template_items_animation(),
- #Selection
+ # Selection
("object.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("object.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("object.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("object.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("object.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("object.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
@@ -3148,10 +3173,10 @@ def km_curve(params):
{"items": items},
)
-
items.extend([
("curve.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("curve.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("curve.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("curve.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("curve.select_row", {"type": 'R', "value": 'PRESS', "shift": True}, None),
("curve.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
@@ -3271,7 +3296,8 @@ def km_image_paint(params):
("wm.context_toggle", {"type": 'S', "value": 'PRESS', "shift": True},
{"properties": [("data_path", 'tool_settings.image_paint.brush.use_smooth_stroke')]}),
op_menu("VIEW3D_MT_angle_control", {"type": 'R', "value": 'PRESS'}),
- *_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
+ *_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu",
+ {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
# Tools
("paint.brush_select", {"type": 'D', "value": 'PRESS'},
{"properties": [("image_tool", 'DRAW')]}),
@@ -3356,7 +3382,7 @@ def km_weight_paint(params):
*_template_items_context_panel("VIEW3D_PT_paint_weight_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
# Bone selection for combined weight paint + pose mode.
("view3d.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "ctrl": True}, None),
- # Tools
+ # Tools
("paint.brush_select", {"type": 'D', "value": 'PRESS'},
{"properties": [("weight_tool", 'DRAW')]}),
("paint.brush_select", {"type": 'B', "value": 'PRESS'},
@@ -3504,7 +3530,8 @@ def km_mesh(params):
{"properties": [("use_fill", False)]}),
("mesh.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("mesh.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("mesh.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("mesh.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("mesh.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("mesh.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
@@ -3528,7 +3555,7 @@ def km_mesh(params):
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
# Menus.
*_template_items_context_menu("VIEW3D_MT_edit_mesh_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
- #Tools
+ # Tools
*_template_items_basic_tools(),
op_tool_cycle("builtin.bevel", {"type": 'B', "value": 'PRESS', "ctrl": True}),
op_tool_cycle("builtin.inset_faces", {"type": 'I', "value": 'PRESS'}),
@@ -3562,7 +3589,8 @@ def km_armature(params):
("armature.parent_clear", {"type": 'P', "value": 'PRESS', "shift": True}, None),
# Selection.
("armature.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("armature.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("armature.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("armature.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("armature.select_hierarchy", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
@@ -3610,7 +3638,6 @@ def km_metaball(params):
{"items": items},
)
-
items.extend([
("mball.reveal_metaelems", {"type": 'H', "value": 'PRESS', "alt": True}, None),
("mball.hide_metaelems", {"type": 'H', "value": 'PRESS', "ctrl": True},
@@ -3621,7 +3648,8 @@ def km_metaball(params):
("mball.delete_metaelems", {"type": 'DEL', "value": 'PRESS'}, None),
("mball.duplicate_move", {"type": 'D', "value": 'PRESS', "ctrl": True}, None),
("mball.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("mball.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("mball.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("mball.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("mball.select_similar", {"type": 'G', "value": 'PRESS', "shift": True}, None),
*_template_items_context_menu("VIEW3D_MT_edit_metaball_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
@@ -3645,7 +3673,8 @@ def km_lattice(params):
items.extend([
("lattice.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("lattice.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("lattice.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("lattice.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("lattice.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("lattice.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
@@ -3653,7 +3682,7 @@ def km_lattice(params):
*_template_items_context_menu("VIEW3D_MT_edit_lattice_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
("wm.context_toggle", {"type": 'B', "value": 'PRESS'},
{"properties": [("data_path", 'tool_settings.use_proportional_edit')]}),
- # Tools
+ # Tools
op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}),
op_tool_cycle("builtin.move", {"type": 'W', "value": 'PRESS'}),
op_tool_cycle("builtin.rotate", {"type": 'E', "value": 'PRESS'}),
@@ -3676,7 +3705,8 @@ def km_particle(params):
items.extend([
("particle.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'SELECT')]}),
- ("particle.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True, "shift": True}, {"properties": [("action", 'DESELECT')]}),
+ ("particle.select_all", {"type": 'A', "value": 'PRESS', "ctrl": True,
+ "shift": True}, {"properties": [("action", 'DESELECT')]}),
("particle.select_all", {"type": 'I', "value": 'PRESS', "ctrl": True}, {"properties": [("action", 'INVERT')]}),
("particle.select_more", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True}, None),
("particle.select_less", {"type": 'DOWN_ARROW', "value": 'PRESS', "repeat": True}, None),
@@ -3793,7 +3823,6 @@ def km_font(params):
*_template_items_context_menu("VIEW3D_MT_edit_font_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
])
-
return keymap
@@ -3806,35 +3835,35 @@ def km_object_non_modal(params):
)
items.extend([
- ("object.mode_set",{"type": 'ONE', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'ONE', "value": 'PRESS'},
{"properties": [("mode", 'PAINT_GPENCIL')]}),
- ("object.mode_set",{"type": 'THREE', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'THREE', "value": 'PRESS'},
{"properties": [("mode", 'POSE')]}),
- ("object.mode_set_with_submode",{"type": 'ONE', "value": 'PRESS'},
+ ("object.mode_set_with_submode", {"type": 'ONE', "value": 'PRESS'},
{"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'VERT'})]}),
- ("object.mode_set_with_submode",{"type": 'TWO', "value": 'PRESS'},
+ ("object.mode_set_with_submode", {"type": 'TWO', "value": 'PRESS'},
{"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'EDGE'})]}),
- ("object.mode_set_with_submode",{"type": 'THREE', "value": 'PRESS'},
+ ("object.mode_set_with_submode", {"type": 'THREE', "value": 'PRESS'},
{"properties": [("mode", 'EDIT'), ("mesh_select_mode", {'FACE'})]}),
- ("object.mode_set",{"type": 'ONE', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'ONE', "value": 'PRESS'},
{"properties": [("mode", 'EDIT')]}),
- ("object.mode_set",{"type": 'FOUR', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'FOUR', "value": 'PRESS'},
{"properties": [("mode", 'OBJECT')]}),
- ("object.mode_set",{"type": 'FIVE', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'FIVE', "value": 'PRESS'},
{"properties": [("mode", 'SCULPT')]}),
- ("object.mode_set",{"type": 'SIX', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'SIX', "value": 'PRESS'},
{"properties": [("mode", 'VERTEX_PAINT')]}),
- ("object.mode_set",{"type": 'SEVEN', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'SEVEN', "value": 'PRESS'},
{"properties": [("mode", 'WEIGHT_PAINT')]}),
- ("object.mode_set",{"type": 'EIGHT', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'EIGHT', "value": 'PRESS'},
{"properties": [("mode", 'TEXTURE_PAINT')]}),
- ("object.mode_set",{"type": 'TWO', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'TWO', "value": 'PRESS'},
{"properties": [("mode", 'EDIT_GPENCIL')]}),
- ("object.mode_set",{"type": 'FIVE', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'FIVE', "value": 'PRESS'},
{"properties": [("mode", 'SCULPT_GPENCIL')]}),
- ("object.mode_set",{"type": 'SIX', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'SIX', "value": 'PRESS'},
{"properties": [("mode", 'VERTEX_GPENCIL')]}),
- ("object.mode_set",{"type": 'SEVEN', "value": 'PRESS'},
+ ("object.mode_set", {"type": 'SEVEN', "value": 'PRESS'},
{"properties": [("mode", 'WEIGHT_GPENCIL')]}),
])
@@ -4052,7 +4081,7 @@ def km_generic_gizmo_maybe_drag(params):
{"space_type": 'EMPTY', "region_type": 'WINDOW'},
{"items":
_template_items_gizmo_tweak_value_drag()
- },
+ },
)
return keymap