diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-02-18 20:43:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-02-18 21:50:53 +0300 |
commit | b04d42022f7816dc1cfbf8d4e66733bd78eebbc9 (patch) | |
tree | 83ad6e0c37fb02a96505edfd075991ea75c436c3 /source/blender/render/intern/pipeline.c | |
parent | 82fc68ed90bf1429579eddd5df14caf60b791b45 (diff) |
Fix T95338: missing image editor refresh after render compositing
This was an old issue, but recent image partial update changes made this more
likely to happen in some cases. Now ensure that whenever the rendered scene
switches the image is updated.
Diffstat (limited to 'source/blender/render/intern/pipeline.c')
-rw-r--r-- | source/blender/render/intern/pipeline.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 739202564af..c2b719e46a7 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -1122,6 +1122,8 @@ static void do_render_compositor_scenes(Render *re) return; } + bool changed_scene = false; + /* now foreach render-result node we do a full render */ /* results are stored in a way compositor will find it */ GSet *scenes_rendered = BLI_gset_ptr_new(__func__); @@ -1134,11 +1136,20 @@ static void do_render_compositor_scenes(Render *re) do_render_compositor_scene(re, scene, cfra); BLI_gset_add(scenes_rendered, scene); node->typeinfo->updatefunc(restore_scene->nodetree, node); + + if (scene != re->scene) { + changed_scene = true; + } } } } } BLI_gset_free(scenes_rendered, NULL); + + if (changed_scene) { + /* If rendered another scene, switch back to the current scene with compositing nodes. */ + re->current_scene_update(re->suh, re->scene); + } } /* bad call... need to think over proper method still */ |