Cycles: copy shader node names over in the blender sync code.

This makes constant folding logs with --debug-cycles more meaningful.
A tiny fix is needed in OSL generator to match recent node refactoring.
This commit is contained in:
Alexander Gavrilov 2016-08-04 14:48:34 +03:00
parent 29dc04d9bb
commit 5f63797c09
2 changed files with 4 additions and 2 deletions

View File

@ -837,8 +837,10 @@ static ShaderNode *add_node(Scene *scene,
}
}
if(node)
if(node) {
node->name = b_node.name();
graph->add(node);
}
return node;
}

View File

@ -549,7 +549,7 @@ string OSLCompiler::id(ShaderNode *node)
{
/* assign layer unique name based on pointer address + bump mode */
stringstream stream;
stream << "node_" << node->name << "_" << node;
stream << "node_" << node->type->name << "_" << node;
return stream.str();
}