[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45959] trunk/blender/source/blender/ blenkernel/intern/mesh_validate.c: mesh.validate() / BKE_mesh_validate() --- functions now check for duplicate vertices used within the same polygon .
Campbell Barton
ideasman42 at gmail.com
Wed Apr 25 09:23:21 CEST 2012
Revision: 45959
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45959
Author: campbellbarton
Date: 2012-04-25 07:23:20 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
mesh.validate() / BKE_mesh_validate() --- functions now check for duplicate vertices used within the same polygon.
(which would crash otherwise)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/mesh_validate.c
Modified: trunk/blender/source/blender/blenkernel/intern/mesh_validate.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/mesh_validate.c 2012-04-25 06:28:45 UTC (rev 45958)
+++ trunk/blender/source/blender/blenkernel/intern/mesh_validate.c 2012-04-25 07:23:20 UTC (rev 45959)
@@ -240,9 +240,23 @@
PRINT(" loop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v);
sp->invalid = TRUE;
}
+
+ mverts[ml->v].flag |= ME_VERT_TMP_TAG;
*v = ml->v;
}
+ /* is the same vertex used more then once */
+ if (!sp->invalid) {
+ v = sp->verts;
+ for (j = 0; j < mp->totloop; j++, v++) {
+ if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) {
+ PRINT(" poly %u has duplicate vert reference at corner (%u)\n", i, j);
+ sp->invalid = TRUE;
+ }
+ mverts[*v].flag &= ~ME_VERT_TMP_TAG;
+ }
+ }
+
if (sp->invalid)
continue;
More information about the Bf-blender-cvs
mailing list