[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24325] branches/sculpt25/source/blender/ blenkernel/intern/cdderivedmesh.c: Sculpt: don' t create DM face normals in sculpt mode, only update them if

Brecht Van Lommel brecht at blender.org
Wed Nov 4 21:40:15 CET 2009


Revision: 24325
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24325
Author:   blendix
Date:     2009-11-04 21:40:15 +0100 (Wed, 04 Nov 2009)

Log Message:
-----------
Sculpt: don't create DM face normals in sculpt mode, only update them if
they exist already, to save memory.

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

Modified: branches/sculpt25/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/sculpt25/source/blender/blenkernel/intern/cdderivedmesh.c	2009-11-04 20:36:38 UTC (rev 24324)
+++ branches/sculpt25/source/blender/blenkernel/intern/cdderivedmesh.c	2009-11-04 20:40:15 UTC (rev 24325)
@@ -464,14 +464,8 @@
 }
 
 	if(cddm->pbvh) {
-		float (*face_nors)[3];
+		float (*face_nors)[3] = CustomData_get_layer(&dm->faceData, CD_NORMAL);
 
-		/* make a face normal layer if not present */
-		face_nors = CustomData_get_layer(&dm->faceData, CD_NORMAL);
-		if(!face_nors)
-			face_nors = CustomData_add_layer(&dm->faceData, CD_NORMAL, CD_CALLOC,
-											 NULL, dm->numFaceData);
-
 		BLI_pbvh_update(cddm->pbvh, PBVH_UpdateNormals|PBVH_UpdateDrawBuffers,
 			face_nors);
 





More information about the Bf-blender-cvs mailing list