diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/BLI_callbacks.h | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 37 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 5 |
3 files changed, 25 insertions, 18 deletions
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h index 2f963cfac51..7cf524749c2 100644 --- a/source/blender/blenlib/BLI_callbacks.h +++ b/source/blender/blenlib/BLI_callbacks.h @@ -41,6 +41,7 @@ typedef enum { BLI_CB_EVT_FRAME_CHANGE_POST, BLI_CB_EVT_RENDER_PRE, BLI_CB_EVT_RENDER_POST, + BLI_CB_EVT_RENDER_WRITE, BLI_CB_EVT_RENDER_STATS, BLI_CB_EVT_RENDER_INIT, BLI_CB_EVT_RENDER_COMPLETE, diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 44da322efc0..cf20f6fa742 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -44,23 +44,24 @@ void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg); static PyTypeObject BlenderAppCbType; static PyStructSequence_Field app_cb_info_fields[] = { - {(char *)"frame_change_pre", (char *)"Callback list - on frame change for playback and rendering (before)"}, - {(char *)"frame_change_post", (char *)"Callback list - on frame change for playback and rendering (after)"}, - {(char *)"render_pre", (char *)"Callback list - on render (before)"}, - {(char *)"render_post", (char *)"Callback list - on render (after)"}, - {(char *)"render_stats", (char *)"Callback list - on printing render statistics"}, - {(char *)"render_init", (char *)"Callback list - on initialization of a render job"}, - {(char *)"render_complete", (char *)"Callback list - on completion of render job"}, - {(char *)"render_cancel", (char *)"Callback list - on canceling a render job"}, - {(char *)"load_pre", (char *)"Callback list - on loading a new blend file (before)"}, - {(char *)"load_post", (char *)"Callback list - on loading a new blend file (after)"}, - {(char *)"save_pre", (char *)"Callback list - on saving a blend file (before)"}, - {(char *)"save_post", (char *)"Callback list - on saving a blend file (after)"}, - {(char *)"scene_update_pre", (char *)"Callback list - on updating the scenes data (before)"}, - {(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"}, + {(char *)"frame_change_pre", (char *)"on frame change for playback and rendering (before)"}, + {(char *)"frame_change_post", (char *)"on frame change for playback and rendering (after)"}, + {(char *)"render_pre", (char *)"on render (before)"}, + {(char *)"render_post", (char *)"on render (after)"}, + {(char *)"render_write", (char *)"on writing a render frame (directly after the frame is written)"}, + {(char *)"render_stats", (char *)"on printing render statistics"}, + {(char *)"render_init", (char *)"on initialization of a render job"}, + {(char *)"render_complete", (char *)"on completion of render job"}, + {(char *)"render_cancel", (char *)"on canceling a render job"}, + {(char *)"load_pre", (char *)"on loading a new blend file (before)"}, + {(char *)"load_post", (char *)"on loading a new blend file (after)"}, + {(char *)"save_pre", (char *)"on saving a blend file (before)"}, + {(char *)"save_post", (char *)"on saving a blend file (after)"}, + {(char *)"scene_update_pre", (char *)"on updating the scenes data (before)"}, + {(char *)"scene_update_post", (char *)"on updating the scenes data (after)"}, + {(char *)"game_pre", (char *)"on starting the game engine"}, + {(char *)"game_post", (char *)"on ending the game engine"}, + {(char *)"version_update", (char *)"on ending the versioning code"}, /* sets the permanent tag */ # define APP_CB_OTHER_FIELDS 1 @@ -71,7 +72,7 @@ static PyStructSequence_Field app_cb_info_fields[] = { static PyStructSequence_Desc app_cb_info_desc = { (char *)"bpy.app.handlers", /* name */ - (char *)"This module contains callbacks", /* doc */ + (char *)"This module contains callback lists", /* doc */ app_cb_info_fields, /* fields */ ARRAY_SIZE(app_cb_info_fields) - 1 }; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index f0c1b5a354c..1f17b82da3b 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2834,6 +2834,9 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr } BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + if (write_still) { + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_WRITE); + } } BLI_callback_exec(re->main, (ID *)scene, G.is_break ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); @@ -3031,6 +3034,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri if (G.is_break == false) { BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_WRITE); } } else { @@ -3114,6 +3118,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri if (G.is_break == false) { BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ + BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_WRITE); } } } |