[Bf-blender-cvs] [5fca280c803] master: Fix: Node link drag search doesn't list shader sockets
Hans Goudey
noreply at git.blender.org
Thu Jan 20 23:26:50 CET 2022
Commit: 5fca280c803b6841e4ef3c162fc3a8a483971089
Author: Hans Goudey
Date: Thu Jan 20 16:26:43 2022 -0600
Branches: master
https://developer.blender.org/rB5fca280c803b6841e4ef3c162fc3a8a483971089
Fix: Node link drag search doesn't list shader sockets
Shader sockets were only available when dragging from inputs.
===================================================================
M source/blender/nodes/intern/node_socket_declarations.cc
===================================================================
diff --git a/source/blender/nodes/intern/node_socket_declarations.cc b/source/blender/nodes/intern/node_socket_declarations.cc
index 4fef5b96e9f..1e6b77a9620 100644
--- a/source/blender/nodes/intern/node_socket_declarations.cc
+++ b/source/blender/nodes/intern/node_socket_declarations.cc
@@ -509,7 +509,8 @@ bool Shader::can_connect(const bNodeSocket &socket) const
}
/* Basic types can convert to shaders, but not the other way around. */
if (in_out_ == SOCK_IN) {
- return ELEM(socket.type, SOCK_VECTOR, SOCK_RGBA, SOCK_FLOAT, SOCK_INT, SOCK_BOOLEAN);
+ return ELEM(
+ socket.type, SOCK_VECTOR, SOCK_RGBA, SOCK_FLOAT, SOCK_INT, SOCK_BOOLEAN, SOCK_SHADER);
}
return socket.type == SOCK_SHADER;
}
More information about the Bf-blender-cvs
mailing list