Updating node standard value won't work if node is hidden, patch by
authorAntony Riakiotakis <kalast@gmail.com>
Wed, 6 May 2015 09:59:39 +0000 (11:59 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Wed, 6 May 2015 09:59:39 +0000 (11:59 +0200)
Alexander Romanov with minor changes.

source/blender/blenkernel/intern/node.c

index 0d375b0dbeb8ac9c0b94c40706c43d2a7e4e38ef..8ea19b3cde55b1cdd6dd8fb07d4ec3a58b4e7034 100644 (file)
@@ -3082,10 +3082,14 @@ void nodeSynchronizeID(bNode *node, bool copy_to_id)
                bNodeSocket *sock;
                Material *ma = (Material *)node->id;
                int a;
+               short check_flags = SOCK_UNAVAIL;
+
+               if (!copy_to_id)
+                       check_flags |= SOCK_HIDDEN;
                
                /* hrmf, case in loop isn't super fast, but we don't edit 100s of material at same time either! */
                for (a = 0, sock = node->inputs.first; sock; sock = sock->next, a++) {
-                       if (!nodeSocketIsHidden(sock)) {
+                       if (!(sock->flag & check_flags)) {
                                if (copy_to_id) {
                                        switch (a) {
                                                case MAT_IN_COLOR: