diff options
author | Ton Roosendaal <ton@blender.org> | 2009-04-17 14:38:10 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-04-17 14:38:10 +0400 |
commit | 80e40d504c457ed3041fed925a6b3f80f54dffe1 (patch) | |
tree | 4e3f0cdfa82904277f9e9359dd0a5e54eabb0ce5 /source/blender/nodes | |
parent | 6761cc00d4f79f603a7e52b33e0aad26e210cbd2 (diff) |
bugfix #18287
Texture nodes hang when nodes have a cyclic case.
Added a (temp?) provision to tag node->need_exec zero for cyclic
nodes, and added check for this in texture nodes.
There was also a bug in 'tag changed' for texture nodes, which not
only tagged, but also called the tree exec (should not happen!).
In general the texture exec needs recode; it doesn't use the stacks
as provided per node, but recurses itself to previous nodes, giving
problems like this. Node execs should only do their own bizz, the
node system handles dependency and eval order nicely already.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_texture.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/TEX_util.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c index 884d2cd0eb6..30492b84764 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_texture.c @@ -47,7 +47,7 @@ static void colorfn(float *out, float *coord, bNode *node, bNodeStack **in, shor Tex *nodetex = (Tex *)node->id; - if(node->custom2) { + if(node->custom2 || node->need_exec==0) { /* this node refers to its own texture tree! */ QUATCOPY( out, diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c index 562072328a8..1aabb7ae514 100644 --- a/source/blender/nodes/intern/TEX_util.c +++ b/source/blender/nodes/intern/TEX_util.c @@ -34,6 +34,12 @@ obtain a colour value from this, a node further up the chain reads the TexDelegate* from its input stack, and uses tex_call_delegate to retrieve the colour from the delegate. + + comments: (ton) + + This system needs recode, a node system should rely on the stack, and + callbacks for nodes only should evaluate own node, not recursively go + over other previous ones. */ #include <assert.h> @@ -43,7 +49,8 @@ void tex_call_delegate(TexDelegate *dg, float *out, float *coord, short thread) { - dg->fn(out, coord, dg->node, dg->in, thread); + if(dg->node->need_exec) + dg->fn(out, coord, dg->node, dg->in, thread); } void tex_input(float *out, int sz, bNodeStack *in, float *coord, short thread) |