Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2017-05-10 23:39:43 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-05-10 23:39:43 +0300
commitb82954f6f4e17c201859f9f15b2d73bd11fb68f2 (patch)
tree93fcbba717c6d0dd601b115ba16ad1c4644bc95b /source/blender/render
parent42c346028f535968dfb90ca446e794dd2bc874f9 (diff)
Fix T51455: Render Layers in compositor from a different scene not working
The code only updated nodes in the nodetree of the scene to which the render layer belongs. Therefore, when using scene B in the compositor setup of scene A, A's node wouldn't be updated. With this fix, the update function loops over all scenes and checks them for relevant nodes.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/external_engine.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c
index ee6dc96276c..a581f7bd198 100644
--- a/source/blender/render/intern/source/external_engine.c
+++ b/source/blender/render/intern/source/external_engine.c
@@ -783,7 +783,13 @@ void RE_engine_register_pass(struct RenderEngine *engine, struct Scene *scene, s
return;
}
- if (scene->nodetree) {
- ntreeCompositRegisterPass(scene->nodetree, scene, srl, name, type);
+ /* 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) {
+ if (sce->nodetree) {
+ ntreeCompositRegisterPass(sce->nodetree, scene, srl, name, type);
+ }
}
}