Final cleanup of G.mains in render area.
This commit is contained in:
parent
9ff135d85d
commit
0a8af46707
Notes:
blender-bot
2023-02-14 06:05:22 +01:00
Referenced by issue #55563, Cycles - AO-Node renders incorrect on some CPU's Referenced by issue #55549, Object with z scale of 0 appears black at certain angles
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue