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:
authorBastien Montagne <montagne29@wanadoo.fr>2011-09-07 09:40:12 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-09-07 09:40:12 +0400
commitbac64b39e91f9da10f2b79db8fafecaf9c45a4e7 (patch)
tree58e40312855dfaf9d367ec6e23a9e1faed968426 /source/blender/nodes/intern/node_socket.c
parentc64336390569a344f972ce41d8a1fb96d3c9c38f (diff)
parent9161d3ce4bdd7c838751462b47eb045ea33a686e (diff)
Merging r39948 through r39988 from trunk into vgroup_modifiers.vgroup_modifiers
Diffstat (limited to 'source/blender/nodes/intern/node_socket.c')
-rw-r--r--source/blender/nodes/intern/node_socket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c
index 3ea34dd094a..aabaf5b86de 100644
--- a/source/blender/nodes/intern/node_socket.c
+++ b/source/blender/nodes/intern/node_socket.c
@@ -422,7 +422,11 @@ static void verify_socket_template_list(bNodeTree *ntree, bNode *node, int in_ou
void node_verify_socket_templates(bNodeTree *ntree, bNode *node)
{
bNodeType *ntype= node->typeinfo;
- if(ntype) {
+ /* XXX Small trick: don't try to match socket lists when there are no templates.
+ * This also prevents group node sockets from being removed, without the need to explicitly
+ * check the node type here.
+ */
+ if(ntype && ((ntype->inputs && ntype->inputs[0].type>=0) || (ntype->outputs && ntype->outputs[0].type>=0))) {
verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs);
verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs);
}