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:
Diffstat (limited to 'source/blender/nodes/intern/node_common.c')
-rw-r--r--source/blender/nodes/intern/node_common.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index fe11318c29d..b8c89d1db37 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -127,7 +127,7 @@ static bNodeSocket *group_verify_socket(
bNodeSocket *sock;
for (sock = verify_lb->first; sock; sock = sock->next) {
- if (sock->typeinfo == iosock->typeinfo && STREQ(sock->identifier, iosock->identifier)) {
+ if (STREQ(sock->identifier, iosock->identifier)) {
break;
}
}
@@ -137,6 +137,13 @@ static bNodeSocket *group_verify_socket(
const int mask = SOCK_HIDE_VALUE;
sock->flag = (sock->flag & ~mask) | (iosock->flag & mask);
+ /* Update socket type if necessary */
+ if (sock->typeinfo != iosock->typeinfo) {
+ nodeModifySocketType(ntree, gnode, sock, iosock->idname);
+ /* Flag the tree to make sure link validity is updated after type changes. */
+ ntree->update |= NTREE_UPDATE_LINKS;
+ }
+
if (iosock->typeinfo->interface_verify_socket) {
iosock->typeinfo->interface_verify_socket(ntree, iosock, gnode, sock, "interface");
}