Bugfix for [#17561] when i try to change the particle to hair I cant choose group or object as viz; Bugfix for mat[4][4] equal to zero resulting in no duplis --> Important: Janne could you check that fixes?

This commit is contained in:
Daniel Genrich
2008-09-10 15:25:06 +00:00
parent bd518b8de6
commit 3bf182c4b4
2 changed files with 8 additions and 7 deletions

View File

@@ -783,6 +783,10 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
hair= (totchild == 0 || psys->childcache) && psys->pathcache;
if(!hair)
return;
/* we use cache, update totchild according to cached data */
totchild = psys->totchildcache;
totpart = psys->totcached;
}
psys->lattice = psys_get_lattice(par, psys);
@@ -865,6 +869,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Object *par, float par_
}
VECCOPY(pamat[3], cache->co);
pamat[3][3]= 1.0f;
}
else if(step_nbr) {
/* other keys */

View File

@@ -3866,14 +3866,9 @@ void psys_get_dupli_path_transform(Object *ob, ParticleSystem *psys, ParticleSys
Mat4MulMat4(mat, obrotmat, qmat);
}
else {
Crossf(side, nor, vec);
Normalize(side);
Crossf(nor, vec, side);
Normalize(nor);
Mat4One(mat);
VECCOPY(mat[0], vec);
VECCOPY(mat[1], side);
VECCOPY(mat[2], nor);
VECCOPY(mat[2], nor); // mat[2] is normal/direction
}
*scale= len;