diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 00:47:03 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-01-23 00:47:03 +0400 |
commit | 8b8d4ba7effcf73d72e224d2934b6ad0f3a5ee74 (patch) | |
tree | 151f57c635fbf1c0cfade2b24552c98a41acefff /source/blender/blenkernel/intern | |
parent | 8733150ac18f68da8a45f733554fa74272fcbeea (diff) |
sim: Remove "continue physics" code
This was left over from 2.4x days and is not used anymore.
Now simulations are always interactive.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 33 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 12 |
4 files changed, 4 insertions, 45 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index fdd7dc94979..c1293542963 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -483,7 +483,7 @@ void clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob, Derived clmd->sim_parms->dt = clmd->sim_parms->timescale / clmd->sim_parms->stepsPerFrame; /* handle continuous simulation with the play button */ - if (BKE_ptcache_get_continue_physics() || ((clmd->sim_parms->preroll > 0) && (framenr > startframe - clmd->sim_parms->preroll) && (framenr < startframe))) { + if ((clmd->sim_parms->preroll > 0) && (framenr > startframe - clmd->sim_parms->preroll) && (framenr < startframe)) { BKE_ptcache_invalidate(cache); /* do simulation */ diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5eac86a7e77..fda5f6f2ecb 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4500,7 +4500,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) int startframe = 0, endframe = 100, oldtotpart = 0; /* cache shouldn't be used for hair or "continue physics" */ - if (part->type != PART_HAIR && BKE_ptcache_get_continue_physics() == 0) { + if (part->type != PART_HAIR) { psys_clear_temp_pointcache(psys); /* set suitable cache range automatically */ diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 2f21e588b85..ac4b3099ba0 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2536,7 +2536,7 @@ int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode) after= 0; if (mode == PTCACHE_RESET_DEPSGRAPH) { - if (!(cache->flag & PTCACHE_BAKED) && !BKE_ptcache_get_continue_physics()) { + if (!(cache->flag & PTCACHE_BAKED)) { after= 1; } @@ -2544,12 +2544,7 @@ int BKE_ptcache_id_reset(Scene *scene, PTCacheID *pid, int mode) cache->flag |= PTCACHE_OUTDATED; } else if (mode == PTCACHE_RESET_BAKED) { - if (!BKE_ptcache_get_continue_physics()) { - reset= 1; - clear= 1; - } - else - cache->flag |= PTCACHE_OUTDATED; + cache->flag |= PTCACHE_OUTDATED; } else if (mode == PTCACHE_RESET_OUTDATED) { reset = 1; @@ -2695,30 +2690,6 @@ void BKE_ptcache_remove(void) } } -/* Continuous Interaction */ - -static int CONTINUE_PHYSICS = 0; - -void BKE_ptcache_set_continue_physics(Main *bmain, Scene *scene, int enable) -{ - Object *ob; - - if (CONTINUE_PHYSICS != enable) { - CONTINUE_PHYSICS = enable; - - if (CONTINUE_PHYSICS == 0) { - for (ob=bmain->object.first; ob; ob=ob->id.next) - if (BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED)) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - } - } -} - -int BKE_ptcache_get_continue_physics(void) -{ - return CONTINUE_PHYSICS; -} - /* Point Cache handling */ PointCache *BKE_ptcache_add(ListBase *ptcaches) diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 79356d39235..e2c6df5e528 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -4108,18 +4108,6 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i softbody_reset(ob, sb, vertexCos, numVerts); } - /* continue physics special case */ - if (BKE_ptcache_get_continue_physics()) { - BKE_ptcache_invalidate(cache); - /* do simulation */ - dtime = timescale; - softbody_update_positions(ob, sb, vertexCos, numVerts); - softbody_step(scene, ob, sb, dtime); - softbody_to_object(ob, vertexCos, numVerts, 0); - sb->last_frame = framenr; - return; - } - /* still no points? go away */ if (sb->totpoint==0) { return; |