print names of nodes/sockets when cycles complains about only being able to connect...
[blender.git] / intern / cycles / render / graph.cpp
index 34c8879aa1f8952e11ea77c0db6610ecabd2f733..18e802b610de4be2701e2efe3db915cfeb332b45 100644 (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;
                }