[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43546] branches/bmesh/blender/source/ blender/modifiers/intern/MOD_solidify.c: skip converting non CDDM type derived meshes for solidify modifier.

Campbell Barton ideasman42 at gmail.com
Fri Jan 20 00:51:46 CET 2012


Revision: 43546
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43546
Author:   campbellbarton
Date:     2012-01-19 23:51:40 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
skip converting non CDDM type derived meshes for solidify modifier.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-19 23:34:53 UTC (rev 43545)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-19 23:51:40 UTC (rev 43546)
@@ -204,7 +204,7 @@
 						int UNUSED(isFinalCalc))
 {
 	int i;
-	DerivedMesh *result, *odm = dm;
+	DerivedMesh *result;
 	const SolidifyModifierData *smd = (SolidifyModifierData*) md;
 
 	MVert *mv, *mvert, *orig_mvert;
@@ -246,19 +246,14 @@
 	int defgrp_index;
 
 	modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index);
-	
-	if (!CDDM_Check(dm)) {
-		DerivedMesh *dm2 = CDDM_copy(dm, 0);
-		dm = dm2;
-	}
-	
+
 	numLoops = dm->numLoopData;
 	newLoops = 0;
 	
-	orig_mvert = CDDM_get_verts(dm);
-	orig_medge = CDDM_get_edges(dm);
-	orig_mloop = CDDM_get_loops(dm);
-	orig_mpoly = CDDM_get_polys(dm);
+	orig_mvert = dm->getVertArray(dm);
+	orig_medge = dm->getEdgeArray(dm);
+	orig_mloop = dm->getLoopArray(dm);
+	orig_mpoly = dm->getPolyArray(dm);
 
 	if(smd->flag & MOD_SOLIDIFY_RIM) {
 		EdgeHash *edgehash = BLI_edgehash_new();
@@ -704,12 +699,7 @@
 		/* BMESH_TODO, we only need to get vertex normals here, this is way overkill */
 		CDDM_calc_normals_mapping(result);
 	}
-	
-	if (dm != odm) {
-		dm->needsFree = 1;
-		dm->release(dm);
-	}
-	
+
 	return result;
 }
 



More information about the Bf-blender-cvs mailing list