diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-07 19:41:57 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-07 19:41:57 +0300 |
commit | 5c421c328e963fe27725e6961e60de74cca87c7f (patch) | |
tree | 040cbd47b5368116f1fdcdb945e7d2a75c099569 /source/blender/blenkernel/intern/node.c | |
parent | 831ce612e95c7addc387a398e4952bef31752377 (diff) |
Todo/feature request
When using masks or other simple 3D elements in composites, doing
a layer re-rendering on a node is a bit clumsy all the time.
This commit does two things to help:
- new hotkey "Z" in node editor automatically finds render layer
that changed and re-renders it + composites
- option "Auto Render" does same, but then after every transform
edit in 3D window
The latter is experimental; real & proper system for this requires
full threaded render support (like previews). But it works!
Demo file:
http://download.blender.org/demo/test/auto_composite.blend
Important fix:
After any render, all the render layers were tagged "changed", which
caused any edit to first totally recomposte everthing. Now it only
composites changes.
Implementation notes
- DAG scene flush now sets 'changed' flags in render layer nodes
- Added notifier for 'transform finished' to trigger the update,
this is temporarily.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index f6487bf1d19..69f01633192 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3182,10 +3182,7 @@ int ntreeCompositTagAnimated(bNodeTree *ntree) NodeTagChanged(ntree, node); tagged= 1; } - else if(node->type==CMP_NODE_R_LAYERS) { - NodeTagChanged(ntree, node); - tagged= 1; - } + /* here was tag render layer, but this is called after a render, so re-composites fail */ else if(node->type==NODE_GROUP) { if( ntreeCompositTagAnimated((bNodeTree *)node->id) ) { NodeTagChanged(ntree, node); @@ -3210,6 +3207,21 @@ void ntreeCompositTagGenerators(bNodeTree *ntree) } } +/* XXX after render animation system gets a refresh, this call allows composite to end clean */ +void ntreeClearTags(bNodeTree *ntree) +{ + bNode *node; + + if(ntree==NULL) return; + + for(node= ntree->nodes.first; node; node= node->next) { + node->need_exec= 0; + if(node->type==NODE_GROUP) + ntreeClearTags((bNodeTree *)node->id); + } +} + + int ntreeTexTagAnimated(bNodeTree *ntree) { bNode *node; |