diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-15 10:42:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-15 10:46:00 +0300 |
commit | 5ec1d709e7717537b9f60e4b9ea997c56f6c5c15 (patch) | |
tree | c87a6bbe5d8ab37eeac0ea4304c5fb5ef9e8669b /release/scripts/modules | |
parent | 49cd13768f4435ca4d109768e5a6a96db21404ee (diff) |
WM: use Python bytecode cache to run presets
Key-maps can be very large, avoid parsing on every startup.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_extras/keyconfig_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py index 316884e3fe1..51f1980f519 100644 --- a/release/scripts/modules/bpy_extras/keyconfig_utils.py +++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py @@ -514,7 +514,7 @@ def keyconfig_module_from_preset(name, preset_reference_filename=None): preset_path = bpy.utils.preset_find(name, "keyconfig") # module name isn't used or added to 'sys.modules'. - mod_spec = importlib.util.spec_from_file_location("__bl_keymap__", preset_path) + mod_spec = importlib.util.spec_from_file_location("__main__", preset_path) mod = importlib.util.module_from_spec(mod_spec) mod_spec.loader.exec_module(mod) return mod |