diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-04-14 00:06:55 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-04-14 00:06:55 +0400 |
commit | 953d938ad19bc1dd81267ceb97e418fd84957532 (patch) | |
tree | 261dce022487b300b58910aa4a67ff65a494a3cf /source/blender/blenkernel/intern/scene.c | |
parent | 18fb3aa5bfc2d5cdf0f5319bf59e3c6a82ea33dd (diff) |
Testing for the need to quick cache was causing slowdowns on files with many duplis.
* The test is now only done when some object that uses cache has actually changed.
* The added scene->physics_settings->quick_cache_step is only an internal counter, not a user changeable value.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index fc6b7e7d789..e5d9686a18d 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -924,6 +924,8 @@ void scene_update_tagged(Scene *scene) Object *ob; float ctime = frame_to_float(scene, scene->r.cfra); + scene->physics_settings.quick_cache_step= 0; + /* update all objects: drivers, matrices, displists, etc. flags set by depgraph or manual, no layer check here, gets correct flushed */ @@ -957,8 +959,8 @@ void scene_update_tagged(Scene *scene) BKE_animsys_evaluate_animdata(&scene->id, adt, ctime, 0); } - /* XXX - this is called far to often, should be made apart of the depgraph */ - BKE_ptcache_quick_cache_all(scene); + if(scene->physics_settings.quick_cache_step) + BKE_ptcache_quick_cache_all(scene); /* in the future this should handle updates for all datablocks, not only objects and scenes. - brecht */ |