diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-03 00:04:33 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-03 00:04:33 +0300 |
commit | 85f089f3b951c110cd70f9864ba2536119d54453 (patch) | |
tree | 70f9f46946aeb9cabf606a1486092224c0c41e5b /source/blender/blenkernel | |
parent | 0cba8b906a85d16c837b35e41a49d2be1622b908 (diff) |
Node render: a fix in threading, groups had a stack counter issue... :)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index c729fb094ad..246f214df61 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1214,7 +1214,7 @@ static void node_group_execute(bNodeStack *stack, void *data, bNode *gnode, bNod /* recursively called for groups */ /* we set all trees on own local indices, but put a total counter in the groups, so each instance of a group has own stack */ -static int ntree_begin_exec_tree(bNodeTree *ntree, int totindex) +static int ntree_begin_exec_tree(bNodeTree *ntree) { bNode *node; bNodeSocket *sock; @@ -1240,9 +1240,9 @@ static int ntree_begin_exec_tree(bNodeTree *ntree, int totindex) if(node->type==NODE_GROUP) { if(node->id) { - node->stack_index= totindex; - totindex+= ntree_begin_exec_tree((bNodeTree *)node->id, totindex); - + node->stack_index= index; + index+= ntree_begin_exec_tree((bNodeTree *)node->id); + /* copy internal data from internal nodes to own input sockets */ for(sock= node->inputs.first; sock; sock= sock->next) { if(sock->tosock) { @@ -1253,7 +1253,7 @@ static int ntree_begin_exec_tree(bNodeTree *ntree, int totindex) } } - return totindex + index; + return index; } /* stack indices make sure all nodes only write in allocated data, for making it thread safe */ @@ -1267,7 +1267,7 @@ void ntreeBeginExecTree(bNodeTree *ntree) int index; /* goes recursive over all groups */ - index= ntree_begin_exec_tree(ntree, 0); + index= ntree_begin_exec_tree(ntree); if(index) { bNodeStack *ns; |