[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39383] branches/soc-2011-avocado/blender/ source/blender/editors/mesh/autoseam_tools.c: Tabification of autoseam_tools file.

shuvro sarker shuvro05 at gmail.com
Sun Aug 14 07:25:11 CEST 2011


Revision: 39383
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39383
Author:   shuvro
Date:     2011-08-14 05:25:11 +0000 (Sun, 14 Aug 2011)
Log Message:
-----------
Tabification of autoseam_tools file.

Modified Paths:
--------------
    branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c

Modified: branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
===================================================================
--- branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c	2011-08-14 05:18:11 UTC (rev 39382)
+++ branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c	2011-08-14 05:25:11 UTC (rev 39383)
@@ -128,11 +128,11 @@
 	BMFace *face;
 	BMIter face_iter;
 	
-    
+	
 	int i=0;
 	for(face = BMIter_New(&face_iter, bm, BM_FACES_OF_MESH, NULL); face; face= BMIter_Step(&face_iter))
 	{
-        BM_SetIndex(face,i++);
+		BM_SetIndex(face,i++);
 	}
 }
 
@@ -162,44 +162,44 @@
 			
 			BM_ITER(loop, &face_iter, bm, BM_LOOPS_OF_EDGE, edge) {
 				
-                /* Only create adjacency matrix for the selected faces */
-                if (BM_TestHFlag(loop->f, BM_SELECT) && BM_TestHFlag(loop->radial_next->f, BM_SELECT)){ 
-                    if(!combinatorial){
-                        autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, 1.0);
-                        min_value = 1.0;
-                    }
-                    else{
-                        float dx, dy, dz;
-                        BM_Compute_Face_Center(bm, loop->f, poly_centres[0]);
-                        BM_Compute_Face_Center(bm, loop->radial_next->f, poly_centres[1]);
+				/* Only create adjacency matrix for the selected faces */
+				if (BM_TestHFlag(loop->f, BM_SELECT) && BM_TestHFlag(loop->radial_next->f, BM_SELECT)){ 
+					if(!combinatorial){
+						autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, 1.0);
+						min_value = 1.0;
+					}
+					else{
+						float dx, dy, dz;
+						BM_Compute_Face_Center(bm, loop->f, poly_centres[0]);
+						BM_Compute_Face_Center(bm, loop->radial_next->f, poly_centres[1]);
 					
-                        dx = poly_centres[0][0] - poly_centres[1][0];
-                        dy = poly_centres[0][1] - poly_centres[1][1];
-                        dz = poly_centres[0][2] - poly_centres[1][2];
-                        edge_length = sqrt(dx*dx + dy*dy + dz*dz);
+						dx = poly_centres[0][0] - poly_centres[1][0];
+						dy = poly_centres[0][1] - poly_centres[1][1];
+						dz = poly_centres[0][2] - poly_centres[1][2];
+						edge_length = sqrt(dx*dx + dy*dy + dz*dz);
 					
-                        if(num_faces != -1){
-                            int is_first_index = find_element_in_array(loop->f->head.index, faces, num_faces);
+						if(num_faces != -1){
+							int is_first_index = find_element_in_array(loop->f->head.index, faces, num_faces);
 						
-                            if(is_first_index >= 0){
-                                int is_second_index = find_element_in_array(loop->radial_next->f->head.index, faces, num_faces);
+							if(is_first_index >= 0){
+								int is_second_index = find_element_in_array(loop->radial_next->f->head.index, faces, num_faces);
 							
-                                if(is_second_index >= 0){
+								if(is_second_index >= 0){
 								
-                                    autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, edge_length);
-                                    if(edge_length < min_value) min_value = edge_length;
+									autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, edge_length);
+									if(edge_length < min_value) min_value = edge_length;
 
-                                }
-                            }
+								}
+							}
 						
-                        }
-                        else{
-                            autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, edge_length);
-                            if(edge_length < min_value) min_value = edge_length;
-                        }
-                    }
-                    
-                }
+						}
+						else{
+							autoseam_set_adjacent(adj, loop->f->head.index, loop->radial_next->f->head.index, edge_length);
+							if(edge_length < min_value) min_value = edge_length;
+						}
+					}
+					
+				}
 
 			}
 		}
@@ -420,31 +420,31 @@
 	int *fplus, *fminus;
 	unsigned int nplus, nminus;
 
-    		
+			
 	AUTOSEAM_Adjacency adj_plus;
 	AUTOSEAM_Adjacency adj_minus;
 
-    if(stretch < 0.0){
+	if(stretch < 0.0){
 		
 		stretch = FLT_MAX;
-    }
+	}
 	
-    /**
+	/**
 	 * Currently we are using total stretch.
 	 * One can use average stretch and maximum stretch also.
 	 * Corresponding functions are written at the top.
 	 */
-    else{
-        //float temp = total_stretch_of_mesh(C);
+	else{
+		//float temp = total_stretch_of_mesh(C);
 		float temp = average_stretch_of_mesh(C);
 		
 		/* stretch is increasing, so stop here*/
-        if(temp > stretch) {
+		if(temp > stretch) {
 			
 			return 0;
 		}
 		else stretch = temp;
-    }
+	}
 
 	if(!recursion_depth) {
 		autoseam_delete_adjacency(adj);
@@ -513,7 +513,7 @@
 	
 	/* recursive calls for two parts of the mesh. */
 	if(nplus > 0){
-        //can we construct PChart for this part and calculate strectch for that part?
+		//can we construct PChart for this part and calculate strectch for that part?
 		generate_seam_recursive(bm, adj_plus, adj_big, recursion_depth, C, stretch);
 
 	}
@@ -530,7 +530,7 @@
 
 static int generate_seam_exec(bContext *C, wmOperator *op)
 {
- 	AUTOSEAM_Adjacency adj;
+	AUTOSEAM_Adjacency adj;
 	int maxdepth= RNA_int_get(op->ptr, "depth");
 	int is_combinatorial = RNA_boolean_get(op->ptr, "is_combinatorial");
 	int method = RNA_enum_get(op->ptr, "method");
@@ -545,7 +545,7 @@
 	BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
 	BMesh *bm = em->bm;
 	
-    if(!(bm->totfacesel)) {
+	if(!(bm->totfacesel)) {
 		BKE_report(op->reports, RPT_WARNING, "No selected face found.");
 		return OPERATOR_CANCELLED;
 	}




More information about the Bf-blender-cvs mailing list