[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43704] branches/bmesh/blender/source/ blender/blenkernel/intern/particle_system.c: particle system now ensures tessfaces are available.

Campbell Barton ideasman42 at gmail.com
Thu Jan 26 01:16:22 CET 2012


Revision: 43704
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43704
Author:   campbellbarton
Date:     2012-01-26 00:16:14 +0000 (Thu, 26 Jan 2012)
Log Message:
-----------
particle system now ensures tessfaces are available.

now sintels heir works in the 3D viewport, (need to work on subsurf next)

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c	2012-01-25 23:59:28 UTC (rev 43703)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c	2012-01-26 00:16:14 UTC (rev 43704)
@@ -1071,6 +1071,10 @@
 		distr=PART_DISTR_RAND;
 		BLI_srandom(31415926 + psys->seed + psys->child_seed);
 		dm= finaldm;
+
+		/* BMESH ONLY */
+		DM_ensure_tessface(dm);
+
 		children=1;
 
 		tree=BLI_kdtree_new(totpart);
@@ -1092,6 +1096,11 @@
 		
 		dm= CDDM_from_mesh((Mesh*)ob->data, ob);
 
+		/* BMESH ONLY, for verts we dont care about tessfaces */
+		if (from != PART_FROM_VERT) {
+			DM_ensure_tessface(dm);
+		}
+
 		/* we need orco for consistent distributions */
 		DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
 



More information about the Bf-blender-cvs mailing list