From d273ddfd4ffa646323592eb5204891fca502cf37 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 23 Oct 2012 14:07:32 +0000 Subject: [PATCH] Bugfix 30974 - Disabled "Quick Cache" option. It was causing ridiculous updates on the entire animation system for start-end frame on every user event causing changes here (like during transform). Worst was that you couldn't transform animated objects for that reason either. Most of the code is still there, waiting for a moment to revise it... - Constraint "Follow Track" (marker) wasn't using inverse matrix code in transform, making it wacko to use (wrong pivot, crazyspace) --- .../bl_ui/properties_physics_common.py | 2 +- source/blender/blenkernel/intern/object.c | 22 ++----------------- source/blender/blenkernel/intern/pointcache.c | 2 ++ source/blender/blenkernel/intern/scene.c | 6 +---- .../editors/transform/transform_conversions.c | 1 + 5 files changed, 7 insertions(+), 26 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index b94df3148a9..405e877d1e2 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -133,7 +133,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): row.prop(cache, "frame_end") if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT'}: row.prop(cache, "frame_step") - row.prop(cache, "use_quick_cache") + if cachetype != 'SMOKE': layout.label(text=cache.info) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index daada283a70..212f4187d89 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2696,26 +2696,8 @@ void BKE_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 ? - min_ii(scene->physics_settings.quick_cache_step, pid->cache->step) : - pid->cache->step; - } - } - - BLI_freelistN(&pidlist); + + /* quick cache removed */ } /* the no-group proxy case, we call update */ diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 5fe9bfdd4bc..8162696c485 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2826,6 +2826,8 @@ PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old return ptcaches_new->first; } +/* Disabled this code; this is being called on scene_update_tagged, and that in turn gets called on + every user action changing stuff, and then it runs a complete bake??? (ton) */ /* Baking */ void BKE_ptcache_quick_cache_all(Main *bmain, Scene *scene) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index bc33b9da093..ddf8b330ba1 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1042,7 +1042,7 @@ void BKE_scene_update_tagged(Main *bmain, Scene *scene) /* flush recalc flags to dependencies */ DAG_ids_flush_tagged(bmain); - scene->physics_settings.quick_cache_step = 0; + /* removed calls to quick_cache, see pointcache.c */ /* clear "LIB_DOIT" flag from all materials, to prevent infinite recursion problems later * when trying to find materials with drivers that need evaluating [#32017] @@ -1065,10 +1065,6 @@ void BKE_scene_update_tagged(Main *bmain, Scene *scene) BKE_animsys_evaluate_animdata(scene, &scene->id, adt, ctime, 0); } - /* quick point cache updates */ - if (scene->physics_settings.quick_cache_step) - BKE_ptcache_quick_cache_all(bmain, scene); - /* notify editors and python about recalc */ BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST); DAG_ids_check_recalc(bmain, scene, FALSE); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index c74faf53ced..54c38ba2d53 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4506,6 +4506,7 @@ static short constraints_list_needinv(TransInfo *t, ListBase *list) if (con->type == CONSTRAINT_TYPE_FOLLOWPATH) return 1; if (con->type == CONSTRAINT_TYPE_CLAMPTO) return 1; if (con->type == CONSTRAINT_TYPE_OBJECTSOLVER) return 1; + if (con->type == CONSTRAINT_TYPE_FOLLOWTRACK) return 1; /* constraints that require this only under special conditions */ if (con->type == CONSTRAINT_TYPE_ROTLIKE) {