Code cleanup: remove copy of shader graph for bump, no longer needed.

This commit is contained in:
Brecht Van Lommel
2017-08-20 14:02:16 +02:00
parent e27a59d411
commit 0b07c2c8a2
7 changed files with 24 additions and 84 deletions

View File

@@ -221,28 +221,6 @@ OutputNode *ShaderGraph::output()
return (OutputNode*)nodes.front();
}
ShaderGraph *ShaderGraph::copy()
{
ShaderGraph *newgraph = new ShaderGraph();
/* copy nodes */
ShaderNodeSet nodes_all;
foreach(ShaderNode *node, nodes)
nodes_all.insert(node);
ShaderNodeMap nodes_copy;
copy_nodes(nodes_all, nodes_copy);
/* add nodes (in same order, so output is still first) */
newgraph->clear_nodes();
foreach(ShaderNode *node, nodes)
newgraph->add(nodes_copy[node]);
newgraph->simplified = simplified;
return newgraph;
}
void ShaderGraph::connect(ShaderOutput *from, ShaderInput *to)
{
assert(!finalized);