diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-05 16:46:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-09 15:26:29 +0300 |
commit | 103d29e2b2c0053436d0cef649ee9c6a24b2cba8 (patch) | |
tree | 1dd9d7b2ca12df4fbc80f1efc6ffd81dec45a184 /source/blender/windowmanager/intern/wm_files.c | |
parent | 423435bd2e44e2fc9ec0e984d25a2d2141c59454 (diff) |
Timer: Use explicit re-initialization on file load
Before this the timer API was relying on using a callback API to do
initialization when new file is loaded. This isn't how rest of Blender
works and it gets in a way because callbacks API is to be move to the
BKE level.
Use explicit call to timer API from where the file is loaded.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index a2e7f7fe935..e70640d2f22 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -52,6 +52,7 @@ #include "BLI_blenlib.h" #include "BLI_linklist.h" #include "BLI_utildefines.h" +#include "BLI_timer.h" #include "BLI_threads.h" #include "BLI_callbacks.h" #include "BLI_system.h" @@ -609,6 +610,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports) WM_cursor_wait(1); BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE); + BLI_timer_on_file_load(); UI_view2d_zoom_cache_reset(); @@ -806,6 +808,7 @@ void wm_homefile_read(bContext *C, if (use_data) { BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE); + BLI_timer_on_file_load(); G.relbase_valid = 0; |