diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-23 16:31:04 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-08-23 18:09:59 +0300 |
commit | 4c6d207343bc43ce3a4568038397347f6bdf69c4 (patch) | |
tree | 9c96686203f138a6d3d89b5d533a40fdaf416d7e /source | |
parent | 42f89b9212d31fbfdf387a29835b957d758e473e (diff) |
Compositor: Fix crash enabling buffer groups on full frame
Full frame doesn't support this option as all operations are already
buffered. UI option will be removed in the future.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/compositor/intern/COM_NodeGraph.cc | 9 | ||||
-rw-r--r-- | source/blender/compositor/intern/COM_NodeGraph.h | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cc b/source/blender/compositor/intern/COM_NodeGraph.cc index 205fbcc0440..1872fbcf656 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.cc +++ b/source/blender/compositor/intern/COM_NodeGraph.cc @@ -248,7 +248,9 @@ void NodeGraph::add_proxies_group_inputs(bNode *b_node, bNode *b_node_io) } } -void NodeGraph::add_proxies_group_outputs(bNode *b_node, bNode *b_node_io, bool use_buffer) +void NodeGraph::add_proxies_group_outputs(const CompositorContext &context, + bNode *b_node, + bNode *b_node_io) { bNodeTree *b_group_tree = (bNodeTree *)b_node->id; BLI_assert(b_group_tree); /* should have been checked in advance */ @@ -261,7 +263,8 @@ void NodeGraph::add_proxies_group_outputs(bNode *b_node, bNode *b_node_io, bool b_sock_io = b_sock_io->next) { bNodeSocket *b_sock_group = find_b_node_output(b_node, b_sock_io->identifier); if (b_sock_group) { - if (use_buffer) { + if (context.isGroupnodeBufferEnabled() && + context.get_execution_model() == eExecutionModel::Tiled) { SocketBufferNode *buffer = new SocketBufferNode(b_node_io, b_sock_io, b_sock_group); add_node(buffer, b_group_tree, key, is_active_group); } @@ -297,7 +300,7 @@ void NodeGraph::add_proxies_group(const CompositorContext &context, } if (b_node_io->type == NODE_GROUP_OUTPUT && (b_node_io->flag & NODE_DO_OUTPUT)) { - add_proxies_group_outputs(b_node, b_node_io, context.isGroupnodeBufferEnabled()); + add_proxies_group_outputs(context, b_node, b_node_io); } } diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h index 7fa01593e1e..dfcc6c2fcf9 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.h +++ b/source/blender/compositor/intern/COM_NodeGraph.h @@ -107,7 +107,9 @@ class NodeGraph { bool is_active_group); void add_proxies_group_inputs(bNode *b_node, bNode *b_node_io); - void add_proxies_group_outputs(bNode *b_node, bNode *b_node_io, bool use_buffer); + void add_proxies_group_outputs(const CompositorContext &context, + bNode *b_node, + bNode *b_node_io); void add_proxies_group(const CompositorContext &context, bNode *b_node, bNodeInstanceKey key); void add_proxies_reroute(bNodeTree *b_ntree, |