diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-08 18:21:39 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-08 18:21:39 +0300 |
commit | 657e02106a48baf8c8c1525909907b87b6ee845e (patch) | |
tree | b25b4f575388ffc7275abe463a39dfbb2a1cbe34 /source | |
parent | 17975400e0e406b3e222a02c1a6d742a04563faf (diff) |
Depsgraph: always execute scene camera as if it was on a visible layer,
because even if it is not it can still affect the 3d view or render.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 0c9248c1eb9..c59569d88f1 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1925,15 +1925,33 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time) sce->theDag->time++; // so we know which nodes were accessed lasttime= sce->theDag->time; - + /* update layer flags in nodes */ for(base= sce->base.first; base; base= base->next) { node= dag_get_node(sce->theDag, base->object); - if(node) - node->scelay= base->object->lay; - else - node->scelay= 0; + node->scelay= base->object->lay; + } + + /* ensure cameras are set as if they are on a visible layer, because + they ared still used for rendering or setting the camera view */ + if(sce->camera) { + node= dag_get_node(sce->theDag, sce->camera); + node->scelay= lay; } +#ifdef DURIAN_CAMERA_SWITCH + { + TimeMarker *m; + + for(m= sce->markers.first; m; m= m->next) { + if(m->camera) { + node= dag_get_node(sce->theDag, m->camera); + node->scelay= lay; + } + } + } +#endif + + /* flush layer nodes to dependencies */ for(itA = firstnode->child; itA; itA= itA->next) if(itA->node->lasttime!=lasttime && itA->node->type==ID_OB) flush_layer_node(sce, itA->node, lasttime); |