diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-01-30 12:48:11 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-01-30 12:48:11 +0400 |
commit | 28b72d09e5b53736bcd34ff10521b33a57dca045 (patch) | |
tree | a5f7a53d66459f0787fe236ae4d543d70af511e2 /source/blender/nodes | |
parent | 12a5e7e3a75fcbf8de11238f3963790f0c684ff7 (diff) |
Make Image and Alpha outputs in render layer node 'unavailable' when the Combined pass is not active in the render layer. Fix for bug #29999.
The internal code for render layers node is unchanged, since the buffer is created anyway. Also noticed that, while unavailable sockets and links to/from them are not displayed, they are still used in execution, which could lead to unexpected results. But that's a more general problem with the way (pseudo-)dynamic sockets are simply flagged with SOCK_UNAVAIL.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/composite/node_composite_tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index dfc0bcb3f75..bb66e4bb451 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -660,6 +660,13 @@ static void force_hidden_passes(bNode *node, int passflag) for(sock= node->outputs.first; sock; sock= sock->next) sock->flag &= ~SOCK_UNAVAIL; + if(!(passflag & SCE_PASS_COMBINED)) { + sock= BLI_findlink(&node->outputs, RRES_OUT_IMAGE); + sock->flag |= SOCK_UNAVAIL; + sock= BLI_findlink(&node->outputs, RRES_OUT_ALPHA); + sock->flag |= SOCK_UNAVAIL; + } + sock= BLI_findlink(&node->outputs, RRES_OUT_Z); if(!(passflag & SCE_PASS_Z)) sock->flag |= SOCK_UNAVAIL; sock= BLI_findlink(&node->outputs, RRES_OUT_NORMAL); |