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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-30 16:23:13 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-30 16:23:13 +0400
commit515592438f0f5665cadbd12c7698554bd2b89146 (patch)
treeab1e07b6093f380661b9fca4ebf3df90e0705055 /source/blender/blenkernel/intern/scene.c
parent71446eea573db3ac6bac5f297c0655acbeada67c (diff)
Baking for dupligroup & linked library objects
- library data allows pointcache writing (hard to know how this should work long term so ifdef'd for now) - changing the frame now updates the dupligroup objects - BKE_ptcache_ids_from_object(), option to get the id's from duplis note! scene_update_tagged() is called from the main() loop, and runs BKE_ptcache_quick_cache_all(), this could become a performance issue, especially with duplis, should probably not call BKE_ptcache_quick_cache_all() all the time, even when not playing back animation. (commits 27856 by Campbell from render25 branch)
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index dd2a3143d3d..51b18800474 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -891,15 +891,18 @@ float frame_to_float (Scene *scene, int cfra) /* see also bsystem_time in objec
return ctime;
}
-static void scene_update_newframe(Scene *sce, unsigned int lay)
+static void scene_update_newframe(Scene *scene, unsigned int lay)
{
Base *base;
Object *ob;
- for(base= sce->base.first; base; base= base->next) {
+ for(base= scene->base.first; base; base= base->next) {
ob= base->object;
- object_handle_update(sce, ob); // bke_object.h
+ object_handle_update(scene, ob); // bke_object.h
+
+ if(ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
+ group_handle_recalc_and_update(scene, ob, ob->dup_group);
/* only update layer when an ipo */
// XXX old animation system
@@ -914,6 +917,7 @@ void scene_update_tagged(Scene *scene)
{
Scene *sce;
Base *base;
+ Object *ob;
float ctime = frame_to_float(scene, scene->r.cfra);
/* update all objects: drivers, matrices, displists, etc. flags set
@@ -922,12 +926,23 @@ void scene_update_tagged(Scene *scene)
/* sets first, we allow per definition current scene to have
dependencies on sets, but not the other way around. */
if(scene->set) {
- for(SETLOOPER(scene->set, base))
- object_handle_update(scene, base->object);
+ for(SETLOOPER(scene->set, base)) {
+ ob= base->object;
+
+ object_handle_update(scene, ob);
+
+ if(ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
+ group_handle_recalc_and_update(scene, ob, ob->dup_group);
+ }
}
for(base= scene->base.first; base; base= base->next) {
- object_handle_update(scene, base->object);
+ ob= base->object;
+
+ object_handle_update(scene, ob);
+
+ if(ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
+ group_handle_recalc_and_update(scene, ob, ob->dup_group);
}
/* recalc scene animation data here (for sequencer) */