[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15045] branches/apricot/source/blender/ blenkernel/intern:

Brecht Van Lommel brechtvanlommel at pandora.be
Thu May 29 11:23:18 CEST 2008


Revision: 15045
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15045
Author:   blendix
Date:     2008-05-29 11:23:18 +0200 (Thu, 29 May 2008)

Log Message:
-----------

Small fix to derivedmesh for snapping: don't create origindex for
editmesh derivedmesh since it's not being filled correct anyway.

Modified Paths:
--------------
    branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c
    branches/apricot/source/blender/blenkernel/intern/cdderivedmesh.c

Modified: branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c	2008-05-29 09:00:49 UTC (rev 15044)
+++ branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c	2008-05-29 09:23:18 UTC (rev 15045)
@@ -189,10 +189,6 @@
 void DM_init(DerivedMesh *dm,
              int numVerts, int numEdges, int numFaces)
 {
-	CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, numVerts);
-	CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges);
-	CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, numFaces);
-
 	dm->numVertData = numVerts;
 	dm->numEdgeData = numEdges;
 	dm->numFaceData = numFaces;

Modified: branches/apricot/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/cdderivedmesh.c	2008-05-29 09:00:49 UTC (rev 15044)
+++ branches/apricot/source/blender/blenkernel/intern/cdderivedmesh.c	2008-05-29 09:23:18 UTC (rev 15045)
@@ -850,6 +850,10 @@
 
 	DM_init(dm, numVerts, numEdges, numFaces);
 
+	CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, numVerts);
+	CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, numEdges);
+	CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, numFaces);
+
 	CustomData_add_layer(&dm->vertData, CD_MVERT, CD_CALLOC, NULL, numVerts);
 	CustomData_add_layer(&dm->edgeData, CD_MEDGE, CD_CALLOC, NULL, numEdges);
 	CustomData_add_layer(&dm->faceData, CD_MFACE, CD_CALLOC, NULL, numFaces);
@@ -871,6 +875,11 @@
 	 * with an exception for fluidsim */
 
 	DM_init(dm, mesh->totvert, mesh->totedge, mesh->totface);
+
+	CustomData_add_layer(&dm->vertData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totvert);
+	CustomData_add_layer(&dm->edgeData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totedge);
+	CustomData_add_layer(&dm->faceData, CD_ORIGINDEX, CD_CALLOC, NULL, mesh->totface);
+
 	dm->deformedOnly = 1;
 
 	if(ob && ob->fluidsimSettings && ob->fluidsimSettings->meshSurface)





More information about the Bf-blender-cvs mailing list