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:
-rw-r--r--source/blender/nodes/intern/node_exec.c3
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c2
-rw-r--r--source/blender/nodes/texture/node_texture_util.c18
3 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 0893d2022a0..9529e087b2e 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -160,7 +160,6 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
bNode **nodelist;
int totnodes, n;
/* XXX texnodes have threading issues with muting, have to disable it there ... */
- bool use_muting = (ntree->type != NTREE_TEXTURE);
/* ensure all sock->link pointers and node levels are correct */
ntreeUpdateTree(G.main, ntree);
@@ -184,7 +183,7 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo
for (sock = node->inputs.first; sock; sock = sock->next)
node_init_input_index(sock, &index);
- if (use_muting && (node->flag & NODE_MUTED || node->type == NODE_REROUTE)) {
+ if (node->flag & NODE_MUTED || node->type == NODE_REROUTE) {
for (sock = node->outputs.first; sock; sock = sock->next)
node_init_output_index(sock, &index, &node->internal_links);
}
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;