[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43191] branches/bmesh/blender/source/ blender: rename CDDM_calc_normals() --> CDDM_calc_normals_mapping

Campbell Barton ideasman42 at gmail.com
Fri Jan 6 01:12:26 CET 2012


Revision: 43191
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43191
Author:   campbellbarton
Date:     2012-01-06 00:12:24 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
rename CDDM_calc_normals() --> CDDM_calc_normals_mapping

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/BKE_cdderivedmesh.h
    branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
    branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/bmesh/blender/source/blender/blenkernel/intern/displist.c
    branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_build.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/BKE_cdderivedmesh.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/BKE_cdderivedmesh.h	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/blenkernel/BKE_cdderivedmesh.h	2012-01-06 00:12:24 UTC (rev 43191)
@@ -99,7 +99,7 @@
 
 /* recalculates vertex and face normals for a CDDerivedMesh
  */
-void CDDM_calc_normals(struct DerivedMesh *dm);
+void CDDM_calc_normals_mapping(struct DerivedMesh *dm);
 
 /* calculates edges for a CDDerivedMesh (from face data)
  * this completely replaces the current edge data in the DerivedMesh

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -700,7 +700,7 @@
 	if (vertCos)
 		CDDM_apply_vert_coords(dm, vertCos);
 
-	CDDM_calc_normals(dm);
+	CDDM_calc_normals_mapping(dm);
 
 	return dm;
 }
@@ -817,7 +817,7 @@
 		if(free) MEM_freeN(orco);
 	}
 
-	CDDM_calc_normals(dm);
+	CDDM_calc_normals_mapping(dm);
 
 	return dm;
 }
@@ -1238,7 +1238,7 @@
 			
 			if(deformedVerts) {
 				CDDM_apply_vert_coords(*deform_r, deformedVerts);
-				CDDM_calc_normals(*deform_r);
+				CDDM_calc_normals_mapping(*deform_r);
 			}
 		}
 	} else {
@@ -1322,7 +1322,7 @@
 				/* XXX, this covers bug #23673, but we may need normal calc for other types */
 				if(dm && dm->type == DM_TYPE_CDDM) {
 					CDDM_apply_vert_coords(dm, deformedVerts);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				}
 			}
 
@@ -1344,7 +1344,7 @@
 					dm = tdm;
 
 					CDDM_apply_vert_coords(dm, deformedVerts);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				}
 			} else {
 				dm = CDDM_from_mesh(me, ob);
@@ -1354,7 +1354,7 @@
 
 				if(deformedVerts) {
 					CDDM_apply_vert_coords(dm, deformedVerts);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				}
 
 				/* Constructive modifiers need to have an origindex
@@ -1473,7 +1473,7 @@
 		dm->release(dm);
 
 		CDDM_apply_vert_coords(finaldm, deformedVerts);
-		CDDM_calc_normals(finaldm);
+		CDDM_calc_normals_mapping(finaldm);
 
 		if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
 			add_weight_mcol_dm(ob, finaldm, draw_flag);
@@ -1495,7 +1495,7 @@
 		}
 
 		if(recalc_normals)
-			CDDM_calc_normals(finaldm);
+			CDDM_calc_normals_mapping(finaldm);
 		
 		if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
 			add_weight_mcol_dm(ob, finaldm, draw_flag);
@@ -1531,7 +1531,7 @@
 	finaldm->recalcTesselation(finaldm);
 	/* if we have no modifiers applied we'lll still want the tessface normals
 	 * to be calculated from the polygon noramals,
-	 * 'CDDM_calc_normals' checks for this case - campbell */
+	 * 'CDDM_calc_normals_mapping' checks for this case - campbell */
 	finaldm->calcNormals(finaldm);
 	/* Need to watch this, it can cause issues, see bug [#29338]             */
 	/* take care with this block, we really need testing frameworks          */
@@ -1657,7 +1657,7 @@
 					dm = tdm;
 
 					CDDM_apply_vert_coords(dm, deformedVerts);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				} else if(cage_r && dm == *cage_r) {
 					/* dm may be changed by this modifier, so we need to copy it
 					 */
@@ -1669,7 +1669,7 @@
 
 				if(deformedVerts) {
 					CDDM_apply_vert_coords(dm, deformedVerts);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				}
 			}
 
@@ -1747,7 +1747,7 @@
 		if(!(cage_r && dm == *cage_r)) dm->release(dm);
 
 		CDDM_apply_vert_coords(*final_r, deformedVerts);
-		CDDM_calc_normals(*final_r);
+		CDDM_calc_normals_mapping(*final_r);
 	} else if (dm) {
 		*final_r = dm;
 		(*final_r)->calcNormals(*final_r); /* BMESH_ONLY - BMESH_TODO. check if this is needed */

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/cdderivedmesh.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -1653,7 +1653,7 @@
 	dm->getEdgeDataArray = DM_get_edge_data_layer;
 	dm->getTessFaceDataArray = DM_get_tessface_data_layer;
 
-	dm->calcNormals = CDDM_calc_normals;
+	dm->calcNormals = CDDM_calc_normals_mapping;
 	dm->recalcTesselation = CDDM_recalc_tesselation;
 
 	dm->getVertCos = cdDM_getVertCos;
@@ -2226,7 +2226,7 @@
 		copy_v3_v3_short(vert->no, vertNormals[i]);
 }
 
-void CDDM_calc_normals(DerivedMesh *dm)
+void CDDM_calc_normals_mapping(DerivedMesh *dm)
 {
 	CDDerivedMesh *cddm = (CDDerivedMesh*)dm;
 	float (*face_nors)[3] = NULL;
@@ -2259,9 +2259,9 @@
 	
 	/* calculate face normals */
 	mesh_calc_normals_mapping_ex(cddm->mvert, dm->numVertData, CDDM_get_loops(dm), CDDM_get_polys(dm),
-	                     dm->numLoopData, dm->numPolyData, NULL, cddm->mface, dm->numTessFaceData,
-	                     CustomData_get_layer(&dm->faceData, CD_POLYINDEX), face_nors,
-	                     only_face_normals);
+	                             dm->numLoopData, dm->numPolyData, NULL, cddm->mface, dm->numTessFaceData,
+	                             CustomData_get_layer(&dm->faceData, CD_POLYINDEX), face_nors,
+	                             only_face_normals);
 	
 	CustomData_add_layer(&dm->faceData, CD_NORMAL, CD_ASSIGN, 
 		face_nors, dm->numTessFaceData);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/displist.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/displist.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/displist.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -891,7 +891,7 @@
 					dm = tdm;
 
 					CDDM_apply_vert_coords(dm, vertCos);
-					CDDM_calc_normals(dm);
+					CDDM_calc_normals_mapping(dm);
 				}
 			} else {
 				if (vertCos) {
@@ -904,7 +904,7 @@
 
 				dm= CDDM_from_curve_customDB(ob, dispbase);
 
-				CDDM_calc_normals(dm);
+				CDDM_calc_normals_mapping(dm);
 			}
 
 			if (vertCos) {
@@ -932,7 +932,7 @@
 			dm = tdm;
 
 			CDDM_apply_vert_coords(dm, vertCos);
-			CDDM_calc_normals(dm);
+			CDDM_calc_normals_mapping(dm);
 			MEM_freeN(vertCos);
 		} else {
 			displist_apply_allverts(dispbase, vertCos);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -1534,7 +1534,7 @@
 	else return;
 
 	if (update_normals)
-		CDDM_calc_normals(result);
+		CDDM_calc_normals_mapping(result);
 }
 
 /*
@@ -1742,7 +1742,7 @@
 							normal_short_to_float_v3(normal, mvert[i].no);
 							madd_v3_v3fl(mvert[i].co, normal, wPoint[i].height);
 						}
-						CDDM_calc_normals(result);
+						CDDM_calc_normals_mapping(result);
 					}
 
 					/* displace */

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -409,7 +409,7 @@
 	result = arrayModifier_doArray(amd, md->scene, ob, dm, 0);
 
 	//if(result != dm)
-	//	CDDM_calc_normals(result);
+	//	CDDM_calc_normals_mapping(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_bevel.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -195,7 +195,7 @@
 	result = BME_bmesh_to_derivedmesh(bm,derivedData);
 	BME_free_mesh(bm);
 
-	CDDM_calc_normals(result);
+	CDDM_calc_normals_mapping(result);
 
 	return result;
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_build.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_build.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_build.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -278,7 +278,7 @@
 		}
 	}
 
-	CDDM_calc_normals(result);
+	CDDM_calc_normals_mapping(result);
 	
 	BLI_ghash_free(vertHash, NULL, NULL);
 	BLI_ghash_free(edgeHash, NULL, NULL);

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c	2012-01-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_cloth.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -88,7 +88,7 @@
 
 	if(result)
 	{
-		CDDM_calc_normals(result);
+		CDDM_calc_normals_mapping(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-06 00:08:37 UTC (rev 43190)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_collision.c	2012-01-06 00:12:24 UTC (rev 43191)
@@ -132,7 +132,7 @@
 		unsigned int numverts = 0;
 
 		CDDM_apply_vert_coords(dm, vertexCos);
-		CDDM_calc_normals(dm);
+		CDDM_calc_normals_mapping(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-06 00:08:37 UTC (rev 43190)

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list