diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2019-01-18 03:47:32 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2019-01-18 03:47:32 +0300 |
commit | 031a9d6424815ce73897e25800356c9888b1cde2 (patch) | |
tree | a6c194a7fc58e412f434673363eb0fa6892e31af /source/blender/nodes/composite | |
parent | 2757469824bbe98d943b42f57ff23782b97a3abf (diff) | |
parent | c9eef24903479a70783efb2e00766d0eeec43823 (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_image.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c index 856b87631d7..ce41e309527 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.c +++ b/source/blender/nodes/composite/nodes/node_composite_image.c @@ -214,6 +214,23 @@ void node_cmp_rlayers_register_pass(bNodeTree *ntree, bNode *node, Scene *scene, } } +static void cmp_node_rlayer_create_outputs_cb(RenderEngine *UNUSED(engine), Scene *scene, ViewLayer *view_layer, + const char *name, int UNUSED(channels), const char *UNUSED(chanid), int 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. */ + /* NOTE: using G_MAIN seems valid here, + * unless we want to register that for every other temp Main we could generate??? */ + ntreeCompositRegisterPass(scene->nodetree, scene, view_layer, name, type); + + for (Scene *sce = G_MAIN->scene.first; sce; sce = sce->id.next) { + if (sce->nodetree && sce != scene) { + ntreeCompositRegisterPass(sce->nodetree, scene, view_layer, name, type); + } + } +} + static void cmp_node_rlayer_create_outputs(bNodeTree *ntree, bNode *node, LinkNodePair *available_sockets) { Scene *scene = (Scene *)node->id; @@ -229,7 +246,7 @@ static void cmp_node_rlayer_create_outputs(bNodeTree *ntree, bNode *node, LinkNo node->storage = data; RenderEngine *engine = RE_engine_create(engine_type); - engine_type->update_render_passes(engine, scene, view_layer); + RE_engine_update_render_passes(engine, scene, view_layer, cmp_node_rlayer_create_outputs_cb); RE_engine_free(engine); MEM_freeN(data); |