[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43649] branches/bmesh/blender/source/ blender/blenkernel/intern/bvhutils.c: assertion when bvhtree_from_mesh_faces is called and tessfaces dont exist.

Campbell Barton ideasman42 at gmail.com
Mon Jan 23 21:46:48 CET 2012


Revision: 43649
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43649
Author:   campbellbarton
Date:     2012-01-23 20:46:38 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
assertion when bvhtree_from_mesh_faces is called and tessfaces dont exist.

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

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/bvhutils.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/bvhutils.c	2012-01-23 19:53:23 UTC (rev 43648)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/bvhutils.c	2012-01-23 20:46:38 UTC (rev 43649)
@@ -574,6 +574,13 @@
 		int i;
 		int numFaces= mesh->getNumTessFaces(mesh);
 
+		/* BMESH spesific check that we have tessfaces,
+		 * we _could_ tesselate here but rather not - campbell
+		 *
+		 * this assert checks we have tessfaces,
+		 * if not caller should use DM_ensure_tessface() */
+		BLI_assert(!(numFaces == 0 && mesh->getNumPolys(mesh) != 0));
+
 		if(numFaces != 0)
 		{
 			/* Create a bvh-tree of the given target */



More information about the Bf-blender-cvs mailing list