[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31736] trunk/blender/source/blender/ blenkernel/intern/anim.c: Fix for [#19950] Object Particles and texture controlled density

Janne Karhu jhkarh at gmail.com
Fri Sep 3 08:18:23 CEST 2010


Revision: 31736
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31736
Author:   jhk
Date:     2010-09-03 08:18:23 +0200 (Fri, 03 Sep 2010)

Log Message:
-----------
Fix for [#19950] Object Particles and texture controlled density
* The hair strands that were cut based on the texture weren't properly checked for in the duplication code.

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	2010-09-03 06:12:40 UTC (rev 31735)
+++ trunk/blender/source/blender/blenkernel/intern/anim.c	2010-09-03 06:18:23 UTC (rev 31736)
@@ -1285,6 +1285,12 @@
 				size = psys_get_child_size(psys, cpa, ctime, 0);
 			}
 
+			/* some hair paths might be non-existent so they can't be used for duplication */
+			if(hair &&
+				((a < totpart && psys->pathcache[a]->steps < 0) ||
+				(a >= totpart && psys->childcache[a-totpart]->steps < 0)))
+				continue;
+
 			if(part->ren_as==PART_DRAW_GR) {
 				/* for groups, pick the object based on settings */
 				if(part->draw&PART_DRAW_RAND_GR)





More information about the Bf-blender-cvs mailing list