diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-04 15:59:09 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-04 15:59:09 +0300 |
commit | 24fa1d1f0434fe1c1a44cdcbe8537f37c0132749 (patch) | |
tree | 083efe4f464563dc8acdc5b6cc4d7ef4b02e6f4b /source | |
parent | 5b6223fdeb413d0c99cfe800e8cef81b44f001d2 (diff) |
Two additional fixes for node-tree + texture paint:
- "need exec" flag was cleared in wrong tree for preview renders
(it should clear it in the copy, i did in original).
This fixes projection paint on images with previews open
- Previews for nodes were copied always, now only for previews
invoked by node editor itself.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 27 |
2 files changed, 16 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 3cc2c673e8e..46a7b9cbeec 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2815,14 +2815,14 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree) /* end animdata uglyness */ /* ensures only a single output node is enabled */ - ntreeSetOutput(ntree); + ntreeSetOutput(ltree); for(node= ntree->nodes.first; node; node= node->next) { /* store new_node pointer to original */ node->new_node->new_node= node; /* ensure new user input gets handled ok */ - node->need_exec= 0; + node->new_node->need_exec= 0; if(ntree->type==NTREE_COMPOSIT) { /* move over the compbufs */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 1a454341f01..33f81bb7d16 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -983,19 +983,20 @@ static void shader_preview_updatejob(void *spv) ShaderPreview *sp= spv; if(sp->id) { - if( GS(sp->id->name) == ID_MA) { - Material *mat= (Material *)sp->id; - - if(sp->matcopy && mat->nodetree && sp->matcopy->nodetree) - ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree); - } - else if( GS(sp->id->name) == ID_TE) { - Tex *tex= (Tex *)sp->id; - - if(sp->texcopy && tex->nodetree && sp->texcopy->nodetree) - ntreeLocalSync(sp->texcopy->nodetree, tex->nodetree); - } - + if(sp->pr_method==PR_NODE_RENDER) { + if( GS(sp->id->name) == ID_MA) { + Material *mat= (Material *)sp->id; + + if(sp->matcopy && mat->nodetree && sp->matcopy->nodetree) + ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree); + } + else if( GS(sp->id->name) == ID_TE) { + Tex *tex= (Tex *)sp->id; + + if(sp->texcopy && tex->nodetree && sp->texcopy->nodetree) + ntreeLocalSync(sp->texcopy->nodetree, tex->nodetree); + } + } } } |