[Bf-blender-cvs] [69bf3a9] master: Updating node standard value won't work if node is hidden, patch by Alexander Romanov with minor changes.

Antony Riakiotakis noreply at git.blender.org
Wed May 6 11:59:46 CEST 2015


Commit: 69bf3a9e94298912f31398a4df9144d94f5604e5
Author: Antony Riakiotakis
Date:   Wed May 6 11:59:39 2015 +0200
Branches: master
https://developer.blender.org/rB69bf3a9e94298912f31398a4df9144d94f5604e5

Updating node standard value won't work if node is hidden, patch by
Alexander Romanov with minor changes.

===================================================================

M	source/blender/blenkernel/intern/node.c

===================================================================

diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 0d375b0..8ea19b3 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -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:




More information about the Bf-blender-cvs mailing list