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.
This commit is contained in:
2011-03-04 12:59:09 +00:00
parent 5b6223fdeb
commit 24fa1d1f04
2 changed files with 16 additions and 15 deletions

View File

@@ -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 */

View File

@@ -983,6 +983,7 @@ static void shader_preview_updatejob(void *spv)
ShaderPreview *sp= spv;
if(sp->id) {
if(sp->pr_method==PR_NODE_RENDER) {
if( GS(sp->id->name) == ID_MA) {
Material *mat= (Material *)sp->id;
@@ -995,7 +996,7 @@ static void shader_preview_updatejob(void *spv)
if(sp->texcopy && tex->nodetree && sp->texcopy->nodetree)
ntreeLocalSync(sp->texcopy->nodetree, tex->nodetree);
}
}
}
}