[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16026] trunk/blender/source/blender/ blenkernel/intern/anim.c: Fix for [#16671] Moving a metaball that a particle system uses as a object ( for visualization) also moves the particles
Janne Karhu
jhkarh at utu.fi
Fri Aug 8 17:38:14 CEST 2008
Revision: 16026
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16026
Author: jhk
Date: 2008-08-08 17:38:14 +0200 (Fri, 08 Aug 2008)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/anim.c
Modified: trunk/blender/source/blender/blenkernel/intern/anim.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim.c 2008-08-08 14:24:47 UTC (rev 16025)
+++ trunk/blender/source/blender/blenkernel/intern/anim.c 2008-08-08 15:38:14 UTC (rev 16026)
@@ -734,9 +734,8 @@
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 @@
/* 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);
More information about the Bf-blender-cvs
mailing list