Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-03-18 12:49:54 +0300
committerJacques Lucke <jacques@blender.org>2022-03-18 12:49:54 +0300
commit7509a741166c97f5f87ed9e580eef6f99eb1e62a (patch)
treedcaea735f2347b7e3dca5f568446290532c3ba4d /source/blender/blenkernel/intern/node_tree_update.cc
parentc7954d5904c63c3d313d32a5efe6d1e09e4c4eda (diff)
Fix T96278: missing update after alpha socket connection
Differential Revision: https://developer.blender.org/D14299
Diffstat (limited to 'source/blender/blenkernel/intern/node_tree_update.cc')
-rw-r--r--source/blender/blenkernel/intern/node_tree_update.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node_tree_update.cc b/source/blender/blenkernel/intern/node_tree_update.cc
index 85061018383..baf3a0c8d22 100644
--- a/source/blender/blenkernel/intern/node_tree_update.cc
+++ b/source/blender/blenkernel/intern/node_tree_update.cc
@@ -1455,6 +1455,16 @@ class NodeTreeMainUpdater {
socket_hash = noise::hash(socket_hash, input_socket_hash);
}
}
+ /* The Image Texture node has a special case. The behavior of the color output changes
+ * depending on whether the Alpha output is linked. */
+ if (node.bnode()->type == SH_NODE_TEX_IMAGE && socket.index() == 0) {
+ BLI_assert(socket.name() == "Color");
+ const OutputSocketRef &alpha_socket = node.output(1);
+ BLI_assert(alpha_socket.name() == "Alpha");
+ if (alpha_socket.is_directly_linked()) {
+ socket_hash = noise::hash(socket_hash);
+ }
+ }
hash_by_socket_id[socket.id()] = socket_hash;
sockets_to_check.pop();
}