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
This commit is contained in:
@@ -1055,11 +1055,6 @@ class USERPREF_MT_keyconfigs(Menu):
|
||||
preset_operator = "wm.keyconfig_activate"
|
||||
|
||||
def draw(self, context):
|
||||
props = self.layout.operator("wm.context_set_value", text="Blender (default)")
|
||||
props.data_path = "window_manager.keyconfigs.active"
|
||||
props.value = "context.window_manager.keyconfigs.default"
|
||||
|
||||
# now draw the presets
|
||||
Menu.draw_preset(self, context)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user