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
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-05-08 19:14:59 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-05-08 19:14:59 +0400
commit817d308803dc1234e9e7b4cab782c0f52a4ebaca (patch)
tree6e2026434273fcd350bf6bebe0b7b3b52290a3a8 /source
parente20bff4b60a496f553ba68994ecf1a4e2627fb81 (diff)
Fix #31350, by Sergey Sharybin.
This happens because of how output node index is initializing in assign_index function: itterator goes to the beginning of the nodes list using node->prev and then reviews the whole node list to find first unused index. The problem is that node's initialization now is getting called before node was added to node tree, so all output nodes have got equal index.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 07122a1ec4d..a25cd0d3b38 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -339,15 +339,15 @@ bNode *nodeAddNode(bNodeTree *ntree, struct bNodeTemplate *ntemp)
node_add_sockets_from_type(ntree, node, ntype);
- if (ntype->initfunc!=NULL)
- ntype->initfunc(ntree, node, ntemp);
-
/* initialize the node name with the node label */
BLI_strncpy(node->name, nodeLabel(node), NODE_MAXSTR);
nodeUniqueName(ntree, node);
BLI_addtail(&ntree->nodes, node);
+ if (ntype->initfunc!=NULL)
+ ntype->initfunc(ntree, node, ntemp);
+
ntree->update |= NTREE_UPDATE_NODES;
return node;