Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_callbacks.h1
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c1
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h
index 8d5ea91c422..b93cd9e9eeb 100644
--- a/source/blender/blenlib/BLI_callbacks.h
+++ b/source/blender/blenlib/BLI_callbacks.h
@@ -45,6 +45,7 @@ typedef enum {
BLI_CB_EVT_SCENE_UPDATE_POST,
BLI_CB_EVT_GAME_PRE,
BLI_CB_EVT_GAME_POST,
+ BLI_CB_EVT_VERSION_UPDATE,
BLI_CB_EVT_TOT
} eCbEvent;
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 0c13230c365..c1d0a0bc298 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -59,6 +59,7 @@ static PyStructSequence_Field app_cb_info_fields[] = {
{(char *)"scene_update_post", (char *)"Callback list - on updating the scenes data (after)"},
{(char *)"game_pre", (char *)"Callback list - on starting the game engine"},
{(char *)"game_post", (char *)"Callback list - on ending the game engine"},
+ {(char *)"version_update", (char *)"Callback list - on ending the versioning code"},
/* sets the permanent tag */
# define APP_CB_OTHER_FIELDS 1
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 3c28d2b93cd..832fef404e3 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -459,6 +459,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
#endif
/* important to do before NULL'ing the context */
+ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_VERSION_UPDATE);
BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
if (!G.background) {
@@ -650,6 +651,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c
#endif
/* important to do before NULL'ing the context */
+ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_VERSION_UPDATE);
BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
WM_event_add_notifier(C, NC_WM | ND_FILEREAD, NULL);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index da0ef2b0c2a..b1f693502f6 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -238,6 +238,7 @@ void WM_init(bContext *C, int argc, const char **argv)
*
* unlikely any handlers are set but its possible,
* note that recovering the last session does its own callbacks. */
+ BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_VERSION_UPDATE);
BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
}
}