print names of nodes/sockets when cycles complains about only being able to connect a closure to another closure.

This commit is contained in:
Campbell Barton
2012-07-19 13:04:43 +00:00
parent 776c6e66b2
commit 2557eaf0dd
2 changed files with 27 additions and 32 deletions

View File

@@ -187,7 +187,10 @@ void ShaderGraph::connect(ShaderOutput *from, ShaderInput *to)
if(from->type != to->type) {
/* for closures we can't do automatic conversion */
if(from->type == SHADER_SOCKET_CLOSURE || to->type == SHADER_SOCKET_CLOSURE) {
fprintf(stderr, "ShaderGraph connect: can only connect closure to closure.\n");
fprintf(stderr, "ShaderGraph connect: can only connect closure to closure "
"(ShaderNode:%s, ShaderOutput:%s , type:%d -> to ShaderNode:%s, ShaderInput:%s, type:%d).\n",
from->parent->name.c_str(), from->name, (int)from->type,
to->parent->name.c_str(), to->name, (int)to->type);
return;
}