[Bf-blender-cvs] [e25cdac24bc] master: Fix T62280: driver functions added in load_post broken after recent changes.
Brecht Van Lommel
noreply at git.blender.org
Thu Mar 7 11:56:03 CET 2019
Commit: e25cdac24bc48cbb0f05f42b52e42adaaae63499
Author: Brecht Van Lommel
Date: Thu Mar 7 11:40:02 2019 +0100
Branches: master
https://developer.blender.org/rBe25cdac24bc48cbb0f05f42b52e42adaaae63499
Fix T62280: driver functions added in load_post broken after recent changes.
Evaluate the dependency graph a bit later still. This kind of worked before
because it was using the drive namespace from the previously loaded .blend
file but that's of course wrong.
===================================================================
M source/blender/windowmanager/intern/wm_files.c
===================================================================
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index aa66231a430..3fc1444fe41 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -514,21 +514,23 @@ static void wm_file_read_post(
UNUSED_VARS(is_startup_file, reset_app_template);
#endif /* WITH_PYTHON */
- Main *bmain = CTX_data_main(C);
- DEG_on_visible_update(bmain, true);
- wm_event_do_depsgraph(C);
-
- ED_editors_init(C);
-
WM_operatortype_last_properties_clear_all();
/* important to do before NULL'ing the context */
+ Main *bmain = CTX_data_main(C);
BLI_callback_exec(bmain, NULL, BLI_CB_EVT_VERSION_UPDATE);
BLI_callback_exec(bmain, NULL, BLI_CB_EVT_LOAD_POST);
if (is_factory_startup) {
BLI_callback_exec(bmain, NULL, BLI_CB_EVT_LOAD_FACTORY_STARTUP_POST);
}
+ /* After load post, so for example the driver namespace can be filled
+ * before evaluating the depsgraph. */
+ DEG_on_visible_update(bmain, true);
+ wm_event_do_depsgraph(C);
+
+ ED_editors_init(C);
+
#if 1
WM_event_add_notifier(C, NC_WM | ND_FILEREAD, NULL);
#else
More information about the Bf-blender-cvs
mailing list