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:
-rw-r--r--source/blender/nodes/intern/node_common.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/node_common.cc b/source/blender/nodes/intern/node_common.cc
index e5ec50858d9..4fcc96470c5 100644
--- a/source/blender/nodes/intern/node_common.cc
+++ b/source/blender/nodes/intern/node_common.cc
@@ -442,6 +442,11 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree)
/** \name Node #GROUP_INPUT / #GROUP_OUTPUT
* \{ */
+static bool is_group_extension_socket(const bNode *node, const bNodeSocket *socket)
+{
+ return socket->type == SOCK_CUSTOM && ELEM(node->type, NODE_GROUP_OUTPUT, NODE_GROUP_INPUT);
+}
+
static void node_group_input_init(bNodeTree *ntree, bNode *node)
{
node_group_input_update(ntree, node);
@@ -493,7 +498,7 @@ void node_group_input_update(bNodeTree *ntree, bNode *node)
* This could be improved by choosing the "best" type among all links,
* whatever that means.
*/
- if (link->tosock->type != SOCK_CUSTOM) {
+ if (!is_group_extension_socket(link->tonode, link->tosock)) {
exposelink = link;
break;
}
@@ -590,7 +595,7 @@ void node_group_output_update(bNodeTree *ntree, bNode *node)
* This could be improved by choosing the "best" type among all links,
* whatever that means.
*/
- if (link->fromsock->type != SOCK_CUSTOM) {
+ if (!is_group_extension_socket(link->fromnode, link->fromsock)) {
exposelink = link;
break;
}