diff options
-rw-r--r-- | source/blender/compositor/intern/COM_NodeGraph.cpp | 20 | ||||
-rw-r--r-- | source/blender/compositor/intern/COM_NodeGraph.h | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp index d942d43befc..5c3de84f13c 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.cpp +++ b/source/blender/compositor/intern/COM_NodeGraph.cpp @@ -134,12 +134,16 @@ void NodeGraph::add_bNode(const CompositorContext &context, bNodeTree *b_ntree, /* special node types */ if (b_node->type == NODE_GROUP) { add_proxies_group(context, b_node, key); - return; } - - Node *node = Converter::convert(b_node); - if (node) - add_node(node, b_ntree, key, is_active_group); + else if (b_node->type == NODE_REROUTE) { + add_proxies_reroute(b_ntree, b_node, key, is_active_group); + } + else { + /* regular nodes, handled in Converter */ + Node *node = Converter::convert(b_node); + if (node) + add_node(node, b_ntree, key, is_active_group); + } } NodeInput *NodeGraph::find_input(const NodeRange &node_range, bNodeSocket *b_socket) @@ -278,3 +282,9 @@ void NodeGraph::add_proxies_group(const CompositorContext &context, bNode *b_nod add_bNodeTree(context, nodes_start, b_group_tree, key); } + +void NodeGraph::add_proxies_reroute(bNodeTree *b_ntree, bNode *b_node, bNodeInstanceKey key, bool is_active_group) +{ + SocketProxyNode *proxy = new SocketProxyNode(b_node, (bNodeSocket *)b_node->inputs.first, (bNodeSocket *)b_node->outputs.first); + add_node(proxy, b_ntree, key, is_active_group); +} diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h index fab4f2b3446..81799d76e1d 100644 --- a/source/blender/compositor/intern/COM_NodeGraph.h +++ b/source/blender/compositor/intern/COM_NodeGraph.h @@ -105,6 +105,8 @@ protected: void add_proxies_group_outputs(bNode *b_node, bNode *b_node_io, bool use_buffer); void add_proxies_group(const CompositorContext &context, bNode *b_node, bNodeInstanceKey key); + void add_proxies_reroute(bNodeTree *b_ntree, bNode *b_node, bNodeInstanceKey key, bool is_active_group); + #ifdef WITH_CXX_GUARDEDALLOC MEM_CXX_CLASS_ALLOC_FUNCS("COM:NodeGraph") #endif |