From e25cdac24bc48cbb0f05f42b52e42adaaae63499 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 7 Mar 2019 11:40:02 +0100 Subject: 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. --- source/blender/windowmanager/intern/wm_files.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source/blender/windowmanager') 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 -- cgit v1.2.3