[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59219] branches/ soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c : code clean up: removing deprecated comments from BM_mesh_data_copy() and BM_mesh_multi_layer_copy()

Walid Shouman eng.walidshouman at gmail.com
Sat Aug 17 21:15:06 CEST 2013


Revision: 59219
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59219
Author:   walid
Date:     2013-08-17 19:15:06 +0000 (Sat, 17 Aug 2013)
Log Message:
-----------
code clean up: removing deprecated comments from BM_mesh_data_copy() and BM_mesh_multi_layer_copy()

Modified Paths:
--------------
    branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c

Modified: branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c
===================================================================
--- branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c	2013-08-17 17:05:44 UTC (rev 59218)
+++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c	2013-08-17 19:15:06 UTC (rev 59219)
@@ -2211,7 +2211,6 @@
 						dw_dst = defvert_verify_index(dv_dst, dst_grp_ind);	//use this to have a weight for the group assuming
 																			//the vert may haven't been assigned in advance
 						weight_accu = 0;
-//						BM_ITER_ELEM_INDEX (v2, &fiter2, f_src, BM_VERTS_OF_FACE, a) {
 						for (a = 0; a < l_weights[b].count; a++) {
 							float weight = l_weights[b].l_w[a].weight;
 
@@ -2359,7 +2358,6 @@
 			BMFace *fa, *fb, *f_n;
 			BMEdge *e;
 			BMIter eiter;
-//			BM_UV_per_face_mapping *fuv_table = MEM_mallocN(sizeof(*fuv_table) * bm_dst->totface, "fuv_table bmesh_data_transfer.c");
 			//store the loop groups per vertex ... for a single island mesh each vertex would have a single l_grp
 			BM_loop_group_pool *v_l_grp = MEM_mallocN(sizeof(*v_l_grp) * bm_dst->totvert, "v_l_grp bmesh_data_transfer.c");
 			float (*uv_buffer)[2] = MEM_mallocN(sizeof(*uv_buffer) * exp_loop_per_vert_double, "uv_buffer bmesh_data_transfer.c");
@@ -2392,10 +2390,6 @@
 				}
 			}
 
-/*			BM_ITER_MESH_INDEX (f_src, &fiter, bm_src, BM_FACES_OF_MESH, b) {
-				fl_table[b].l = MEM_mallocN(sizeof(*(fl_table[b].l)) * exp_dst_loops_per_src_face, "fl_table.l bmesh_data_transfer.c");
-			}
-*/
 			for (src_lay_iter = src_lay_start, dst_lay_iter = dst_lay_start; src_lay_iter <= src_lay_end;
 				src_lay_iter++, dst_lay_iter++) {
 
@@ -2422,7 +2416,6 @@
 						b++;
 
 						//end of interpolation
-//						copy_v2_v2(fuv_table[f_dst->head.index].uv[c], BM_ELEM_CD_GET_VOID_P(l, CD_dst));
 					}
 				}
 
@@ -2578,8 +2571,6 @@
 
 			MEM_freeN(v_l_grp);
 
-//			MEM_freeN(fuv_table);
-
 			MEM_freeN(uv_buffer);
 			MEM_freeN(f_src_table);
 
@@ -2676,7 +2667,6 @@
 	BMFace *fa, *fb, *f_n;
 	BMEdge *e;
 	BMIter eiter;
-//			BM_UV_per_face_mapping *fuv_table = MEM_mallocN(sizeof(*fuv_table) * bm_dst->totface, "fuv_table bmesh_data_transfer.c");
 	//store the loop groups per vertex ... for a single island mesh each vertex would have a single l_grp
 	BM_loop_group_pool *v_l_grp = MEM_mallocN(sizeof(*v_l_grp) * bm_dst->totvert, "v_l_grp bmesh_data_transfer.c");
 	float (*uv_buffer)[2] = MEM_mallocN(sizeof(*uv_buffer) * exp_loop_per_vert_double, "uv_buffer bmesh_data_transfer.c");
@@ -2769,8 +2759,6 @@
 				int fs_ind = f_src->head.index;
 
 				if (fl_table[fs_ind].f == NULL) {	//if the face source reperesnts a new entry
-//					f_src_table[f_src_count] = f_src;
-//					f_src_count++;
 					fl_table[fs_ind].count = 0;	//this init to take into account coming from another layer
 
 					if (f_dst->len > exp_dst_loops_per_src_face)
@@ -2848,57 +2836,7 @@
 				b++;
 			}
 		}
-//----- we shall remove this part into a separate function
-		//take the bm_src, bm_dst, layers, the type and the (void *weights)
-/*
-		for (src_lay_iter = src_lay_start, dst_lay_iter = dst_lay_start; src_lay_iter <= src_lay_end;
-			src_lay_iter++, dst_lay_iter++) {
 
-			//fix the layer index of the source & dest
-			CD_src = CustomData_get_n_offset(&bm_src->ldata, CD_MLOOPCOL, src_lay_iter);
-			CD_dst = CustomData_get_n_offset(&bm_dst->ldata, CD_MLOOPCOL, dst_lay_iter);
-
-			b = 0;
-			//the way we do it is by looping over each face!!
-			BM_ITER_MESH (f_dst, &fiter, bm_dst, BM_FACES_OF_MESH) {
-
-				BM_ITER_ELEM (l, &liter, f_dst, BM_LOOPS_OF_FACE) {
-					MLoopCol *lcol = BM_ELEM_CD_GET_VOID_P(l, CD_dst);
-					MLoopCol lcol_out;
-
-					// Interpolating according to the spatially found weights
-					lcol_out.a = 0;
-					lcol_out.b = 0;
-					lcol_out.g = 0;
-					lcol_out.r = 0;
-
-					for (a = 0; a < l_weights[b].count; a++) {
-						MLoopCol *lcol2 = BM_ELEM_CD_GET_VOID_P(l_weights[b].l_w->l, CD_src);
-						float weight = l_weights[b].l_w[a].weight;
-
-						//there's no madd_v4_v4fl for char!
-						lcol_out.a += (lcol2->a * weight);
-						lcol_out.b += (lcol2->b * weight);
-						lcol_out.g += (lcol2->g * weight);
-						lcol_out.r += (lcol2->r * weight);
-					}
-
-					//shall we verify the indices!?
-					//there's no copy_v4_v4 for char!
-					lcol->a = lcol_out.a;
-					lcol->b = lcol_out.b;
-					lcol->g = lcol_out.g;
-					lcol->r = lcol_out.r;
-
-					//end of interpolation
-
-					b++;
-				}
-			}
-
-		}
-*/
-//====end of separated part
 		switch (type) {
 			case CD_MLOOPCOL:
 			{
@@ -2922,7 +2860,6 @@
 			}
 		}
 
-
 		//pure garpage collection part
 
 		BKE_bmbvh_free(bmtree_src);
@@ -3092,9 +3029,6 @@
 																								//have faces within the radius range!!
 						}
 
-						//deprecated comment
-						///fork from here to map each vertex into the projection
-
 						//we should be so cautious about reallocating extra memory in loops!!
 						if (f_src->len > exp_vert_per_face) {
 							if (f_src->len > v_src_max_count) {
@@ -3422,7 +3356,6 @@
 						copy_v2_v2(BM_ELEM_CD_GET_VOID_P(l, CD_dst), weight_accu);
 
 						//end of interpolation
-//						copy_v2_v2(fuv_table[f_dst->head.index].uv[b], BM_ELEM_CD_GET_VOID_P(l, CD_dst));
 					}
 				}
 
@@ -3585,8 +3518,6 @@
 
 				MEM_freeN(v_l_grp);
 
-//				MEM_freeN(fuv_table);
-
 				MEM_freeN(uv_buffer);
 				MEM_freeN(f_src_table);
 




More information about the Bf-blender-cvs mailing list