diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-19 20:25:06 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-19 20:25:06 +0300 |
commit | 0a8af46707a2a507524754e4195f2366169e9dca (patch) | |
tree | 0551c6f429f9d486f26eb249c4108c7701968b15 | |
parent | 9ff135d85dde3ee945eed95656e61dfba0e315d1 (diff) |
Final cleanup of G.mains in render area.
-rw-r--r-- | source/blender/render/intern/source/external_engine.c | 5 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index b99ab611458..765bb435525 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -790,8 +790,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, srl, name, type); } diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 2c7ef8b606a..97971030dfb 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -198,7 +198,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); @@ -3577,7 +3578,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); |