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:
authorAntony Riakiotakis <kalast@gmail.com>2014-09-17 20:27:05 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-09-17 21:05:35 +0400
commit59a38ccc4239a407e8954abd2250a68540a84e59 (patch)
treeac8e2a51745caae3c90e83415cb9d4cb99f199c7 /source/blender/nodes/texture
parent96ac3c2f7d600a315dd88f3221a902178826567a (diff)
Fix T41761, muting not working with texture nodes
This was disabled to fix T41349, however seems that if we don't pass delegates for muted nodes everything work fine.
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c2
-rw-r--r--source/blender/nodes/texture/node_texture_util.c18
2 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index 02f15705ad1..1b790f87faf 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -140,7 +140,7 @@ static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCa
/* XXX muting disabled in previews because of threading issues with the main execution
* it works here, but disabled for consistency
*/
-#if 0
+#if 1
static void localize(bNodeTree *localtree, bNodeTree *UNUSED(ntree))
{
bNode *node, *node_next;
diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c
index e01b7ec49f1..42c684b8247 100644
--- a/source/blender/nodes/texture/node_texture_util.c
+++ b/source/blender/nodes/texture/node_texture_util.c
@@ -140,11 +140,19 @@ void tex_do_preview(bNodePreview *preview, const float coord[2], const float col
void tex_output(bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
{
TexDelegate *dg;
- if (!out->data)
- /* Freed in tex_end_exec (node.c) */
- dg = out->data = MEM_mallocN(sizeof(TexDelegate), "tex delegate");
- else
- dg = out->data;
+
+ if (node->flag & NODE_MUTED) {
+ /* do not add a delegate if the node is muted */
+ return;
+ }
+ else {
+ if (!out->data)
+ /* Freed in tex_end_exec (node.c) */
+ dg = out->data = MEM_mallocN(sizeof(TexDelegate), "tex delegate");
+ else
+ dg = out->data;
+ }
+
dg->cdata = cdata;
dg->fn = texfn;