Merge branch 'blender-v3.1-release'

This commit is contained in:
Jacques Lucke 2022-02-14 09:09:37 +01:00
commit 08882ddfc2
1 changed files with 15 additions and 2 deletions

View File

@ -1468,7 +1468,8 @@ class NodeTreeMainUpdater {
while (!sockets_to_check.is_empty()) {
const SocketRef &in_out_socket = *sockets_to_check.pop();
const bNode &bnode = *in_out_socket.node().bnode();
const NodeRef &node = in_out_socket.node();
const bNode &bnode = *node.bnode();
const bNodeSocket &bsocket = *in_out_socket.bsocket();
if (bsocket.changed_flag != NTREE_CHANGED_NOTHING) {
return true;
@ -1493,7 +1494,7 @@ class NodeTreeMainUpdater {
}
else {
const OutputSocketRef &socket = in_out_socket.as_output();
for (const InputSocketRef *input_socket : socket.node().inputs()) {
for (const InputSocketRef *input_socket : node.inputs()) {
if (input_socket->is_available()) {
bool &pushed = pushed_by_socket_id[input_socket->id()];
if (!pushed) {
@ -1502,6 +1503,18 @@ class NodeTreeMainUpdater {
}
}
}
/* The Normal node has a special case, because the value stored in the first output socket
* is used as input in the node. */
if (bnode.type == SH_NODE_NORMAL && socket.index() == 1) {
BLI_assert(socket.name() == "Dot");
const OutputSocketRef &normal_output = node.output(0);
BLI_assert(normal_output.name() == "Normal");
bool &pushed = pushed_by_socket_id[normal_output.id()];
if (!pushed) {
sockets_to_check.push(&normal_output);
pushed = true;
}
}
}
}
return false;