Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 9 Nov 2018 23:57:35 +0000 (10:57 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 9 Nov 2018 23:57:35 +0000 (10:57 +1100)
1  2 
source/blender/editors/space_script/script_edit.c
source/blender/python/BPY_extern.h
source/blender/python/intern/bpy_interface.c
source/blender/windowmanager/intern/wm_files.c
source/creator/creator_args.c

Simple merge
@@@ -497,13 -470,17 +497,17 @@@ static void wm_file_read_post(bContext 
        if (is_startup_file) {
                /* possible python hasn't been initialized */
                if (CTX_py_init_get(C)) {
 -                      if (use_userdef) {
 +                      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;
Simple merge