[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44022] branches/bmesh/blender/source/ blender/bmesh: Style Cleanup
Campbell Barton
ideasman42 at gmail.com
Sat Feb 11 04:35:05 CET 2012
Revision: 44022
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44022
Author: campbellbarton
Date: 2012-02-11 03:34:57 +0000 (Sat, 11 Feb 2012)
Log Message:
-----------
Style Cleanup
Modified Paths:
--------------
branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c
branches/bmesh/blender/source/blender/bmesh/operators/bevel.c
branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c
branches/bmesh/blender/source/blender/bmesh/operators/connectops.c
branches/bmesh/blender/source/blender/bmesh/operators/createops.c
branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c
branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c
branches/bmesh/blender/source/blender/bmesh/operators/join_triangles.c
branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c
branches/bmesh/blender/source/blender/bmesh/operators/primitiveops.c
branches/bmesh/blender/source/blender/bmesh/operators/removedoubles.c
branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c
branches/bmesh/blender/source/blender/bmesh/operators/triangulateop.c
branches/bmesh/blender/source/blender/bmesh/operators/utils.c
Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h 2012-02-11 03:34:57 UTC (rev 44022)
@@ -334,22 +334,26 @@
/* inserts a key/value mapping into a mapping slot. note that it copies the
* value, it doesn't store a reference to it. */
-//BM_INLINE void BMO_Insert_Mapping(BMesh *bm, BMOperator *op, const char *slotname,
- //void *element, void *data, int len);
+#if 0
+BM_INLINE void BMO_Insert_Mapping(BMesh *bm, BMOperator *op, const char *slotname,
+ void *element, void *data, int len);
+
/* inserts a key/float mapping pair into a mapping slot. */
-//BM_INLINE void BMO_Insert_MapFloat(BMesh *bm, BMOperator *op, const char *slotname,
- //void *element, float val);
+BM_INLINE void BMO_Insert_MapFloat(BMesh *bm, BMOperator *op, const char *slotname,
+ void *element, float val);
-//returns 1 if the specified pointer is in the map.
-//BM_INLINE int BMO_InMap(BMesh *bm, BMOperator *op, const char *slotname, void *element);
+/* returns 1 if the specified pointer is in the map. */
+BM_INLINE int BMO_InMap(BMesh *bm, BMOperator *op, const char *slotname, void *element);
/* returns a point to the value of a specific key. */
-//BM_INLINE void *BMO_Get_MapData(BMesh *bm, BMOperator *op, const char *slotname, void *element);
+BM_INLINE void *BMO_Get_MapData(BMesh *bm, BMOperator *op, const char *slotname, void *element);
/* returns the float part of a key/float pair. */
-//BM_INLINE float BMO_Get_MapFloat(BMesh *bm, BMOperator *op, const char *slotname, void *element);
+BM_INLINE float BMO_Get_MapFloat(BMesh *bm, BMOperator *op, const char *slotname, void *element);
+#endif
+
/* flags all elements in a mapping. note that the mapping must only have
* bmesh elements in it.*/
void BMO_Mapping_To_Flag(struct BMesh *bm, struct BMOperator *op,
@@ -360,10 +364,10 @@
* do NOT use these for non-operator-api-allocated memory! instead
* use BMO_Get_MapData and BMO_Insert_Mapping, which copies the data. */
-//BM_INLINE void BMO_Insert_MapPointer(BMesh *bm, BMOperator *op, const char *slotname,
- //void *key, void *val);
-//BM_INLINE void *BMO_Get_MapPointer(BMesh *bm, BMOperator *op, const char *slotname,
- //void *key);
+#if 0
+BM_INLINE void BMO_Insert_MapPointer(BMesh *bm, BMOperator *op, const char *slotname, void *key, void *val);
+BM_INLINE void *BMO_Get_MapPointer(BMesh *bm, BMOperator *op, const char *slotname, void *key);
+#endif
/* this part of the API is used to iterate over element buffer or
* mapping slots.
Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_opdefines.c 2012-02-11 03:34:57 UTC (rev 44022)
@@ -929,8 +929,8 @@
"create_icosphere",
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
{BMOP_OPSLOT_INT, "subdivisions"}, //how many times to recursively subdivide the sphere
- {BMOP_OPSLOT_FLT, "diameter"}, //diameter
- {BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with
+ {BMOP_OPSLOT_FLT, "diameter"}, //diameter
+ {BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with
{0, /* null-terminating sentine */}},
bmesh_create_icosphere_exec,
0,
Modified: branches/bmesh/blender/source/blender/bmesh/operators/bevel.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/bevel.c 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/operators/bevel.c 2012-02-11 03:34:57 UTC (rev 44022)
@@ -236,7 +236,7 @@
if (BMO_TestFlag(bm, l->f, BEVEL_FLAG))
continue;
-
+
BM_ITER(l2, &liter2, bm, BM_LOOPS_OF_FACE, l->f) {
BM_SetIndex(l2, BLI_array_count(tags)); /* set_loop */
BLI_array_growone(tags);
@@ -302,7 +302,7 @@
BMO_SetFlag(bm, l2->e, EDGE_OLD);
}
}
-
+
BLI_smallhash_insert(&hash, (intptr_t)l->f, NULL);
BMO_SetFlag(bm, l->f, BEVEL_FLAG);
BLI_array_append(faces, l->f);
@@ -369,10 +369,10 @@
normalize_v3(co);
mul_v3_fl(co, elen);
}
-
+
mul_v3_fl(co, fac);
add_v3_v3(co, l->v->co);
-
+
tag->newv = BM_Make_Vert(bm, co, l->v);
ETAG_SET(l->prev->e, l->v, tag->newv);
@@ -382,7 +382,7 @@
else if (BMO_TestFlag(bm, l->v, BEVEL_FLAG)) {
tag = tags + BM_GetIndex(l);
tag->newv = ETAG_GET(l->e, l->v);
-
+
if (!tag->newv) {
sub_v3_v3v3(co, l->next->v->co, l->v->co);
if (has_elens) {
@@ -394,7 +394,7 @@
mul_v3_fl(co, fac);
add_v3_v3(co, l->v->co);
-
+
tag = tags + BM_GetIndex(l);
tag->newv = BM_Make_Vert(bm, co, l->v);
@@ -462,7 +462,7 @@
printf("%s: could not make face!\n", __func__);
continue;
}
-
+
BMO_SetFlag(bm, f, FACE_NEW);
}
@@ -599,7 +599,7 @@
int rad, insorig = 0, err = 0;
BLI_smallhash_init(&tmphash);
-
+
if (!BMO_TestFlag(bm, v, BEVEL_FLAG))
continue;
Modified: branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c 2012-02-11 03:34:57 UTC (rev 44022)
@@ -70,8 +70,8 @@
*
*/
static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh,
- BMEdge *source_edge, BMesh *target_mesh,
- GHash *vhash, GHash *ehash)
+ BMEdge *source_edge, BMesh *target_mesh,
+ GHash *vhash, GHash *ehash)
{
BMEdge *target_edge = NULL;
BMVert *target_vert1, *target_vert2;
@@ -84,7 +84,9 @@
* add it to the new/old map. */
rlen = 0;
for (face = BMIter_New(&fiter, source_mesh, BM_FACES_OF_EDGE, source_edge);
- face; face = BMIter_Step(&fiter)) {
+ face;
+ face = BMIter_Step(&fiter))
+ {
if (BMO_TestFlag(source_mesh, face, DUPE_INPUT)) {
rlen++;
}
@@ -321,7 +323,7 @@
if (!bm2)
bm2 = bm;
-
+
/* flag inpu */
BMO_Flag_Buffer(bm, dupeop, "geom", DUPE_INPUT, BM_ALL);
@@ -458,7 +460,7 @@
void spinop_exec(BMesh *bm, BMOperator *op)
{
- BMOperator dupop, extop;
+ BMOperator dupop, extop;
float cent[3], dvec[3];
float axis[3] = {0.0f, 0.0f, 1.0f};
float q[4];
@@ -488,16 +490,16 @@
BMO_InitOpf(bm, &dupop, "dupe geom=%s", op, "lastout");
BMO_Exec_Op(bm, &dupop);
BMO_CallOpf(bm, "rotate cent=%v mat=%m3 verts=%s",
- cent, rmat, &dupop, "newout");
+ cent, rmat, &dupop, "newout");
BMO_CopySlot(&dupop, op, "newout", "lastout");
BMO_Finish_Op(bm, &dupop);
}
else {
BMO_InitOpf(bm, &extop, "extrudefaceregion edgefacein=%s",
- op, "lastout");
+ op, "lastout");
BMO_Exec_Op(bm, &extop);
BMO_CallOpf(bm, "rotate cent=%v mat=%m3 verts=%s",
- cent, rmat, &extop, "geomout");
+ cent, rmat, &extop, "geomout");
BMO_CopySlot(&extop, op, "geomout", "lastout");
BMO_Finish_Op(bm, &extop);
}
Modified: branches/bmesh/blender/source/blender/bmesh/operators/connectops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/connectops.c 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/operators/connectops.c 2012-02-11 03:34:57 UTC (rev 44022)
@@ -96,7 +96,7 @@
BLI_array_growone(verts);
verts[BLI_array_count(verts) - 1] = loops[i * 2]->v;
-
+
BLI_array_growone(verts);
verts[BLI_array_count(verts) - 1] = loops[i * 2 + 1]->v;
}
@@ -216,7 +216,7 @@
if (!e2)
e2 = e;
-
+
e = e2;
ov = v;
do {
@@ -317,7 +317,7 @@
* for v3 than v4, the loops are in opposite directions, so reverse
* the order of reads from vv1. We can avoid sqrt for comparison */
if (len_squared_v3v3(v1->co, v3->co) > len_squared_v3v3(v1->co, v4->co) &&
- len_squared_v3v3(v2->co, v4->co) > len_squared_v3v3(v2->co, v3->co))
+ len_squared_v3v3(v2->co, v4->co) > len_squared_v3v3(v2->co, v3->co))
{
dir1 = -1;
starti = clamp_index(-1, lenv1);
@@ -389,7 +389,7 @@
i1next = clamp_index((i + 1) * dir1 + starti, lenv1);
i2 = i;
i2next = clamp_index(i + 1, lenv2);
-
+
if (vv1[i1] == vv1[i1next]) {
continue;
}
Modified: branches/bmesh/blender/source/blender/bmesh/operators/createops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/createops.c 2012-02-10 18:09:19 UTC (rev 44021)
+++ branches/bmesh/blender/source/blender/bmesh/operators/createops.c 2012-02-11 03:34:57 UTC (rev 44022)
@@ -95,7 +95,7 @@
static int rotsys_append_edge(struct BMEdge *e, struct BMVert *v,
- EdgeData *edata, VertData *vdata)
+ EdgeData *edata, VertData *vdata)
{
EdgeData *ed = &edata[BM_GetIndex(e)];
VertData *vd = &vdata[BM_GetIndex(v)];
@@ -255,10 +255,10 @@
ok = 1;
if (!v || !e2)
continue;
-
+
do {
if (BLI_smallhash_haskey(hash, (intptr_t)e2) ||
- BLI_smallhash_haskey(hash, (intptr_t)v))
+ BLI_smallhash_haskey(hash, (intptr_t)v))
{
ok = 0;
break;
@@ -268,7 +268,7 @@
BLI_array_append(edges, e2);
BLI_smallhash_insert(hash, (intptr_t)e2, NULL);
-
+
v = BM_OtherEdgeVert(e2, v);
e2 = i ? rotsys_prevedge(e2, v, edata, vdata) : rotsys_nextedge(e2, v, edata, vdata);
} while (e2 != starte && v != startv);
@@ -368,7 +368,7 @@
/* BLI_array_staticdeclare(verts, BM_NGON_STACK_SIZE); */ /* UNUSE */
int i;
- #define SIGN(n) ((n)<0.0f)
+#define SIGN(n) ((n)<0.0f)
BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) {
BMIter eiter;
@@ -517,7 +517,7 @@
vd1 = vdata + BM_GetIndex(v1);
vd2 = vdata + BM_GetIndex(v2);
vd3 = vdata + BM_GetIndex(v3);
-
+
sub_v3_v3v3(vec1, vd1->sco, cent);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list