Cycles: make node with multiple input sockets with the same name work. Previously
[blender.git] / source / blender / blenloader / intern / readfile.c
index 1f62de69412d9a88f1d0e9ee7b14eacd487b2b26..77f786d2105f02f6bcdf65e63121351942ef015c 100644 (file)
@@ -2082,10 +2082,29 @@ static void ntree_tmp_cycles_version_patch(bNodeTree *ntree)
                        for(sock=node->inputs.first; sock; sock=sock->next) {
                                if(strcmp(sock->name, "Closure1") == 0)
                                        strcpy(sock->name, "Shader1");
-
                                if(strcmp(sock->name, "Closure2") == 0)
                                        strcpy(sock->name, "Shader2");
 
+                               if(strcmp(sock->name, "Color1") == 0)
+                                       strcpy(sock->name, "Color");
+                               if(strcmp(sock->name, "Color2") == 0)
+                                       strcpy(sock->name, "Color");
+
+                               if(strcmp(sock->name, "Vector1") == 0)
+                                       strcpy(sock->name, "Vector");
+                               if(strcmp(sock->name, "Vector2") == 0)
+                                       strcpy(sock->name, "Vector");
+
+                               if(strcmp(sock->name, "Value1") == 0)
+                                       strcpy(sock->name, "Value");
+                               if(strcmp(sock->name, "Value2") == 0)
+                                       strcpy(sock->name, "Value");
+
+                               if(strcmp(sock->name, "Shader1") == 0)
+                                       strcpy(sock->name, "Shader");
+                               if(strcmp(sock->name, "Shader2") == 0)
+                                       strcpy(sock->name, "Shader");
+
                                if(strcmp(sock->name, "Surface") == 0)
                                        strcpy(sock->name, "Shader");