diff options
-rw-r--r-- | source/blender/blenlib/BLI_callbacks.h | 1 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_handlers.c | 5 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h index 1735848e774..f20cef9c3ea 100644 --- a/source/blender/blenlib/BLI_callbacks.h +++ b/source/blender/blenlib/BLI_callbacks.h @@ -42,6 +42,7 @@ struct ID; typedef enum { BLI_CB_EVT_RENDER_PRE, BLI_CB_EVT_RENDER_POST, + BLI_CB_EVT_RENDER_STATS, BLI_CB_EVT_LOAD_PRE, BLI_CB_EVT_LOAD_POST, BLI_CB_EVT_SAVE_PRE, diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 26d9ca76e3f..e7e46160199 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -42,9 +42,10 @@ static PyTypeObject BlenderAppCbType; static PyStructSequence_Field app_cb_info_fields[]= { {(char *)"render_pre", NULL}, {(char *)"render_post", NULL}, - {(char *)"load_pre", NULL}, + {(char *)"render_stats", NULL}, + {(char *)"load_pre", NULL}, {(char *)"load_post", NULL}, - {(char *)"save_pre", NULL}, + {(char *)"save_pre", NULL}, {(char *)"save_post", NULL}, {NULL} }; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 77b637b5129..24c55332bff 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -173,6 +173,9 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs) else fprintf(stdout, "Sce: %s Ve:%d Fa:%d La:%d", rs->scenename, rs->totvert, rs->totface, rs->totlamp); } + + BLI_exec_cb(rs, (ID *)rs, BLI_CB_EVT_RENDER_STATS); + fputc('\n', stdout); fflush(stdout); } |