Updating node standard value won't work if node is hidden, patch by

Alexander Romanov with minor changes.
This commit is contained in:
Antonis Ryakiotakis 2015-05-06 11:59:39 +02:00
parent 0abb6f3ef0
commit 69bf3a9e94
1 changed files with 5 additions and 1 deletions

View 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: