Material nodes: when no output node was active, it sets one.
Not common to happen anymore, only for deleting output nodes
without clicking on nodes.
This commit is contained in:
Ton Roosendaal
2011-07-09 17:03:35 +00:00
parent c50b5ee320
commit de10ffab75

View File

@@ -2418,6 +2418,11 @@ void ntreeBeginExecTree(bNodeTree *ntree)
if(ntree->type==NTREE_COMPOSIT)
composit_begin_exec(ntree, ntree->stack);
/* ensures only a single output node is enabled, texnode allows multiple though */
if(ntree->type!=NTREE_TEXTURE)
ntreeSetOutput(ntree);
}
ntree->init |= NTREE_EXEC_INIT;
@@ -2765,9 +2770,6 @@ void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
/* fixed seed, for example noise texture */
BLI_srandom(rd->cfra);
/* ensures only a single output node is enabled */
ntreeSetOutput(ntree);
/* sets need_exec tags in nodes */
curnode = totnode= setExecutableNodes(ntree, &thdata);