[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44058] branches/bmesh/blender/source/ blender/bmesh: indentation cleanup

Campbell Barton ideasman42 at gmail.com
Sun Feb 12 12:58:41 CET 2012


Revision: 44058
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44058
Author:   campbellbarton
Date:     2012-02-12 11:58:41 +0000 (Sun, 12 Feb 2012)
Log Message:
-----------
indentation cleanup

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_construct.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_inline.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_interp.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_structure.h
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers_impl.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_bevel.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_connect.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_create.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_dissolve.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_dupe.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_extrude.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_primitive.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_subdivide.c
    branches/bmesh/blender/source/blender/bmesh/operators/bmo_triangulate.c

Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h	2012-02-12 11:56:47 UTC (rev 44057)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h	2012-02-12 11:58:41 UTC (rev 44058)
@@ -180,10 +180,12 @@
 #define BMO_elem_flag_clear(bm, element, oflag) (((BMHeader*)(element))->flags[bm->stackdepth-1].f &= ~(oflag))
 #define BMO_elem_flag_toggle(bm, element, oflag) (((BMHeader*)(element))->flags[bm->stackdepth-1].f ^= (oflag))
 
-/*profiling showed a significant amount of time spent in BMO_elem_flag_test
+/* profiling showed a significant amount of time spent in BMO_elem_flag_test */
+#if 0
 void BMO_elem_flag_set(struct BMesh *bm, void *element, const short oflag);
 void BMO_elem_flag_clear(struct BMesh *bm, void *element, const short oflag);
-int BMO_elem_flag_test(struct BMesh *bm, void *element, const short oflag);*/
+int BMO_elem_flag_test(struct BMesh *bm, void *element, const short oflag);
+#endif
 
 /* count the number of elements with a specific flag.
  * type can be a bitmask of BM_FACE, BM_EDGE, or BM_FACE. */
@@ -249,7 +251,7 @@
 /* copies the data of a slot from one operator to another.  src and dst are the
  * source/destination slot codes, respectively. */
 void BMO_slot_copy(struct BMOperator *source_op, struct BMOperator *dest_op,
-                  const char *src, const char *dst);
+                   const char *src, const char *dst);
 
 /* remove tool flagged elements */
 void BMO_remove_tagged_faces(struct BMesh *bm, const short oflag);
@@ -337,11 +339,11 @@
 #if 0
 
 BM_INLINE void BMO_slot_map_insert(BMesh *bm, BMOperator *op, const char *slotname,
-                                  void *element, void *data, int len);
+                                   void *element, void *data, int len);
 
 /* inserts a key/float mapping pair into a mapping slot. */
 BM_INLINE void BMO_slot_map_float_insert(BMesh *bm, BMOperator *op, const char *slotname,
-                                   void *element, float val);
+                                         void *element, float val);
 
 /* returns 1 if the specified pointer is in the map. */
 BM_INLINE int BMO_slot_map_contains(BMesh *bm, BMOperator *op, const char *slotname, void *element);
@@ -416,7 +418,7 @@
  * (e.g. combination of BM_VERT, BM_EDGE, BM_FACE), if iterating
  * over an element buffer (not a mapping).*/
 void *BMO_iter_new(BMOIter *iter, BMesh *bm, BMOperator *op,
-                  const char *slotname, const char restrictmask);
+                   const char *slotname, const char restrictmask);
 void *BMO_iter_step(BMOIter *iter);
 
 /* returns a pointer to the key value when iterating over mappings.
@@ -429,7 +431,7 @@
 /* use this for float mappings */
 float BMO_iter_map_value_f(BMOIter *iter);
 
-#define BMO_ITER(ele, iter, bm, op, slotname, restrict)  \
+#define BMO_ITER(ele, iter, bm, op, slotname, restrict)   \
 	ele = BMO_iter_new(iter, bm, op, slotname, restrict); \
 	for ( ; ele; ele=BMO_iter_step(iter))
 
@@ -452,13 +454,15 @@
 	BMOpSlot *slot = BMO_slot_get(op, slotname);
 
 	/*sanity check*/
-	if (slot->slottype != BMOP_OPSLOT_MAPPING) return;
+	if (slot->slottype != BMOP_OPSLOT_MAPPING) {
+		return;
+	}
 
 	mapping = (BMOElemMapping *) BLI_memarena_alloc(op->arena, sizeof(*mapping) + len);
 
 	mapping->element = (BMHeader*) element;
 	mapping->len = len;
-	memcpy(mapping+1, data, len);
+	memcpy(mapping + 1, data, len);
 
 	if (!slot->data.ghash) {
 		slot->data.ghash = BLI_ghash_new(BLI_ghashutil_ptrhash,
@@ -507,7 +511,7 @@
 	if (slot->slottype != BMOP_OPSLOT_MAPPING) return NULL;
 	if (!slot->data.ghash) return NULL;
 
-	mapping = (BMOElemMapping *) BLI_ghash_lookup(slot->data.ghash, element);
+	mapping = (BMOElemMapping *)BLI_ghash_lookup(slot->data.ghash, element);
 
 	if (!mapping) return NULL;
 
@@ -533,7 +537,7 @@
 }
 
 BM_INLINE void *BMO_slot_map_ptr_get(BMesh *bm, BMOperator *op, const char *slotname,
-                                   void *element)
+                                     void *element)
 {
 	void **val = (void**) BMO_slot_map_data_get(bm, op, slotname, element);
 	if (val) return *val;

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_construct.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_construct.c	2012-02-12 11:56:47 UTC (rev 44057)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_construct.c	2012-02-12 11:58:41 UTC (rev 44058)
@@ -128,8 +128,8 @@
  */
 
 BMFace *BM_face_create_quad_tri(BMesh *bm,
-                             BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4,
-                             const BMFace *example, const int nodouble)
+                                BMVert *v1, BMVert *v2, BMVert *v3, BMVert *v4,
+                                const BMFace *example, const int nodouble)
 {
 	BMVert *vtar[4] = {v1, v2, v3, v4};
 	return BM_face_create_quad_tri_v(bm, vtar, v4 ? 4 : 3, example, nodouble);
@@ -695,9 +695,9 @@
 	e = BM_iter_new(&iter, bmold, BM_EDGES_OF_MESH, NULL);
 	for (i = 0; e; e = BM_iter_step(&iter), i++) {
 		e2 = BM_edge_create(bm,
-		                  vtable[BM_elem_index_get(e->v1)],
-		                  vtable[BM_elem_index_get(e->v2)],
-		                  e, FALSE);
+		                    vtable[BM_elem_index_get(e->v1)],
+		                    vtable[BM_elem_index_get(e->v2)],
+		                    e, FALSE);
 
 		BM_elem_copy_attrs(bmold, bm, e, e2);
 		etable[i] = e2;

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_inline.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_inline.c	2012-02-12 11:56:47 UTC (rev 44057)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_inline.c	2012-02-12 11:58:41 UTC (rev 44058)
@@ -69,4 +69,3 @@
 }
 
 #endif /* BM_INLINE_C */
-

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_interp.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_interp.c	2012-02-12 11:56:47 UTC (rev 44057)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_interp.c	2012-02-12 11:58:41 UTC (rev 44058)
@@ -726,13 +726,14 @@
 	BMLoop *l_first;
 	void **blocks = NULL;
 	void **vblocks = NULL;
-	float (*cos)[3] = NULL, co[3], *w = NULL, cent[3] = {0.0f, 0.0f, 0.0f};
+	float (*cos)[3] = NULL, co[3], *w = NULL;
+	float cent[3] = {0.0f, 0.0f, 0.0f};
 	BLI_array_fixedstack_declare(cos,      BM_NGON_STACK_SIZE, source->len, __func__);
 	BLI_array_fixedstack_declare(w,        BM_NGON_STACK_SIZE, source->len, __func__);
 	BLI_array_fixedstack_declare(blocks,   BM_NGON_STACK_SIZE, source->len, __func__);
 	BLI_array_fixedstack_declare(vblocks,  BM_NGON_STACK_SIZE, do_vertex ? source->len : 0, __func__);
 	int i, ax, ay;
-	
+
 	BM_elem_copy_attrs(bm, bm, source, target->f);
 
 	i = 0;
@@ -740,15 +741,15 @@
 	do {
 		copy_v3_v3(cos[i], l_iter->v->co);
 		add_v3_v3(cent, cos[i]);
-		
+
 		w[i] = 0.0f;
 		blocks[i] = l_iter->head.data;
-	
+
 		if (do_vertex) {
 			vblocks[i] = l_iter->v->head.data;
 		}
 		i++;
-	
+
 	} while ((l_iter = l_iter->next) != l_first);
 
 	/* find best projection of face XY, XZ or YZ: barycentric weights of
@@ -764,19 +765,19 @@
 		sub_v3_v3v3(vec, cent, cos[i]);
 		mul_v3_fl(vec, 0.001f);
 		add_v3_v3(cos[i], vec);
-		
+
 		copy_v3_v3(tmp, cos[i]);
 		cos[i][0] = tmp[ax];
 		cos[i][1] = tmp[ay];
 		cos[i][2] = 0.0;
 	}
-	
-	
+
+
 	/* interpolate */
 	co[0] = target->v->co[ax];
 	co[1] = target->v->co[ay];
 	co[2] = 0.0f;
-	
+
 	interp_weights_poly_v3(w, cos, source->len, co);
 	CustomData_bmesh_interp(&bm->ldata, blocks, w, NULL, source->len, target->head.data);
 	if (do_vertex) {
@@ -787,7 +788,7 @@
 	BLI_array_fixedstack_free(cos);
 	BLI_array_fixedstack_free(w);
 	BLI_array_fixedstack_free(blocks);
-	
+
 	if (do_multires) {
 		if (CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
 			bmesh_loop_interp_mdisps(bm, target, source);
@@ -801,7 +802,8 @@
 	BMLoop *l_iter;
 	BMLoop *l_first;
 	void **blocks = NULL;
-	float (*cos)[3] = NULL, *w = NULL, cent[3] = {0.0f, 0.0f, 0.0f};
+	float (*cos)[3] = NULL, *w = NULL;
+	float cent[3] = {0.0f, 0.0f, 0.0f};
 	BLI_array_fixedstack_declare(cos,      BM_NGON_STACK_SIZE, source->len, __func__);
 	BLI_array_fixedstack_declare(w,        BM_NGON_STACK_SIZE, source->len, __func__);
 	BLI_array_fixedstack_declare(blocks,   BM_NGON_STACK_SIZE, source->len, __func__);
@@ -827,11 +829,11 @@
 		mul_v3_fl(vec, 0.01);
 		add_v3_v3(cos[i], vec);
 	}
-	
+
 	/* interpolate */
 	interp_weights_poly_v3(w, cos, source->len, v->co);
 	CustomData_bmesh_interp(&bm->vdata, blocks, w, NULL, source->len, v->head.data);
-	
+
 	BLI_array_fixedstack_free(cos);
 	BLI_array_fixedstack_free(w);
 	BLI_array_fixedstack_free(blocks);

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c	2012-02-12 11:56:47 UTC (rev 44057)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c	2012-02-12 11:58:41 UTC (rev 44058)
@@ -118,7 +118,7 @@
 	"righthandfaces",
 	{{BMOP_OPSLOT_ELEMENT_BUF, "faces"},
 	 {BMOP_OPSLOT_INT, "doflip"}, //internal flag, used by bmesh_rationalize_normals
-	{0} /* null-terminating sentine */,
+	 {0} /* null-terminating sentine */,
 	},
 	bmesh_righthandfaces_exec,
 	BMOP_UNTAN_MULTIRES,
@@ -140,7 +140,7 @@
 	 {BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, //output slot, computed boundary geometry.
 	 {BMOP_OPSLOT_INT, "constrict"}, //find boundary inside the regions, not outside.
 	 {BMOP_OPSLOT_INT, "usefaces"}, //extend from faces instead of edges
-	{0} /* null-terminating sentine */,
+	 {0} /* null-terminating sentine */,
 	},
 	bmesh_regionextend_exec,
 	0
@@ -157,7 +157,7 @@
 	{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, //input edges
 	 {BMOP_OPSLOT_ELEMENT_BUF, "edgeout"}, //newly spun edges
 	 {BMOP_OPSLOT_INT, "ccw"}, //rotate edge counter-clockwise if true, othewise clockwise
-	{0} /* null-terminating sentine */,
+	 {0} /* null-terminating sentine */,
 	},
 	bmesh_edgerotate_exec,
 	BMOP_UNTAN_MULTIRES
@@ -172,7 +172,7 @@
 static BMOpDefine def_reversefaces = {
 	"reversefaces",
 	{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, //input faces

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list