diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-21 13:10:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-21 13:10:08 +0400 |
commit | d76c05cd3655887ca48698b9081e959640711697 (patch) | |
tree | ad7b05b4b5af21179e244bbad62b11bbf9b9e3ec /source/blender/bmesh/operators | |
parent | 112ef144220e414827d9a57a81ddf27fa33804e1 (diff) |
style cleanup: bmesh
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_create.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_dupe.c | 7 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_primitive.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide.c | 10 |
4 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index 7db29501ed5..a761520dabb 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -466,7 +466,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata) copy_v3_v3(cent, v->co); for (j = 0; j < 3; j++) { - float fac = (BLI_frand() - 0.5f)*size; + float fac = (BLI_frand() - 0.5f) * size; cent[j] += fac; } diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index bb5f090431b..9a87acbb84f 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -486,11 +486,12 @@ void bmo_spin_exec(BMesh *bm, BMOperator *op) phi = BMO_slot_float_get(op, "ang") * (float)M_PI / (360.0f * steps); do_dupli = BMO_slot_bool_get(op, "do_dupli"); + /* BMESH_TODO - can replace this with BLI_math? */ si = (float)sin(phi); q[0] = (float)cos(phi); - q[1] = axis[0]*si; - q[2] = axis[1]*si; - q[3] = axis[2]*si; + q[1] = axis[0] * si; + q[2] = axis[1] * si; + q[3] = axis[2] * si; quat_to_mat3(rmat, q); BMO_slot_copy(op, op, "geom", "lastout"); diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index 5b46b251846..837fe46b65b 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -445,7 +445,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op) void bmo_create_monkey_exec(BMesh *bm, BMOperator *op) { BMVert *eve; - BMVert **tv = MEM_mallocN(sizeof(*tv)*monkeynv * 2, "tv"); + BMVert **tv = MEM_mallocN(sizeof(*tv) * monkeynv * 2, "tv"); float mat[4][4]; int i; diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index c19c337192b..f97f5225169 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -75,7 +75,7 @@ static BMEdge *connect_smallest_face(BMesh *bm, BMVert *v1, BMVert *v2, BMFace * /* this isn't the best thing in the world. it doesn't handle cases where there's * multiple faces yet. that might require a convexity test to figure out which - * face is "best," and who knows what for non-manifold conditions. */ + * face is "best" and who knows what for non-manifold conditions. */ for (face = BM_iter_new(&iter, bm, BM_FACES_OF_VERT, v1); face; face = BM_iter_step(&iter)) { for (v = BM_iter_new(&iter2, bm, BM_VERTS_OF_FACE, face); v; v = BM_iter_step(&iter2)) { if (v == v2) { @@ -290,7 +290,7 @@ static void quad_1edge_split(BMesh *bm, BMFace *UNUSED(face), add = 2; for (i = 0; i < numcuts; i++) { connect_smallest_face(bm, verts[i], verts[numcuts + add], &nf); - if (i == numcuts/2) { + if (i == numcuts / 2) { add -= 1; connect_smallest_face(bm, verts[i], verts[numcuts + add], &nf); } @@ -487,8 +487,8 @@ static void quad_4edge_subdivide(BMesh *bm, BMFace *UNUSED(face), BMVert **verts BMO_elem_flag_enable(bm, nf, ELE_INNER); - v1 = lines[(i + 1)*s] = verts[a]; - v2 = lines[(i + 1)*s + s - 1] = verts[b]; + v1 = lines[(i + 1) * s] = verts[a]; + v2 = lines[(i + 1) * s + s - 1] = verts[b]; temp = *e; for (a = 0; a < numcuts; a++) { @@ -949,7 +949,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) a = (a + 1) % vlen; } - //BM_face_legal_splits(bmesh, face, splits, BLI_array_count(splits)/2); + //BM_face_legal_splits(bmesh, face, splits, BLI_array_count(splits) / 2); for (j = 0; j < BLI_array_count(splits) / 2; j++) { if (splits[j * 2]) { |