Merge branch 'master' into blender2.8

This commit is contained in:
Bastien Montagne 2018-06-19 19:25:44 +02:00
commit 9c20de8998
2 changed files with 7 additions and 4 deletions

View File

@ -797,8 +797,9 @@ void RE_engine_register_pass(struct RenderEngine *engine, struct Scene *scene, s
/* Register the pass in all scenes that have a render layer node for this layer.
* Since multiple scenes can be used in the compositor, the code must loop over all scenes
* and check whether their nodetree has a node that needs to be updated. */
Scene *sce;
for (sce = G.main->scene.first; sce; sce = sce->id.next) {
/* NOTE: using G_MAIN seems valid here,
* unless we want to register that for every other temp Main we could generate??? */
for (Scene *sce = G_MAIN->scene.first; sce; sce = sce->id.next) {
if (sce->nodetree) {
ntreeCompositRegisterPass(sce->nodetree, scene, view_layer, name, type);
}

View File

@ -193,7 +193,8 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
/* Flush stdout to be sure python callbacks are printing stuff after blender. */
fflush(stdout);
BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
/* NOTE: using G_MAIN seems valid here??? Not sure it's actually even used anyway, we could as well pass NULL? */
BLI_callback_exec(G_MAIN, NULL, BLI_CB_EVT_RENDER_STATS);
fputc('\n', stdout);
fflush(stdout);
@ -2325,7 +2326,8 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* Flush stdout to be sure python callbacks are printing stuff after blender. */
fflush(stdout);
BLI_callback_exec(re->main, NULL, BLI_CB_EVT_RENDER_STATS);
/* NOTE: using G_MAIN seems valid here??? Not sure it's actually even used anyway, we could as well pass NULL? */
BLI_callback_exec(G_MAIN, NULL, BLI_CB_EVT_RENDER_STATS);
BLI_timecode_string_from_time_simple(name, sizeof(name), re->i.lastframetime - render_time);
printf(" (Saving: %s)\n", name);