indentation cleanup

This commit is contained in:
Campbell Barton 2012-02-12 11:58:41 +00:00
parent 883788ee56
commit 07ca47fc52
17 changed files with 109 additions and 104 deletions

View File

@ -180,10 +180,12 @@ void BMO_op_finish(struct BMesh *bm, struct BMOperator *op);
#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 @@ BMOpSlot *BMO_slot_get(struct BMOperator *op, const char *slotname);
/* 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 @@ int BMO_vert_edge_flags_count(BMesh *bm, BMVert *v, const short oflag);
#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 @@ void *BMO_slot_elem_first(BMOperator *op, const char *slotname);
* (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 @@ void *BMO_iter_map_value_p(BMOIter *iter);
/* 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 @@ BM_INLINE void BMO_slot_map_insert(BMesh *UNUSED(bm), BMOperator *op, const char
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 @@ BM_INLINE void *BMO_slot_map_data_get(BMesh *UNUSED(bm), BMOperator *op, const c
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 int BMO_slot_map_int_get(BMesh *bm, BMOperator *op, const char *slotna
}
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;

View File

@ -128,8 +128,8 @@ BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge *example, int n
*/
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 @@ BMesh *BM_mesh_copy(BMesh *bmold)
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;

View File

@ -69,4 +69,3 @@ BM_INLINE int BM_elem_index_get(const void *element)
}
#endif /* BM_INLINE_C */

View File

@ -726,13 +726,14 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
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 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
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 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
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 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
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 @@ void BM_vert_interp_from_face(BMesh *bm, BMVert *v, BMFace *source)
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 @@ void BM_vert_interp_from_face(BMesh *bm, BMVert *v, BMFace *source)
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);

View File

@ -118,7 +118,7 @@ static BMOpDefine def_righthandfaces = {
"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 @@ static BMOpDefine def_regionextend = {
{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 @@ static BMOpDefine def_edgerotate = {
{{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_edgerotate = {
static BMOpDefine def_reversefaces = {
"reversefaces",
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, //input faces
{0} /* null-terminating sentine */,
{0} /* null-terminating sentine */,
},
bmesh_reversefaces_exec,
BMOP_UNTAN_MULTIRES,
@ -187,9 +187,9 @@ static BMOpDefine def_reversefaces = {
static BMOpDefine def_edgebisect = {
"edgebisect",
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, //input edges
{BMOP_OPSLOT_INT, "numcuts"}, //number of cuts
{BMOP_OPSLOT_ELEMENT_BUF, "outsplit"}, //newly created vertices and edges
{0} /* null-terminating sentine */,
{BMOP_OPSLOT_INT, "numcuts"}, //number of cuts
{BMOP_OPSLOT_ELEMENT_BUF, "outsplit"}, //newly created vertices and edges
{0} /* null-terminating sentine */,
},
esplit_exec,
BMOP_UNTAN_MULTIRES
@ -359,8 +359,8 @@ static BMOpDefine def_weldverts = {
static BMOpDefine def_makevert = {
"makevert",
{{BMOP_OPSLOT_VEC, "co"}, //the coordinate of the new vert
{BMOP_OPSLOT_ELEMENT_BUF, "newvertout"}, //the new vert
{0, /* null-terminating sentine */}},
{BMOP_OPSLOT_ELEMENT_BUF, "newvertout"}, //the new vert
{0, /* null-terminating sentine */}},
bmesh_makevert_exec,
0,
};

View File

@ -619,7 +619,7 @@ static void BMO_slot_from_all(BMesh *bm, BMOperator *op, const char *slotname, c
*/
void BMO_slot_from_hflag(BMesh *bm, BMOperator *op, const char *slotname,
const char hflag, const char htype)
const char hflag, const char htype)
{
BMIter elements;
BMHeader *e;
@ -745,7 +745,7 @@ void BMO_slot_buffer_hflag(BMesh *bm, BMOperator *op, const char *slotname,
* using the selection API where appropriate.
*/
void BMO_slot_buffer_hflag_clear(BMesh *bm, BMOperator *op, const char *slotname,
const char hflag, const char htype)
const char hflag, const char htype)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);
BMHeader **data = slot->data.p;
@ -788,7 +788,7 @@ int BMO_vert_edge_flags_count(BMesh *bm, BMVert *v, const short oflag)
* Flags elements in a slots buffer
*/
void BMO_slot_buffer_flag(BMesh *bm, BMOperator *op, const char *slotname,
const short oflag, const char htype)
const short oflag, const char htype)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);
BMHeader **data = slot->data.p;
@ -809,7 +809,7 @@ void BMO_slot_buffer_flag(BMesh *bm, BMOperator *op, const char *slotname,
* Removes flags from elements in a slots buffer
*/
void BMO_slot_buffer_flag_clear(BMesh *bm, BMOperator *op, const char *slotname,
const short oflag, const char htype)
const short oflag, const char htype)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);
BMHeader **data = slot->data.p;
@ -966,7 +966,7 @@ void *BMO_slot_elem_first(BMOperator *op, const char *slotname)
}
void *BMO_iter_new(BMOIter *iter, BMesh *UNUSED(bm), BMOperator *op,
const char *slotname, const char restrictmask)
const char *slotname, const char restrictmask)
{
BMOpSlot *slot = BMO_slot_get(op, slotname);

View File

@ -91,7 +91,7 @@ int bmesh_ke(struct BMesh *bm, struct BMEdge *e);
int bmesh_kf(struct BMesh *bm, struct BMFace *bply);
struct BMVert *bmesh_semv(struct BMesh *bm, struct BMVert *tv, struct BMEdge *e, struct BMEdge **re);
struct BMFace *bmesh_sfme(struct BMesh *bm, struct BMFace *f, struct BMVert *v1,
struct BMVert *v2, struct BMLoop **rl, struct ListBase *holes);
struct BMVert *v2, struct BMLoop **rl, struct ListBase *holes);
int bmesh_jekv(struct BMesh *bm, struct BMEdge *ke, struct BMVert *kv);
int bmesh_loop_reverse(struct BMesh *bm, struct BMFace *f);
struct BMFace *bmesh_jfke(struct BMesh *bm, struct BMFace *f1, struct BMFace *f2, struct BMEdge *e);

View File

@ -271,8 +271,8 @@ static void *islandboundWalker_step(BMWalker *walker)
if (BM_vert_is_nonmanifold(walker->bm, v)) {
BMW_reset(walker);
BMO_error_raise(walker->bm, NULL, BMERR_WALKER_FAILED,
"Non-manifold vert "
"while searching region boundary");
"Non-manifold vert "
"while searching region boundary");
return NULL;
}

View File

@ -147,14 +147,14 @@ static void calc_corner_co(BMesh *bm, BMLoop *l, const float fac, float r_co[3],
#define ETAG_SET(e, v, nv) ( \
(v) == (e)->v1 ? \
(etags[BM_elem_index_get((e))].newv1 = (nv)) : \
(etags[BM_elem_index_get((e))].newv2 = (nv)) \
(etags[BM_elem_index_get((e))].newv1 = (nv)) : \
(etags[BM_elem_index_get((e))].newv2 = (nv)) \
)
#define ETAG_GET(e, v) ( \
(v) == (e)->v1 ? \
(etags[BM_elem_index_get((e))].newv1) : \
(etags[BM_elem_index_get((e))].newv2) \
(etags[BM_elem_index_get((e))].newv1) : \
(etags[BM_elem_index_get((e))].newv2) \
)
void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
@ -838,7 +838,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
}
}
#endif
BMO_op_callf(bm, "del geom=%fv context=%i", BEVEL_DEL, DEL_VERTS);
/* clean up any edges that might not get properly delete */

View File

@ -199,7 +199,7 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
/* edges do not form a loop: there is a disk
* with more than two marked edges. */
BMO_error_raise(bm, op, BMERR_INVALID_SELECTION,
"Selection must only contain edges from two edge loops");
"Selection must only contain edges from two edge loops");
goto cleanup;
}
}
@ -285,7 +285,7 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
* the bridge instead of quads only. */
if (BLI_array_count(ee1) != BLI_array_count(ee2)) {
BMO_error_raise(bm, op, BMERR_INVALID_SELECTION,
"Selected loops must have equal edge counts");
"Selected loops must have equal edge counts");
goto cleanup;
}
@ -395,11 +395,11 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
}
f = BM_face_create_quad_tri(bm,
vv1[i1],
vv2[i2],
vv2[i2next],
vv1[i1next],
NULL, TRUE);
vv1[i1],
vv2[i2],
vv2[i2next],
vv1[i1next],
NULL, TRUE);
if (!f || f->len != 4) {
fprintf(stderr, "%s: in bridge! (bmesh internal error)\n", __func__);
}

View File

@ -253,7 +253,7 @@ static int UNUSED_FUNCTION(rotsys_fill_faces)(BMesh *bm, EdgeData *edata, VertDa
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;

View File

@ -138,7 +138,7 @@ void dissolvefaces_exec(BMesh *bm, BMOperator *op)
faces = regions[i];
if (!faces[0]) {
BMO_error_raise(bm, op, BMERR_DISSOLVEFACES_FAILED,
"Could not find boundary of dissolve region");
"Could not find boundary of dissolve region");
goto cleanup;
}
@ -148,7 +148,7 @@ void dissolvefaces_exec(BMesh *bm, BMOperator *op)
f = BM_faces_join(bm, faces, tot);
if (!f) {
BMO_error_raise(bm, op, BMERR_DISSOLVEFACES_FAILED,
"Could not create merged face");
"Could not create merged face");
goto cleanup;
}
@ -206,8 +206,8 @@ void dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_set(bm, e->v2, VERT_MARK);
BM_faces_join_pair(bm, e->l->f,
e->l->radial_next->f,
e);
e->l->radial_next->f,
e);
}
}
@ -265,8 +265,8 @@ void dissolveedges_exec(BMesh *bm, BMOperator *op)
/* join faces */
BM_faces_join_pair(bm, e->l->f,
e->l->radial_next->f,
e);
e->l->radial_next->f,
e);
}
}

View File

@ -100,7 +100,7 @@ static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh,
/* not sure what non-manifold cases of greater then three
* radial should do. */
BMO_slot_map_ptr_insert(source_mesh, op, "boundarymap",
source_edge, target_edge);
source_edge, target_edge);
}
/* Insert new edge into the edge hash */
@ -152,9 +152,9 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
/* create new fac */
target_face = BM_face_create(target_mesh, vtar, edar, source_face->len, FALSE);
BMO_slot_map_ptr_insert(source_mesh, op,
"facemap", source_face, target_face);
"facemap", source_face, target_face);
BMO_slot_map_ptr_insert(source_mesh, op,
"facemap", target_face, source_face);
"facemap", target_face, source_face);
BM_elem_copy_attrs(source_mesh, target_mesh, source_face, target_face);
@ -425,9 +425,9 @@ void splitop_exec(BMesh *bm, BMOperator *op)
/* now we make our outputs by copying the dupe output */
BMO_slot_copy(&dupeop, splitop, "newout", "geomout");
BMO_slot_copy(&dupeop, splitop, "boundarymap",
"boundarymap");
"boundarymap");
BMO_slot_copy(&dupeop, splitop, "isovertmap",
"isovertmap");
"isovertmap");
/* cleanu */
BMO_op_finish(bm, &delop);
@ -488,16 +488,16 @@ void spinop_exec(BMesh *bm, BMOperator *op)
BMO_op_initf(bm, &dupop, "dupe geom=%s", op, "lastout");
BMO_op_exec(bm, &dupop);
BMO_op_callf(bm, "rotate cent=%v mat=%m3 verts=%s",
cent, rmat, &dupop, "newout");
cent, rmat, &dupop, "newout");
BMO_slot_copy(&dupop, op, "newout", "lastout");
BMO_op_finish(bm, &dupop);
}
else {
BMO_op_initf(bm, &extop, "extrudefaceregion edgefacein=%s",
op, "lastout");
op, "lastout");
BMO_op_exec(bm, &extop);
BMO_op_callf(bm, "rotate cent=%v mat=%m3 verts=%s",
cent, rmat, &extop, "geomout");
cent, rmat, &extop, "geomout");
BMO_slot_copy(&extop, op, "geomout", "lastout");
BMO_op_finish(bm, &extop);
}

View File

@ -247,7 +247,7 @@ void extrude_edge_context_exec(BMesh *bm, BMOperator *op)
if (delorig) {
BMO_op_initf(bm, &delop, "del geom=%fvef context=%d",
EXT_DEL, DEL_ONLYTAGGED);
EXT_DEL, DEL_ONLYTAGGED);
}
BMO_slot_copy(op, &dupeop, "edgefacein", "geom");

View File

@ -423,8 +423,8 @@ void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op)
BMOperator bmop;
BMO_op_initf(bm, &bmop,
"esubd edges=%fe smooth=%f numcuts=%i gridfill=%i beauty=%i",
EDGE_MARK, dia, 1, 1, B_SPHERE);
"esubd edges=%fe smooth=%f numcuts=%i gridfill=%i beauty=%i",
EDGE_MARK, dia, 1, 1, B_SPHERE);
BMO_op_exec(bm, &bmop);
BMO_slot_buffer_flag(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
BMO_slot_buffer_flag(bm, &bmop, "geomout", EDGE_MARK, BM_EDGE);
@ -459,18 +459,18 @@ void bmesh_create_monkey_exec(BMesh *bm, BMOperator *op)
for (i = 0; i < monkeynf; i++) {
BM_face_create_quad_tri(bm,
tv[monkeyf[i][0] + i - monkeyo],
tv[monkeyf[i][1] + i - monkeyo],
tv[monkeyf[i][2] + i - monkeyo],
(monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeyf[i][3] + i - monkeyo] : NULL,
NULL, FALSE);
tv[monkeyf[i][0] + i - monkeyo],
tv[monkeyf[i][1] + i - monkeyo],
tv[monkeyf[i][2] + i - monkeyo],
(monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeyf[i][3] + i - monkeyo] : NULL,
NULL, FALSE);
BM_face_create_quad_tri(bm,
tv[monkeynv + monkeyf[i][2] + i - monkeyo],
tv[monkeynv + monkeyf[i][1] + i - monkeyo],
tv[monkeynv + monkeyf[i][0] + i - monkeyo],
(monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeynv + monkeyf[i][3] + i - monkeyo]: NULL,
NULL, FALSE);
tv[monkeynv + monkeyf[i][2] + i - monkeyo],
tv[monkeynv + monkeyf[i][1] + i - monkeyo],
tv[monkeynv + monkeyf[i][0] + i - monkeyo],
(monkeyf[i][3] != monkeyf[i][2]) ? tv[monkeynv + monkeyf[i][3] + i - monkeyo]: NULL,
NULL, FALSE);
}
MEM_freeN(tv);

View File

@ -224,7 +224,7 @@ static BMVert *subdivideedgenum(BMesh *bm, BMEdge *edge, BMEdge *oedge,
}
ev = bm_subdivide_edge_addvert(bm, edge, oedge, params, percent,
percent2, newe, vsta, vend);
percent2, newe, vsta, vend);
return ev;
}
@ -741,7 +741,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
/* first go through and tag edge */
BMO_slot_from_flag(bmesh, op, "edges",
SUBD_SPLIT, BM_EDGE);
SUBD_SPLIT, BM_EDGE);
params.numcuts = numcuts;
params.op = op;
@ -755,10 +755,10 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
params.off[2] = (float)BLI_drand() * 200.0f;
BMO_slot_map_to_flag(bmesh, op, "custompatterns",
FACE_CUSTOMFILL);
FACE_CUSTOMFILL);
BMO_slot_map_to_flag(bmesh, op, "edgepercents",
EDGE_PERCENT);
EDGE_PERCENT);
for (face = BM_iter_new(&fiter, bmesh, BM_FACES_OF_MESH, NULL);
face;
@ -809,7 +809,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
if (BMO_elem_flag_test(bmesh, face, FACE_CUSTOMFILL)) {
pat = BMO_slot_map_data_get(bmesh, op,
"custompatterns", face);
"custompatterns", face);
for (i = 0; i < pat->len; i++) {
matched = 1;
for (j = 0; j < pat->len; j++) {
@ -914,7 +914,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
/* find the boundary of one of the split edge */
for (a = 1; a < vlen; a++) {
if (!BMO_elem_flag_test(bmesh, loops[a - 1]->v, ELE_INNER) &&
BMO_elem_flag_test(bmesh, loops[a]->v, ELE_INNER))
BMO_elem_flag_test(bmesh, loops[a]->v, ELE_INNER))
{
break;
}
@ -928,7 +928,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
for (j = 0; j < vlen; j++) {
b = (j + a + numcuts + 1) % vlen;
if (!BMO_elem_flag_test(bmesh, loops[b == 0 ? vlen - 1 : b - 1]->v, ELE_INNER) &&
BMO_elem_flag_test(bmesh, loops[b]->v, ELE_INNER))
BMO_elem_flag_test(bmesh, loops[b]->v, ELE_INNER))
{
break;
}
@ -1005,12 +1005,12 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
BLI_array_free(loops);
BMO_slot_from_flag(bmesh, op, "outinner",
ELE_INNER, BM_ALL);
ELE_INNER, BM_ALL);
BMO_slot_from_flag(bmesh, op, "outsplit",
ELE_SPLIT, BM_ALL);
ELE_SPLIT, BM_ALL);
BMO_slot_from_flag(bmesh, op, "geomout",
ELE_INNER|ELE_SPLIT|SUBD_SPLIT, BM_ALL);
ELE_INNER|ELE_SPLIT|SUBD_SPLIT, BM_ALL);
}
/* editmesh-emulating functio */
@ -1022,10 +1022,10 @@ void BM_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float smooth
BMOperator op;
BMO_op_initf(bm, &op, "esubd edges=%he smooth=%f fractal=%f "
"beauty=%d numcuts=%d quadcornertype=%d singleedge=%d "
"gridfill=%d seed=%d",
flag, smooth, fractal, beauty, numcuts,
cornertype, singleedge, gridfill, seed);
"beauty=%d numcuts=%d quadcornertype=%d singleedge=%d "
"gridfill=%d seed=%d",
flag, smooth, fractal, beauty, numcuts,
cornertype, singleedge, gridfill, seed);
BMO_op_exec(bm, &op);

View File

@ -67,7 +67,7 @@ void triangulate_exec(BMesh *bm, BMOperator *op)
BMO_slot_map_ptr_insert(bm, op, "facemap", face, face);
for (i = 0; newfaces[i]; i++) {
BMO_slot_map_ptr_insert(bm, op, "facemap",
newfaces[i], face);
newfaces[i], face);
}
}
@ -188,8 +188,8 @@ void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op)
for (efa = fillfacebase.first; efa; efa = efa->next) {
BMFace *f = BM_face_create_quad_tri(bm,
efa->v1->tmp.p, efa->v2->tmp.p, efa->v3->tmp.p, NULL,
NULL, TRUE);
efa->v1->tmp.p, efa->v2->tmp.p, efa->v3->tmp.p, NULL,
NULL, TRUE);
BMLoop *l;
BMIter liter;