diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-05 21:17:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-05 21:20:08 +0300 |
commit | d31b2f854954838fb849b5b0be0011d792eecb43 (patch) | |
tree | 43c291c53886f9c7afe6d1c03611c259153ef49e /source/blender/windowmanager | |
parent | 3428ec5984c0b7bac37fa860c660652f822919a9 (diff) |
Fix T61063, T62195: Python scripts should run before depsgraph evaluation.
This was changed (accidentally?) in d192d723123a, now go back to behavior more
similar to 2.7. Python scripts should be able to set up drivers or do other
changes that will then be taken into account when evaluating the scene for the
first time.
The more tricky thing is that Python scripts now run before ED_editors_init,
but given what happens in there it seems safe.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 1354c3df6a5..aa66231a430 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -485,12 +485,6 @@ static void wm_file_read_post( CTX_wm_window_set(C, wm->windows.first); - Main *bmain = CTX_data_main(C); - DEG_on_visible_update(bmain, true); - wm_event_do_depsgraph(C); - - ED_editors_init(C); - #ifdef WITH_PYTHON if (is_startup_file) { /* possible python hasn't been initialized */ @@ -520,6 +514,12 @@ 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 */ |