diff options
author | Janne Karhu <jhkarh@gmail.com> | 2008-08-08 19:38:14 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2008-08-08 19:38:14 +0400 |
commit | 3832af90d717c7beb52bccb7d78ac88063fc5865 (patch) | |
tree | 107deae6be1f08190b36ed3cd69c96d7d64124e2 /source/blender | |
parent | 6501ff6bddeb6b2b95086d5ac95bbd330806c860 (diff) |
Fix for [#16671] Moving a metaball that a particle system uses as a object (for visualization) also moves the particles
-The particle dupliobjects were using the objects trackflag in combination with it's rotation causing strange behavior. Now the trackflag is ignored and only the rotation of the object being duplicated is taken into account.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 1f8dd74a6eb..1592c3e5504 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -734,9 +734,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ ParticleCacheKey *cache; 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 tmat[4][4], mat[4][4], pamat[4][4], size=0.0; float (*obmat)[4], (*oldobmat)[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; @@ -898,14 +897,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_ /* to give ipos in object correct offset */ where_is_object_time(ob, ctime-pa_time); - if(!hair) { - vectoquat(xvec, ob->trackflag, ob->upflag, q); - QuatToMat4(q, obrotmat); - obrotmat[3][3]= 1.0f; - Mat4MulMat4(mat, obrotmat, pamat); - } - else - Mat4CpyMat4(mat, pamat); + Mat4CpyMat4(mat, pamat); Mat4MulMat4(tmat, obmat, mat); Mat4MulFloat3((float *)tmat, size*scale); |