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 <ideasman42@gmail.com>2018-11-10 03:04:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-10 03:04:32 +0300
commitdc21ef7b86ca612e1ad7b5a64e1fdb474bd6bbe6 (patch)
tree46a596ed41475f126fc75180d8cb55faf338f311
parent0121258770584b495964f5ba241bdead2018eb22 (diff)
Fix 'Load Factory Settings' loosing the keymap
Caused by recent move to Python based keymaps.
-rw-r--r--source/blender/windowmanager/intern/wm_files.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 318147e8c25..f7971ed1b64 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -511,6 +511,13 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo
}
BPY_python_reset(C);
addons_loaded = true;
+
+ if (!G.background) {
+ /* Load the keymap from Python, otherwise we get an empty keymap. */
+ BPY_execute_string(
+ C, (const char *[]){"bpy", NULL},
+ "bpy.utils.keyconfig_set(bpy.utils.preset_find('blender', 'keyconfig'))");
+ }
}
}
else {