Commit: 3adef61942a662892f7ffa86756fceb179fbed1d Author: Campbell Barton Date: Wed Apr 20 16:21:04 2022 +1000 Branches: master https://developer.blender.org/rB3adef61942a662892f7ffa86756fceb179fbed1d
Cleanup: run autopep8 on release/scripts/presets =================================================================== M release/scripts/presets/keyconfig/Blender.py M release/scripts/presets/keyconfig/Industry_Compatible.py M release/scripts/presets/keyconfig/keymap_data/blender_default.py M release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py =================================================================== 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": [("ac @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs