diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-03-22 15:53:18 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-03-22 15:53:18 +0300 |
commit | 4c3899ca09fd6b8d8acb70aa28148cf348794003 (patch) | |
tree | b661385f329c820990257a163b171f48802a6d7e /source | |
parent | a2acecc9d2624e3ae1b7a78b600caa0fa8a2d059 (diff) |
Fixing the particle emitter interpolation (#25385 & #26493) further
* The interpolation should only be done if the dynamics were calculated, since otherwise animation keys can't be set after parenting.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 9e57ad24648..088ab78ce47 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1577,7 +1577,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime, part=psys->part; /* get precise emitter matrix if particle is born */ - if(part->type!=PART_HAIR && pa->time < cfra && pa->time >= sim->psys->cfra) { + if(part->type!=PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) { /* we have to force RECALC_ANIM here since where_is_objec_time only does drivers */ while(ob) { BKE_animsys_evaluate_animdata(&ob->id, ob->adt, pa->time, ADT_RECALC_ANIM); @@ -4334,17 +4334,19 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) } } + if(psys->cfra < cfra) { + /* make sure emitter is left at correct time (particle emission can change this) */ + while(ob) { + BKE_animsys_evaluate_animdata(&ob->id, ob->adt, cfra, ADT_RECALC_ANIM); + ob = ob->parent; + } + ob = sim.ob; + where_is_object_time(scene, ob, cfra); + } + psys->cfra = cfra; psys->recalc = 0; - /* make sure emitter is left at correct time (particle emission can change this) */ - while(ob) { - BKE_animsys_evaluate_animdata(&ob->id, ob->adt, cfra, ADT_RECALC_ANIM); - ob = ob->parent; - } - ob = sim.ob; - where_is_object_time(scene, ob, cfra); - /* save matrix for duplicators, at rendertime the actual dupliobject's matrix is used so don't update! */ if(psys->renderdata==0) invert_m4_m4(psys->imat, ob->obmat); |