diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-29 13:56:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-29 13:56:52 +0400 |
commit | 837099171018c529e80a62bbd9d545e262c2aeba (patch) | |
tree | 9f1ba40f2951417571cf986a9a641f515a9abd04 /source/blender/blenkernel/intern/anim.c | |
parent | db9c14a5746bb447102b38b760d0d6d05a489f5f (diff) |
Fix for bug #9657: ipo's on the object in particle object visualisation
didn't always get correct time.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 0d91f106ed7..8533175ad37 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -733,7 +733,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ ParticleSystemModifierData *psmd; float ctime, pa_time, scale = 1.0f; float tmat[4][4], mat[4][4], obrotmat[4][4], pamat[4][4], size=0.0; - float obmat[4][4], (*obmatlist)[4][4]=0; + float (*obmat)[4]; float xvec[3] = {-1.0, 0.0, 0.0}, q[4]; int lay, a, b, k, step_nbr = 0, counter, hair = 0; int totpart, totchild, totgroup=0, pa_num; @@ -788,17 +788,12 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ } oblist= MEM_callocN(totgroup*sizeof(Object *), "dupgroup object list"); - obmatlist= MEM_callocN(totgroup*sizeof(float)*4*4, "dupgroup obmat list"); go= part->dup_group->gobject.first; - for(a=0; a<totgroup; a++, go=go->next) { + for(a=0; a<totgroup; a++, go=go->next) oblist[a]=go->ob; - Mat4CpyMat4(obmatlist[a], go->ob->obmat); - } } - else { + else ob = part->dup_ob; - Mat4CpyMat4(obmat, ob->obmat); - } if(totchild==0 || part->draw & PART_DRAW_PARENT) a=0; @@ -834,8 +829,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ b= a % totgroup; ob = oblist[b]; - Mat4CpyMat4(obmat, obmatlist[b]); + obmat= oblist[b]->obmat; } + else + obmat= ob->obmat; for(k=0; k<=step_nbr; k++, counter++) { if(hair) { @@ -871,7 +868,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ if(part->draw_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) { for(go= part->dup_group->gobject.first, b=0; go; go= go->next, b++) { - Mat4MulMat4(tmat, obmatlist[b], pamat); + Mat4MulMat4(tmat, obmat, pamat); Mat4MulFloat3((float *)tmat, size*scale); if(par_space_mat) Mat4MulMat4(mat, tmat, par_space_mat); @@ -912,8 +909,6 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ } if(oblist) MEM_freeN(oblist); - if(obmatlist) - MEM_freeN(obmatlist); if(psys->lattice) { end_latt_deform(); |