Blender Git Loki
Git Commits -> Revision 3064da1
Revision 3064da1 by Brecht Van Lommel (master) November 9, 2018, 00:33 (GMT) |
Keymap: move builtin keymaps from C to Python This should be purely an implementation change, for end users there should be no functional difference. The entire key configuration is in one file with ~5000 lines of code. Mostly avoiding code duplication and preserve comments and utility functions from the C code. It's a bit long but for searching and editing it's also convenient to have it all in one file. Notes: - Actual keymap is shared by blender / blender_legacy and stored in `keymap_data/blender_default.py` This only generates JSON-like data to be passed into `keyconfig_import_from_data`, allowing other presets to load and manipulate the default keymap. - Each preset defines 'keyconfig_data' which can be shared between presets. - Some of the utility functions for generating keymap items still need to be ported over to Python. - Some keymap items can be made into loops (marked as TODO). See: D3907 |
Commit Details:
Full Hash: 3064da1200a97e4fba08be33dd271b09d65a2fde
Parent Commit: b43ce79
Committed By: Campbell Barton
Lines Changed: +5161, -13556
2 Added Paths:
/release/scripts/presets/keyconfig/blender.py (+12, -0) (View)
/release/scripts/presets/keyconfig/keymap_data/blender_default.py (+5029, -0) (View)
/release/scripts/presets/keyconfig/keymap_data/blender_default.py (+5029, -0) (View)
58 Modified Paths:
/release/scripts/modules/bpy/utils/__init__.py (+5, -0) (Diff)
/release/scripts/modules/bpy_extras/keyconfig_utils.py (+1, -0) (Diff)
/release/scripts/modules/bpy_extras/keyconfig_utils_experimental.py (+20, -0) (Diff)
/release/scripts/presets/keyconfig/blender_27x.py (+8, -8651) (Diff)
/release/scripts/startup/bl_ui/space_userpref.py (+0, -5) (Diff)
/source/blender/editors/animation/anim_channels_edit.c (+1, -56) (Diff)
/source/blender/editors/animation/anim_markers.c (+1, -47) (Diff)
/source/blender/editors/animation/anim_ops.c (+1, -13) (Diff)
/source/blender/editors/armature/armature_ops.c (+1, -199) (Diff)
/source/blender/editors/curve/curve_ops.c (+2, -128) (Diff)
/source/blender/editors/gpencil/gpencil_ops.c (+4, -453) (Diff)
/source/blender/editors/include/ED_markers.h (+0, -3) (Diff)
/source/blender/editors/include/ED_object.h (+0, -7) (Diff)
/source/blender/editors/include/ED_transform.h (+1, -1) (Diff)
/source/blender/editors/interface/interface_eyedropper.c (+0, -18) (Diff)
/source/blender/editors/interface/interface_ops.c (+1, -28) (Diff)
/source/blender/editors/interface/view2d_ops.c (+1, -81) (Diff)
/source/blender/editors/lattice/lattice_ops.c (+1, -19) (Diff)
/source/blender/editors/mask/mask_edit.c (+1, -100) (Diff)
/source/blender/editors/mesh/editmesh_knife.c (+0, -24) (Diff)
/source/blender/editors/mesh/editmesh_tools.c (+0, -21) (Diff)
/source/blender/editors/mesh/mesh_ops.c (+1, -200) (Diff)
/source/blender/editors/metaball/mball_ops.c (+1, -25) (Diff)
/source/blender/editors/object/object_ops.c (+0, -209) (Diff)
/source/blender/editors/physics/physics_ops.c (+1, -53) (Diff)
/source/blender/editors/screen/screen_ops.c (+4, -175) (Diff)
/source/blender/editors/sculpt_paint/paint_intern.h (+0, -14) (Diff)
/source/blender/editors/sculpt_paint/paint_ops.c (+0, -371) (Diff)
/source/blender/editors/sculpt_paint/paint_stroke.c (+0, -4) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+14, -3) (Diff)
/source/blender/editors/space_action/action_ops.c (+2, -160) (Diff)
/source/blender/editors/space_action/space_action.c (+0, -2) (Diff)
/source/blender/editors/space_api/spacetypes.c (+3, -0) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+1, -9) (Diff)
/source/blender/editors/space_clip/space_clip.c (+4, -251) (Diff)
/source/blender/editors/space_console/space_console.c (+1, -81) (Diff)
/source/blender/editors/space_file/space_file.c (+3, -126) (Diff)
/source/blender/editors/space_graph/graph_ops.c (+2, -206) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -81) (Diff)
/source/blender/editors/space_info/space_info.c (+2, -22) (Diff)
/source/blender/editors/space_logic/space_logic.c (+1, -10) (Diff)
/source/blender/editors/space_nla/nla_ops.c (+3, -163) (Diff)
/source/blender/editors/space_node/node_ops.c (+2, -146) (Diff)
/source/blender/editors/space_outliner/outliner_ops.c (+1, -84) (Diff)
/source/blender/editors/space_sequencer/sequencer_ops.c (+3, -224) (Diff)
/source/blender/editors/space_text/space_text.c (+2, -154) (Diff)
/source/blender/editors/space_time/time_ops.c (+1, -9) (Diff)
/source/blender/editors/space_view3d/view3d_edit.c (+0, -15) (Diff)
/source/blender/editors/space_view3d/view3d_fly.c (+0, -50) (Diff)
/source/blender/editors/space_view3d/view3d_ops.c (+2, -292) (Diff)
/source/blender/editors/space_view3d/view3d_walk.c (+0, -53) (Diff)
/source/blender/editors/transform/transform.c (+0, -56) (Diff)
/source/blender/editors/transform/transform_ops.c (+6, -162) (Diff)
/source/blender/editors/util/CMakeLists.txt (+0, -2) (Diff)
/source/blender/editors/uvedit/uvedit_ops.c (+0, -99) (Diff)
/source/blender/windowmanager/intern/wm_keymap_utils.c (+4, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+3, -191) (Diff)
/source/blender/windowmanager/WM_keymap.h (+2, -0) (Diff)
/release/scripts/modules/bpy_extras/keyconfig_utils.py (+1, -0) (Diff)
/release/scripts/modules/bpy_extras/keyconfig_utils_experimental.py (+20, -0) (Diff)
/release/scripts/presets/keyconfig/blender_27x.py (+8, -8651) (Diff)
/release/scripts/startup/bl_ui/space_userpref.py (+0, -5) (Diff)
/source/blender/editors/animation/anim_channels_edit.c (+1, -56) (Diff)
/source/blender/editors/animation/anim_markers.c (+1, -47) (Diff)
/source/blender/editors/animation/anim_ops.c (+1, -13) (Diff)
/source/blender/editors/armature/armature_ops.c (+1, -199) (Diff)
/source/blender/editors/curve/curve_ops.c (+2, -128) (Diff)
/source/blender/editors/gpencil/gpencil_ops.c (+4, -453) (Diff)
/source/blender/editors/include/ED_markers.h (+0, -3) (Diff)
/source/blender/editors/include/ED_object.h (+0, -7) (Diff)
/source/blender/editors/include/ED_transform.h (+1, -1) (Diff)
/source/blender/editors/interface/interface_eyedropper.c (+0, -18) (Diff)
/source/blender/editors/interface/interface_ops.c (+1, -28) (Diff)
/source/blender/editors/interface/view2d_ops.c (+1, -81) (Diff)
/source/blender/editors/lattice/lattice_ops.c (+1, -19) (Diff)
/source/blender/editors/mask/mask_edit.c (+1, -100) (Diff)
/source/blender/editors/mesh/editmesh_knife.c (+0, -24) (Diff)
/source/blender/editors/mesh/editmesh_tools.c (+0, -21) (Diff)
/source/blender/editors/mesh/mesh_ops.c (+1, -200) (Diff)
/source/blender/editors/metaball/mball_ops.c (+1, -25) (Diff)
/source/blender/editors/object/object_ops.c (+0, -209) (Diff)
/source/blender/editors/physics/physics_ops.c (+1, -53) (Diff)
/source/blender/editors/screen/screen_ops.c (+4, -175) (Diff)
/source/blender/editors/sculpt_paint/paint_intern.h (+0, -14) (Diff)
/source/blender/editors/sculpt_paint/paint_ops.c (+0, -371) (Diff)
/source/blender/editors/sculpt_paint/paint_stroke.c (+0, -4) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+14, -3) (Diff)
/source/blender/editors/space_action/action_ops.c (+2, -160) (Diff)
/source/blender/editors/space_action/space_action.c (+0, -2) (Diff)
/source/blender/editors/space_api/spacetypes.c (+3, -0) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+1, -9) (Diff)
/source/blender/editors/space_clip/space_clip.c (+4, -251) (Diff)
/source/blender/editors/space_console/space_console.c (+1, -81) (Diff)
/source/blender/editors/space_file/space_file.c (+3, -126) (Diff)
/source/blender/editors/space_graph/graph_ops.c (+2, -206) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -81) (Diff)
/source/blender/editors/space_info/space_info.c (+2, -22) (Diff)
/source/blender/editors/space_logic/space_logic.c (+1, -10) (Diff)
/source/blender/editors/space_nla/nla_ops.c (+3, -163) (Diff)
/source/blender/editors/space_node/node_ops.c (+2, -146) (Diff)
/source/blender/editors/space_outliner/outliner_ops.c (+1, -84) (Diff)
/source/blender/editors/space_sequencer/sequencer_ops.c (+3, -224) (Diff)
/source/blender/editors/space_text/space_text.c (+2, -154) (Diff)
/source/blender/editors/space_time/time_ops.c (+1, -9) (Diff)
/source/blender/editors/space_view3d/view3d_edit.c (+0, -15) (Diff)
/source/blender/editors/space_view3d/view3d_fly.c (+0, -50) (Diff)
/source/blender/editors/space_view3d/view3d_ops.c (+2, -292) (Diff)
/source/blender/editors/space_view3d/view3d_walk.c (+0, -53) (Diff)
/source/blender/editors/transform/transform.c (+0, -56) (Diff)
/source/blender/editors/transform/transform_ops.c (+6, -162) (Diff)
/source/blender/editors/util/CMakeLists.txt (+0, -2) (Diff)
/source/blender/editors/uvedit/uvedit_ops.c (+0, -99) (Diff)
/source/blender/windowmanager/intern/wm_keymap_utils.c (+4, -0) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+3, -191) (Diff)
/source/blender/windowmanager/WM_keymap.h (+2, -0) (Diff)