Commit: 7509a741166c97f5f87ed9e580eef6f99eb1e62a Author: Jacques Lucke Date: Fri Mar 18 10:49:54 2022 +0100 Branches: master https://developer.blender.org/rB7509a741166c97f5f87ed9e580eef6f99eb1e62a
Fix T96278: missing update after alpha socket connection Differential Revision: https://developer.blender.org/D14299 =================================================================== M source/blender/blenkernel/intern/node_tree_update.cc =================================================================== 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(); } _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
