[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43558] branches/bmesh/blender/source/ blender: replace CDDM_calc_normals_mapping with CDDM_calc_normals when used within modifiers .

Campbell Barton ideasman42 at gmail.com
Fri Jan 20 14:26:02 CET 2012


Revision: 43558
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43558
Author:   campbellbarton
Date:     2012-01-20 13:25:54 +0000 (Fri, 20 Jan 2012)
Log Message:
-----------
replace CDDM_calc_normals_mapping with CDDM_calc_normals when used within modifiers.
this way modifiers wont be calculating tessface's which CDDM_calc_normals_mapping will do if not already calculated.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_collision.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_particleinstance.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_particlesystem.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_remesh.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_screw.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_surface.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_util.c

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -1779,7 +1779,7 @@
 		}
 
 		if (update_normals)
-			CDDM_calc_normals_mapping(result);
+			CDDM_calc_normals(result);
 	}
 	/* make a copy of dm to use as brush data */
 	if (pmd->brush) {

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -195,7 +195,7 @@
 	result = BME_bmesh_to_derivedmesh(bm,derivedData);
 	BME_free_mesh(bm);
 
-	CDDM_calc_normals_mapping(result);
+	CDDM_calc_normals(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -88,7 +88,7 @@
 
 	if(result)
 	{
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 		return result;
 	}
 	return dm;

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_collision.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_collision.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_collision.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -132,7 +132,7 @@
 		unsigned int numverts = 0;
 
 		CDDM_apply_vert_coords(dm, vertexCos);
-		CDDM_calc_normals_mapping(dm);
+		CDDM_calc_normals(dm);
 		
 		current_time = BKE_curframe(md->scene);
 		

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -153,7 +153,7 @@
 	result = edgesplitModifier_do(emd, ob, derivedData);
 
 	if(result != derivedData)
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -953,7 +953,7 @@
 	/* finalization */
 	CDDM_calc_edges_tessface(explode);
 	CDDM_tessfaces_to_faces(explode);
-	CDDM_calc_normals_mapping(explode);
+	CDDM_calc_normals(explode);
 
 	if(psmd->psys->lattice){
 		end_latt_deform(psmd->psys->lattice);

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -311,7 +311,7 @@
 	CDDM_apply_vert_normals(dm, (short (*)[3])normals);
 	MEM_freeN(normals);
 
-	// CDDM_calc_normals_mapping(result);
+	// CDDM_calc_normals(result);
 
 	return dm;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -402,7 +402,7 @@
 
 	/* why is this needed? - campbell */
 	/* recalculate normals */
-	CDDM_calc_normals_mapping(result);
+	CDDM_calc_normals(result);
 	
 	/* free hashes */
 	BLI_ghash_free(vertHash, NULL, NULL);

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -320,7 +320,7 @@
 	result = mirrorModifier__doMirror(mmd, ob, derivedData);
 
 	if(result != derivedData)
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 	
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -541,7 +541,7 @@
 	result = doOcean(md, ob, derivedData, 0);
 
 	if(result != derivedData)
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_particleinstance.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_particleinstance.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_particleinstance.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -304,7 +304,6 @@
 	}
 
 	CDDM_calc_edges_tessface(result);
-	CDDM_calc_normals_mapping(result);
 
 	if(psys->lattice){
 		end_latt_deform(psys->lattice);
@@ -315,6 +314,7 @@
 		MEM_freeN(size);
 
 	CDDM_tessfaces_to_faces(result); /*builds ngon faces from tess (mface) faces*/
+	CDDM_calc_normals(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_particlesystem.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_particlesystem.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_particlesystem.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -166,7 +166,7 @@
 	/* make new dm */
 	psmd->dm=CDDM_copy(dm, 0);
 	CDDM_apply_vert_coords(psmd->dm, vertexCos);
-	CDDM_calc_normals_mapping(psmd->dm);
+	CDDM_calc_normals(psmd->dm);
 
 	if(needsFree){
 		dm->needsFree = 1;

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_remesh.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_remesh.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_remesh.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -187,18 +187,18 @@
 	MEM_freeN(output);
 
 	CDDM_calc_edges_tessface(result);
-	CDDM_calc_normals_mapping(result);
 
 	/* BMESH_TODO - create polygons */
 
 #if 0
 
+	CDDM_calc_normals(result);
 	return result;
 
 #else /* BMESH ONLY */
 
 	dm = CDDM_copy(result, 1); /*builds ngon faces from tess (mface) faces*/
-	CDDM_calc_normals_mapping(dm);
+	CDDM_calc_normals(dm);
 	result->needsFree = 1;
 	result->release(result);
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_screw.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_screw.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_screw.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -906,7 +906,7 @@
 
 	if((ltmd->flag & MOD_SCREW_NORMAL_CALC) == 0) {
 		/* BMESH_TODO, we only need to get vertex normals here, this is way overkill */
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 	}
 
 	return result;

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -696,8 +696,7 @@
 	
 	/* must recalculate normals with vgroups since they can displace unevenly [#26888] */
 	if(dvert) {
-		/* BMESH_TODO, we only need to get vertex normals here, this is way overkill */
-		CDDM_calc_normals_mapping(result);
+		CDDM_calc_normals(result);
 	}
 
 	return result;

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_surface.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_surface.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_surface.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -116,7 +116,7 @@
 		MVert *x, *v;
 
 		CDDM_apply_vert_coords(surmd->dm, vertexCos);
-		CDDM_calc_normals_mapping(surmd->dm);
+		CDDM_calc_normals(surmd->dm);
 		
 		numverts = surmd->dm->getNumVerts ( surmd->dm );
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_util.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_util.c	2012-01-20 13:14:14 UTC (rev 43557)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_util.c	2012-01-20 13:25:54 UTC (rev 43558)
@@ -173,7 +173,7 @@
 	}
 
 	if(dm)
-		CDDM_calc_normals_mapping(dm);
+		CDDM_calc_normals(dm);
 	
 	return dm;
 }
@@ -190,7 +190,7 @@
 
 		if(vertexCos) {
 			CDDM_apply_vert_coords(dm, vertexCos);
-			//CDDM_calc_normals_mapping(dm);
+			//CDDM_calc_normals(dm);
 		}
 		
 		if(orco)



More information about the Bf-blender-cvs mailing list