Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-02 18:57:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-02 18:57:12 +0400
commitd4340289a61821b83e54b007fda3752f8ba82fbc (patch)
tree40d0ab5160a507ff53e2cf532c87307f093e63a4 /source/blender/blenkernel/intern/scene.c
parent70540fca3bfa90d21531c84e42aa7a4f74b52826 (diff)
Set Scenes and Physics
- objects in a set scene now are evaluated with the frame from the current scene. - pointcache now loops over all set scene objects.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index c258f2d47b7..fc6b7e7d789 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -891,10 +891,12 @@ float frame_to_float (Scene *scene, int cfra) /* see also bsystem_time in objec
return ctime;
}
-static void scene_update_newframe(Scene *scene, unsigned int lay)
+static void scene_update_newframe(Scene *scene, int cfra, unsigned int lay)
{
Base *base;
Object *ob;
+ int cfra_back= scene->r.cfra;
+ scene->r.cfra= cfra;
for(base= scene->base.first; base; base= base->next) {
ob= base->object;
@@ -910,6 +912,8 @@ static void scene_update_newframe(Scene *scene, unsigned int lay)
// base->lay= ob->lay;
//}
}
+
+ scene->r.cfra= cfra_back;
}
/* this is called in main loop, doing tagged updates before redraw */
@@ -956,10 +960,6 @@ void scene_update_tagged(Scene *scene)
/* XXX - this is called far to often, should be made apart of the depgraph */
BKE_ptcache_quick_cache_all(scene);
- sce= scene;
- while((sce= sce->set))
- BKE_ptcache_quick_cache_all(sce);
-
/* in the future this should handle updates for all datablocks, not
only objects and scenes. - brecht */
}
@@ -994,10 +994,11 @@ void scene_update_for_newframe(Scene *sce, unsigned int lay)
/* sets first, we allow per definition current scene to have dependencies on sets */
- for(sce_iter= sce->set; sce_iter; sce_iter= sce_iter->set)
- scene_update_newframe(sce_iter, lay);
+ for(sce_iter= sce->set; sce_iter; sce_iter= sce_iter->set) {
+ scene_update_newframe(sce_iter, sce->r.cfra, lay);
+ }
- scene_update_newframe(sce, lay);
+ scene_update_newframe(sce, sce->r.cfra, lay);
}
/* return default layer, also used to patch old files */