api name conventions, more minor changes: flag set/clear --> enable/disable
This commit is contained in:
@@ -310,10 +310,10 @@ void BMO_slot_from_flag(struct BMesh *bm, struct BMOperator *op, const char *slo
|
||||
const short oflag, const char htype);
|
||||
|
||||
/* tool-flags all elements inside an element slot array with flag flag. */
|
||||
void BMO_slot_buffer_flag(struct BMesh *bm, struct BMOperator *op, const char *slotname,
|
||||
void BMO_slot_buffer_flag_enable(struct BMesh *bm, struct BMOperator *op, const char *slotname,
|
||||
const short oflag, const char htype);
|
||||
/* clears tool-flag flag from all elements inside a slot array. */
|
||||
void BMO_slot_buffer_flag_clear(struct BMesh *bm, struct BMOperator *op, const char *slotname,
|
||||
void BMO_slot_buffer_flag_disable(struct BMesh *bm, struct BMOperator *op, const char *slotname,
|
||||
const short oflag, const char htype);
|
||||
|
||||
/* tool-flags all elements inside an element slot array with flag flag. */
|
||||
@@ -449,7 +449,7 @@ typedef struct BMOElemMapping {
|
||||
int len;
|
||||
} BMOElemMapping;
|
||||
|
||||
extern const int BMOP_OPSLOT_TYPEINFO[];
|
||||
extern const int BMO_OPSLOT_TYPEINFO[];
|
||||
|
||||
BM_INLINE void BMO_slot_map_insert(BMesh *UNUSED(bm), BMOperator *op, const char *slotname,
|
||||
void *element, void *data, int len)
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
#include "bmesh_private.h"
|
||||
|
||||
/* forward declarations */
|
||||
static void alloc_flag_layer(BMesh *bm);
|
||||
static void free_flag_layer(BMesh *bm);
|
||||
static void clear_flag_layer(BMesh *bm);
|
||||
static void bmo_flag_layer_alloc(BMesh *bm);
|
||||
static void bmo_flag_layer_free(BMesh *bm);
|
||||
static void bmo_flag_layer_clear(BMesh *bm);
|
||||
static int bmesh_name_to_slotcode(BMOpDefine *def, const char *name);
|
||||
static int bmesh_name_to_slotcode_check(BMOpDefine *def, const char *name);
|
||||
static int bmesh_opname_to_opcode(const char *opname);
|
||||
|
||||
static const char *bmop_error_messages[] = {
|
||||
static const char *bmo_error_messages[] = {
|
||||
NULL,
|
||||
"Self intersection error",
|
||||
"Could not dissolve vert",
|
||||
@@ -63,7 +63,7 @@ static const char *bmop_error_messages[] = {
|
||||
|
||||
|
||||
/* operator slot type information - size of one element of the type given. */
|
||||
const int BMOP_OPSLOT_TYPEINFO[] = {
|
||||
const int BMO_OPSLOT_TYPEINFO[] = {
|
||||
0,
|
||||
sizeof(int),
|
||||
sizeof(float),
|
||||
@@ -101,9 +101,9 @@ void BMO_push(BMesh *bm, BMOperator *UNUSED(op))
|
||||
|
||||
/* add flag layer, if appropriate */
|
||||
if (bm->stackdepth > 1)
|
||||
alloc_flag_layer(bm);
|
||||
bmo_flag_layer_alloc(bm);
|
||||
else
|
||||
clear_flag_layer(bm);
|
||||
bmo_flag_layer_clear(bm);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -117,7 +117,7 @@ void BMO_push(BMesh *bm, BMOperator *UNUSED(op))
|
||||
void BMO_pop(BMesh *bm)
|
||||
{
|
||||
if (bm->stackdepth > 1)
|
||||
free_flag_layer(bm);
|
||||
bmo_flag_layer_free(bm);
|
||||
|
||||
bm->stackdepth--;
|
||||
}
|
||||
@@ -263,7 +263,7 @@ void BMO_slot_copy(BMOperator *source_op, BMOperator *dest_op, const char *src,
|
||||
dest_slot->data.buf = NULL;
|
||||
dest_slot->len = source_slot->len;
|
||||
if (dest_slot->len) {
|
||||
const int slot_alloc_size = BMOP_OPSLOT_TYPEINFO[dest_slot->slottype] * dest_slot->len;
|
||||
const int slot_alloc_size = BMO_OPSLOT_TYPEINFO[dest_slot->slottype] * dest_slot->len;
|
||||
dest_slot->data.buf = BLI_memarena_alloc(dest_op->arena, slot_alloc_size);
|
||||
memcpy(dest_slot->data.buf, source_slot->data.buf, slot_alloc_size);
|
||||
}
|
||||
@@ -516,8 +516,8 @@ void *BMO_Grow_Array(BMesh *bm, BMOperator *op, int slotcode, int totadd)
|
||||
slot->size = (slot->size + 1 + totadd) * 2;
|
||||
|
||||
tmp = slot->data.buf;
|
||||
slot->data.buf = MEM_callocN(BMOP_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->size, "opslot dynamic array");
|
||||
memcpy(slot->data.buf, tmp, BMOP_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->size);
|
||||
slot->data.buf = MEM_callocN(BMO_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->size, "opslot dynamic array");
|
||||
memcpy(slot->data.buf, tmp, BMO_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->size);
|
||||
MEM_freeN(tmp);
|
||||
}
|
||||
|
||||
@@ -528,8 +528,8 @@ void *BMO_Grow_Array(BMesh *bm, BMOperator *op, int slotcode, int totadd)
|
||||
slot->len += totadd;
|
||||
slot->size = slot->len + 2;
|
||||
tmp = slot->data.buf;
|
||||
slot->data.buf = MEM_callocN(BMOP_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->len, "opslot dynamic array");
|
||||
memcpy(slot->data.buf, tmp, BMOP_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->len);
|
||||
slot->data.buf = MEM_callocN(BMO_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->len, "opslot dynamic array");
|
||||
memcpy(slot->data.buf, tmp, BMO_OPSLOT_TYPEINFO[opdefines[op->type]->slottypes[slotcode].type] * slot->len);
|
||||
}
|
||||
|
||||
return slot->data.buf;
|
||||
@@ -553,7 +553,7 @@ void BMO_slot_map_to_flag(struct BMesh *bm, struct BMOperator *op,
|
||||
}
|
||||
}
|
||||
|
||||
static void *alloc_slot_buffer(BMOperator *op, const char *slotname, int len)
|
||||
static void *bmo_slot_buffer_alloc(BMOperator *op, const char *slotname, int len)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
@@ -563,7 +563,7 @@ static void *alloc_slot_buffer(BMOperator *op, const char *slotname, int len)
|
||||
|
||||
slot->len = len;
|
||||
if (len)
|
||||
slot->data.buf = BLI_memarena_alloc(op->arena, BMOP_OPSLOT_TYPEINFO[slot->slottype] * len);
|
||||
slot->data.buf = BLI_memarena_alloc(op->arena, BMO_OPSLOT_TYPEINFO[slot->slottype] * len);
|
||||
return slot->data.buf;
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ static void BMO_slot_from_all(BMesh *bm, BMOperator *op, const char *slotname, c
|
||||
if (htype & BM_FACE) totelement += bm->totface;
|
||||
|
||||
if (totelement) {
|
||||
alloc_slot_buffer(op, slotname, totelement);
|
||||
bmo_slot_buffer_alloc(op, slotname, totelement);
|
||||
|
||||
if (htype & BM_VERT) {
|
||||
for (e = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); e; e = BM_iter_step(&elements)) {
|
||||
@@ -629,7 +629,7 @@ void BMO_slot_from_hflag(BMesh *bm, BMOperator *op, const char *slotname,
|
||||
totelement = BM_mesh_count_flag(bm, htype, hflag, 1);
|
||||
|
||||
if (totelement) {
|
||||
alloc_slot_buffer(op, slotname, totelement);
|
||||
bmo_slot_buffer_alloc(op, slotname, totelement);
|
||||
|
||||
if (htype & BM_VERT) {
|
||||
for (e = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); e; e = BM_iter_step(&elements)) {
|
||||
@@ -678,7 +678,7 @@ void BMO_slot_from_flag(BMesh *bm, BMOperator *op, const char *slotname,
|
||||
int totelement = BMO_mesh_flag_count(bm, oflag, htype), i = 0;
|
||||
|
||||
if (totelement) {
|
||||
alloc_slot_buffer(op, slotname, totelement);
|
||||
bmo_slot_buffer_alloc(op, slotname, totelement);
|
||||
|
||||
if (htype & BM_VERT) {
|
||||
for (e = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); e; e = BM_iter_step(&elements)) {
|
||||
@@ -787,7 +787,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,
|
||||
void BMO_slot_buffer_flag_enable(BMesh *bm, BMOperator *op, const char *slotname,
|
||||
const short oflag, const char htype)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
@@ -808,7 +808,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,
|
||||
void BMO_slot_buffer_flag_disable(BMesh *bm, BMOperator *op, const char *slotname,
|
||||
const short oflag, const char htype)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
@@ -838,7 +838,7 @@ void BMO_slot_buffer_flag_clear(BMesh *bm, BMOperator *op, const char *slotname,
|
||||
* all operators have been executed. This would
|
||||
* save a lot of realloc potentially.
|
||||
*/
|
||||
static void alloc_flag_layer(BMesh *bm)
|
||||
static void bmo_flag_layer_alloc(BMesh *bm)
|
||||
{
|
||||
BMHeader *ele;
|
||||
/* set the index values since we are looping over all data anyway,
|
||||
@@ -883,7 +883,7 @@ static void alloc_flag_layer(BMesh *bm)
|
||||
BLI_mempool_destroy(oldpool);
|
||||
}
|
||||
|
||||
static void free_flag_layer(BMesh *bm)
|
||||
static void bmo_flag_layer_free(BMesh *bm)
|
||||
{
|
||||
BMHeader *ele;
|
||||
/* set the index values since we are looping over all data anyway,
|
||||
@@ -928,7 +928,7 @@ static void free_flag_layer(BMesh *bm)
|
||||
BLI_mempool_destroy(oldpool);
|
||||
}
|
||||
|
||||
static void clear_flag_layer(BMesh *bm)
|
||||
static void bmo_flag_layer_clear(BMesh *bm)
|
||||
{
|
||||
BMHeader *ele;
|
||||
/* set the index values since we are looping over all data anyway,
|
||||
@@ -1057,7 +1057,7 @@ void BMO_error_raise(BMesh *bm, BMOperator *owner, int errcode, const char *msg)
|
||||
BMOpError *err = MEM_callocN(sizeof(BMOpError), "bmop_error");
|
||||
|
||||
err->errorcode = errcode;
|
||||
if (!msg) msg = bmop_error_messages[errcode];
|
||||
if (!msg) msg = bmo_error_messages[errcode];
|
||||
err->msg = msg;
|
||||
err->op = owner;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ void connectverts_exec(BMesh *bm, BMOperator *op)
|
||||
BLI_array_declare(verts);
|
||||
int i;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "verts", VERT_INPUT, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_INPUT, BM_VERT);
|
||||
|
||||
for (f = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL); f; f = BM_iter_step(&iter)) {
|
||||
BLI_array_empty(loops);
|
||||
@@ -172,7 +172,7 @@ void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op)
|
||||
BMEdge *e, *nexte;
|
||||
int c = 0, cl1 = 0, cl2 = 0;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
|
||||
BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
|
||||
if (!BMO_elem_flag_test(bm, e, EDGE_DONE)) {
|
||||
|
||||
@@ -887,8 +887,8 @@ void bmesh_edgenet_fill_exec(BMesh *bm, BMOperator *op)
|
||||
edata = MEM_callocN(sizeof(EdgeData)*bm->totedge, "EdgeData");
|
||||
vdata = MEM_callocN(sizeof(VertData)*bm->totvert, "VertData");
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag(bm, op, "excludefaces", FACE_IGNORE, BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "excludefaces", FACE_IGNORE, BM_FACE);
|
||||
|
||||
BM_mesh_elem_index_ensure(bm, BM_VERT);
|
||||
|
||||
@@ -1071,7 +1071,7 @@ void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op)
|
||||
int ok = 1;
|
||||
int i, count;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
|
||||
/* validate that each edge has at most one other tagged edge in the
|
||||
* disk cycle around each of it's vertices */
|
||||
@@ -1330,7 +1330,7 @@ void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op)
|
||||
/* call edgenet prepare op so additional face creation cases wor */
|
||||
BMO_op_initf(bm, &op2, "edgenet_prepare edges=%fe", ELE_NEW);
|
||||
BMO_op_exec(bm, &op2);
|
||||
BMO_slot_buffer_flag(bm, &op2, "edgeout", ELE_NEW, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, &op2, "edgeout", ELE_NEW, BM_EDGE);
|
||||
BMO_op_finish(bm, &op2);
|
||||
|
||||
BMO_op_initf(bm, &op2, "edgenet_fill edges=%fe", ELE_NEW);
|
||||
|
||||
@@ -96,7 +96,7 @@ void dissolvefaces_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "faces", FACE_MARK, BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "faces", FACE_MARK, BM_FACE);
|
||||
|
||||
/* collect region */
|
||||
BMO_ITER(f, &oiter, bm, op, "faces", BM_FACE) {
|
||||
@@ -335,7 +335,7 @@ void dissolveverts_exec(BMesh *bm, BMOperator *op)
|
||||
/* int i; */
|
||||
|
||||
vinput = BMO_slot_get(op, "verts");
|
||||
BMO_slot_buffer_flag(bm, op, "verts", VERT_MARK, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_MARK, BM_VERT);
|
||||
|
||||
for (v = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); v; v = BM_iter_step(&iter)) {
|
||||
if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
|
||||
|
||||
@@ -321,7 +321,7 @@ void dupeop_exec(BMesh *bm, BMOperator *op)
|
||||
bm2 = bm;
|
||||
|
||||
/* flag inpu */
|
||||
BMO_slot_buffer_flag(bm, dupeop, "geom", DUPE_INPUT, BM_ALL);
|
||||
BMO_slot_buffer_flag_enable(bm, dupeop, "geom", DUPE_INPUT, BM_ALL);
|
||||
|
||||
/* use the internal copy functio */
|
||||
copy_mesh(dupeop, bm, bm2);
|
||||
@@ -388,7 +388,7 @@ void splitop_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_slot_copy(splitop, &dupeop, "geom", "geom");
|
||||
BMO_op_exec(bm, &dupeop);
|
||||
|
||||
BMO_slot_buffer_flag(bm, splitop, "geom", SPLIT_INPUT, BM_ALL);
|
||||
BMO_slot_buffer_flag_enable(bm, splitop, "geom", SPLIT_INPUT, BM_ALL);
|
||||
|
||||
/* make sure to remove edges and verts we don't need */
|
||||
for (e = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL); e; e = BM_iter_step(&iter)) {
|
||||
@@ -442,7 +442,7 @@ void delop_exec(BMesh *bm, BMOperator *op)
|
||||
BMOperator *delop = op;
|
||||
|
||||
/* Mark Buffer */
|
||||
BMO_slot_buffer_flag(bm, delop, "geom", DEL_INPUT, BM_ALL);
|
||||
BMO_slot_buffer_flag_enable(bm, delop, "geom", DEL_INPUT, BM_ALL);
|
||||
|
||||
BMO_remove_tagged_context(bm, DEL_INPUT, BMO_slot_int_get(op, "context"));
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ void bmesh_edgesplitop_exec(BMesh *bm, BMOperator *op)
|
||||
BLI_array_declare(edges_tmp);
|
||||
int i, j;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_SEAM, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_SEAM, BM_EDGE);
|
||||
|
||||
/* single marked edges unconnected to any other marked edges
|
||||
* are illegal, go through and unmark them */
|
||||
|
||||
@@ -195,7 +195,7 @@ void extrude_edge_context_exec(BMesh *bm, BMOperator *op)
|
||||
/* initialize our sub-operators */
|
||||
BMO_op_init(bm, &dupeop, "dupe");
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edgefacein", EXT_INPUT, BM_EDGE|BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edgefacein", EXT_INPUT, BM_EDGE|BM_FACE);
|
||||
|
||||
/* if one flagged face is bordered by an unflagged face, then we delete
|
||||
* original geometry unless caller explicitly asked to keep it. */
|
||||
@@ -579,7 +579,7 @@ void bmesh_solidify_face_region_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_exec(bm, &extrudeop);
|
||||
|
||||
/* Push the verts of the extruded faces inward to create thickness */
|
||||
BMO_slot_buffer_flag(bm, &extrudeop, "geomout", FACE_MARK, BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, &extrudeop, "geomout", FACE_MARK, BM_FACE);
|
||||
calc_solidify_normals(bm);
|
||||
solidify_add_thickness(bm, thickness);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void bmesh_mirror_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_initf(bm, &dupeop, "dupe geom=%s", op, "geom");
|
||||
BMO_op_exec(bm, &dupeop);
|
||||
|
||||
BMO_slot_buffer_flag(bm, &dupeop, "newout", ELE_NEW, BM_ALL);
|
||||
BMO_slot_buffer_flag_enable(bm, &dupeop, "newout", ELE_NEW, BM_ALL);
|
||||
|
||||
/* create old -> new mappin */
|
||||
i = 0;
|
||||
|
||||
@@ -268,12 +268,12 @@ void bmesh_create_grid_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_exec(bm, &bmop);
|
||||
BMO_op_finish(bm, &prevop);
|
||||
|
||||
BMO_slot_buffer_flag(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
}
|
||||
else {
|
||||
BMO_op_initf(bm, &bmop, "extrude_edge_only edges=%fe", EDGE_ORIG);
|
||||
BMO_op_exec(bm, &bmop);
|
||||
BMO_slot_buffer_flag(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
}
|
||||
|
||||
BMO_op_callf(bm, "translate vec=%v verts=%s", vec, &bmop, "geomout");
|
||||
@@ -339,7 +339,7 @@ void bmesh_create_uvsphere_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_exec(bm, &bmop);
|
||||
}
|
||||
|
||||
BMO_slot_buffer_flag(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
BMO_op_callf(bm, "rotate cent=%v mat=%m3 verts=%s", vec, cmat, &bmop, "geomout");
|
||||
|
||||
prevop = bmop;
|
||||
@@ -426,8 +426,8 @@ void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op)
|
||||
"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);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", VERT_MARK, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", EDGE_MARK, BM_EDGE);
|
||||
BMO_op_finish(bm, &bmop);
|
||||
}
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ void bmesh_collapse_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_callf(bm, "collapse_uvs edges=%s", op, "edges");
|
||||
BMO_op_init(bm, &weldop, "weldverts");
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
|
||||
BMW_init(&walker, bm, BMW_SHELL,
|
||||
BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP,
|
||||
@@ -422,7 +422,7 @@ static void bmesh_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer)
|
||||
/* clear all short flags */
|
||||
BMO_mesh_flag_disable_all(bm, op, BM_ALL, (1 << 16) - 1);
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "edges", EDGE_MARK, BM_EDGE);
|
||||
|
||||
BMW_init(&walker, bm, BMW_LOOPDATA_ISLAND,
|
||||
BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP,
|
||||
@@ -499,7 +499,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c
|
||||
|
||||
/* Flag keepverts */
|
||||
if (keepvert) {
|
||||
BMO_slot_buffer_flag(bm, op, "keepverts", VERT_KEEP, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "keepverts", VERT_KEEP, BM_VERT);
|
||||
}
|
||||
|
||||
len = BLI_array_count(verts);
|
||||
@@ -564,7 +564,7 @@ void bmesh_automerge_exec(BMesh *bm, BMOperator *op)
|
||||
/* The "verts" input sent to this op is the set of verts that
|
||||
* can be merged away into any other verts. Mark all other verts
|
||||
* as VERT_KEEP. */
|
||||
BMO_slot_buffer_flag(bm, op, "verts", VERT_IN, BM_VERT);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "verts", VERT_IN, BM_VERT);
|
||||
BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
|
||||
if (!BMO_elem_flag_test(bm, v, VERT_IN)) {
|
||||
BMO_elem_flag_enable(bm, v, VERT_KEEP);
|
||||
|
||||
@@ -685,7 +685,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
|
||||
int beauty, cornertype, singleedge, gridfill;
|
||||
int skey, seed, i, j, matched, a, b, numcuts, totesel;
|
||||
|
||||
BMO_slot_buffer_flag(bmesh, op, "edges", SUBD_SPLIT, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bmesh, op, "edges", SUBD_SPLIT, BM_EDGE);
|
||||
|
||||
numcuts = BMO_slot_int_get(op, "numcuts");
|
||||
seed = BMO_slot_int_get(op, "seed");
|
||||
|
||||
@@ -87,7 +87,7 @@ void bmesh_beautify_fill_exec(BMesh *bm, BMOperator *op)
|
||||
BMEdge *e;
|
||||
int stop = 0;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "constrain_edges", EDGE_MARK, BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "constrain_edges", EDGE_MARK, BM_EDGE);
|
||||
|
||||
BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
|
||||
if (f->len == 3)
|
||||
@@ -207,7 +207,7 @@ void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
||||
/* clean up fill */
|
||||
BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", ELE_NEW, EDGE_MARK);
|
||||
BMO_op_exec(bm, &bmop);
|
||||
BMO_slot_buffer_flag(bm, &bmop, "geomout", ELE_NEW, BM_FACE|BM_EDGE);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", ELE_NEW, BM_FACE|BM_EDGE);
|
||||
BMO_op_finish(bm, &bmop);
|
||||
|
||||
BMO_slot_from_flag(bm, op, "geomout", ELE_NEW, BM_EDGE|BM_FACE);
|
||||
|
||||
@@ -224,7 +224,7 @@ void bmesh_regionextend_exec(BMesh *bm, BMOperator *op)
|
||||
int usefaces = BMO_slot_int_get(op, "usefaces");
|
||||
int constrict = BMO_slot_int_get(op, "constrict");
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "geom", SEL_ORIG, BM_ALL);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "geom", SEL_ORIG, BM_ALL);
|
||||
|
||||
if (constrict)
|
||||
bmesh_regionextend_constrict(bm, op, usefaces);
|
||||
@@ -275,7 +275,7 @@ void bmesh_righthandfaces_exec(BMesh *bm, BMOperator *op)
|
||||
startf = NULL;
|
||||
maxx = -1.0e10;
|
||||
|
||||
BMO_slot_buffer_flag(bm, op, "faces", FACE_FLAG, BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, op, "faces", FACE_FLAG, BM_FACE);
|
||||
|
||||
/* find a starting face */
|
||||
BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) {
|
||||
|
||||
@@ -267,9 +267,9 @@ void dupeop_exec(BMMesh *bm, BMOperator *op)
|
||||
finput = BMO_Get_Slot(dupeop, BMOP_DUPE_FINPUT);
|
||||
|
||||
/*go through vinput, einput, and finput and flag elements with private flags*/
|
||||
BMO_slot_buffer_flag(bm, dupeop, BMOP_DUPE_VINPUT, DUPE_INPUT);
|
||||
BMO_slot_buffer_flag(bm, dupeop, BMOP_DUPE_EINPUT, DUPE_INPUT);
|
||||
BMO_slot_buffer_flag(bm, dupeop, BMOP_DUPE_FINPUT, DUPE_INPUT);
|
||||
BMO_slot_buffer_flag_enable(bm, dupeop, BMOP_DUPE_VINPUT, DUPE_INPUT);
|
||||
BMO_slot_buffer_flag_enable(bm, dupeop, BMOP_DUPE_EINPUT, DUPE_INPUT);
|
||||
BMO_slot_buffer_flag_enable(bm, dupeop, BMOP_DUPE_FINPUT, DUPE_INPUT);
|
||||
|
||||
/*use the internal copy function*/
|
||||
copy_mesh(bm, bm);
|
||||
|
||||
@@ -1654,7 +1654,7 @@ static void remerge_faces(knifetool_opdata *kcd)
|
||||
BMO_op_initf(bm, &bmop, "beautify_fill faces=%ff constrain_edges=%fe", FACE_NEW, BOUNDARY);
|
||||
|
||||
BMO_op_exec(bm, &bmop);
|
||||
BMO_slot_buffer_flag(bm, &bmop, "geomout", FACE_NEW, BM_FACE);
|
||||
BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", FACE_NEW, BM_FACE);
|
||||
|
||||
BMO_op_finish(bm, &bmop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user