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:
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index ac679adb9c1..6939ff02a47 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -679,7 +679,6 @@ void *add_camera(char *name)
cam= alloc_libblock(&G.main->camera, ID_CA, name);
cam->lens= 35.0f;
- cam->angle= 49.14f;
cam->clipsta= 0.1f;
cam->clipend= 100.0f;
cam->drawsize= 0.5f;
@@ -2489,6 +2488,8 @@ void object_handle_update(Scene *scene, Object *ob)
ID *data_id= (ID *)ob->data;
AnimData *adt= BKE_animdata_from_id(data_id);
float ctime= (float)scene->r.cfra; // XXX this is bad...
+ ListBase pidlist;
+ PTCacheID *pid;
if (G.f & G_DEBUG)
printf("recalcdata %s\n", ob->id.name+2);
@@ -2577,6 +2578,24 @@ void object_handle_update(Scene *scene, Object *ob)
psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated;
}
}
+
+ /* check if quick cache is needed */
+ BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if((pid->cache->flag & PTCACHE_BAKED)
+ || (pid->cache->flag & PTCACHE_QUICK_CACHE)==0)
+ continue;
+
+ if(pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID)==0) {
+ scene->physics_settings.quick_cache_step =
+ scene->physics_settings.quick_cache_step ?
+ MIN2(scene->physics_settings.quick_cache_step, pid->cache->step) :
+ pid->cache->step;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
}
/* the no-group proxy case, we call update */