Merge branch 'master' into blender2.8
[blender.git] / source / blender / windowmanager / intern / wm_files.c
index 60d64e6ea5b5bcce6d8c1849a50057605fb99a15..318147e8c250ba1520d931ed2787334013b4c059 100644 (file)
@@ -500,10 +500,14 @@ static void wm_file_read_post(bContext *C, const bool is_startup_file, const boo
                        if (reset_app_template) {
                                /* Only run when we have a template path found. */
                                if (BKE_appdir_app_template_any()) {
-                                       BPY_execute_string(C, "__import__('bl_app_template_utils').reset()");
+                                       BPY_execute_string(
+                                               C, (const char *[]){"bl_app_template_utils", NULL},
+                                               "bl_app_template_utils.reset()");
                                }
                                /* sync addons, these may have changed from the defaults */
-                               BPY_execute_string(C, "__import__('addon_utils').reset_all()");
+                               BPY_execute_string(
+                                       C, (const char *[]){"addon_utils", NULL},
+                                       "addon_utils.reset_all()");
                        }
                        BPY_python_reset(C);
                        addons_loaded = true;