diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-09-06 20:32:51 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-09-06 20:32:51 +0400 |
commit | 884fc84793be1c5fdd6643ad267331381f8e1c6b (patch) | |
tree | d67444faa3372fd92b4a5cc37a41b7281a0ba2c2 /source/blender/blenkernel/intern | |
parent | e79d16270bc29f44431689fdb1b362b1866ab8c3 (diff) |
Fix for multiple parallel group node executions.
This would previously break because begin/end functions for each tree type still have some checks of the ntree->execdata pointer in them, despite the intended use of execdata instances instead of trees themselves for execution data storage. This is an artifact of the old execution system that required these checks to be made in the functions to avoid multiple execution of top-level trees. Now these functions take an additional argument, so group nodes can prevent them from setting and checking the nodetree->execdata pointers.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 36631d5af90..aab8e1abbea 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -926,7 +926,7 @@ void init_render_material(Material *mat, int r_mode, float *amb) init_render_nodetree(mat->nodetree, mat, r_mode, amb); if (!mat->nodetree->execdata) - mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree); + mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree, 1); } } @@ -960,7 +960,7 @@ void end_render_material(Material *mat) { if(mat && mat->nodetree && mat->use_nodes) { if (mat->nodetree->execdata) - ntreeShaderEndExecTree(mat->nodetree->execdata); + ntreeShaderEndExecTree(mat->nodetree->execdata, 1); } } diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 481893b86a8..cd1a6e61151 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -897,13 +897,13 @@ void ntreeFreeTree(bNodeTree *ntree) if (ntree->execdata) { switch (ntree->type) { case NTREE_COMPOSIT: - ntreeCompositEndExecTree(ntree->execdata); + ntreeCompositEndExecTree(ntree->execdata, 1); break; case NTREE_SHADER: - ntreeShaderEndExecTree(ntree->execdata); + ntreeShaderEndExecTree(ntree->execdata, 1); break; case NTREE_TEXTURE: - ntreeTexEndExecTree(ntree->execdata); + ntreeTexEndExecTree(ntree->execdata, 1); break; } } diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 6119a855366..38165182d83 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -767,7 +767,7 @@ Tex *copy_texture(Tex *tex) if(tex->nodetree) { if (tex->nodetree->execdata) { - ntreeTexEndExecTree(tex->nodetree->execdata); + ntreeTexEndExecTree(tex->nodetree->execdata, 1); } texn->nodetree= ntreeCopyTree(tex->nodetree); } |