[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16463] trunk/blender/source/blender/ blenkernel/intern: 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?

Daniel Genrich daniel.genrich at gmx.net
Wed Sep 10 17:25:06 CEST 2008


Revision: 16463
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16463
Author:   genscher
Date:     2008-09-10 17:25:06 +0200 (Wed, 10 Sep 2008)

Log Message:
-----------
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?

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/anim.c
    trunk/blender/source/blender/blenkernel/intern/particle.c

Modified: trunk/blender/source/blender/blenkernel/intern/anim.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim.c	2008-09-10 15:07:20 UTC (rev 16462)
+++ trunk/blender/source/blender/blenkernel/intern/anim.c	2008-09-10 15:25:06 UTC (rev 16463)
@@ -783,6 +783,10 @@
 				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 @@
 					}
 
 					VECCOPY(pamat[3], cache->co);
+					pamat[3][3]= 1.0f;
+					
 				}
 				else if(step_nbr) {
 					/* other keys */

Modified: trunk/blender/source/blender/blenkernel/intern/particle.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle.c	2008-09-10 15:07:20 UTC (rev 16462)
+++ trunk/blender/source/blender/blenkernel/intern/particle.c	2008-09-10 15:25:06 UTC (rev 16463)
@@ -3866,14 +3866,9 @@
 		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;





More information about the Bf-blender-cvs mailing list