more bmesh minor api cleanup
* remove BMO_elem_flag_* functions, since there are already defines for this. * ifdef unused bevel functions. * rename defines BMOP_ --> BMO_OP_
This commit is contained in:
@@ -194,7 +194,7 @@ void BM_face_copy_shared(BMesh *bm, BMFace *f);
|
||||
|
||||
/* copies attributes, e.g. customdata, header flags, etc, from one element
|
||||
* to another of the same type.*/
|
||||
void BM_elem_copy_attrs(BMesh *source_mesh, BMesh *target_mesh, const void *source, void *target);
|
||||
void BM_elem_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, const void *source, void *target);
|
||||
|
||||
/* Modification */
|
||||
/* join two adjacent faces together along an edge. note that
|
||||
|
||||
@@ -77,23 +77,23 @@ struct GHashIterator;
|
||||
|
||||
/* slot type arrays are terminated by the last member
|
||||
* having a slot type of 0.*/
|
||||
#define BMOP_OPSLOT_SENTINEL 0
|
||||
#define BMOP_OPSLOT_INT 1
|
||||
#define BMOP_OPSLOT_FLT 2
|
||||
#define BMOP_OPSLOT_PNT 3
|
||||
#define BMOP_OPSLOT_MAT 4
|
||||
#define BMOP_OPSLOT_VEC 7
|
||||
#define BMO_OP_SLOT_SENTINEL 0
|
||||
#define BMO_OP_SLOT_INT 1
|
||||
#define BMO_OP_SLOT_FLT 2
|
||||
#define BMO_OP_SLOT_PNT 3
|
||||
#define BMO_OP_SLOT_MAT 4
|
||||
#define BMO_OP_SLOT_VEC 7
|
||||
|
||||
/* after BMOP_OPSLOT_VEC, everything is
|
||||
/* after BMO_OP_SLOT_VEC, everything is
|
||||
|
||||
* dynamically allocated arrays. we
|
||||
* leave a space in the identifiers
|
||||
* for future growth.
|
||||
*/
|
||||
//it's very important this remain a power of two
|
||||
#define BMOP_OPSLOT_ELEMENT_BUF 8
|
||||
#define BMOP_OPSLOT_MAPPING 9
|
||||
/* #define BMOP_OPSLOT_TOTAL_TYPES 10 */ /* not used yet */
|
||||
#define BMO_OP_SLOT_ELEMENT_BUF 8
|
||||
#define BMO_OP_SLOT_MAPPING 9
|
||||
/* #define BMO_OP_SLOT_TOTAL_TYPES 10 */ /* not used yet */
|
||||
|
||||
/* please ignore all these structures, don't touch them in tool code, except
|
||||
* for when your defining an operator with BMOpDefine.*/
|
||||
@@ -113,7 +113,7 @@ typedef struct BMOpSlot{
|
||||
} data;
|
||||
} BMOpSlot;
|
||||
|
||||
#define BMOP_MAX_SLOTS 16 /* way more than probably needed */
|
||||
#define BMO_OP_MAX_SLOTS 16 /* way more than probably needed */
|
||||
|
||||
#ifdef slots
|
||||
#undef slots
|
||||
@@ -124,7 +124,7 @@ typedef struct BMOperator {
|
||||
int slottype;
|
||||
int needflag;
|
||||
int flag;
|
||||
struct BMOpSlot slots[BMOP_MAX_SLOTS];
|
||||
struct BMOpSlot slots[BMO_OP_MAX_SLOTS];
|
||||
void (*exec)(struct BMesh *bm, struct BMOperator *op);
|
||||
MemArena *arena;
|
||||
} BMOperator;
|
||||
@@ -138,20 +138,19 @@ typedef struct BMOSlotType {
|
||||
|
||||
typedef struct BMOpDefine {
|
||||
const char *name;
|
||||
BMOSlotType slottypes[BMOP_MAX_SLOTS];
|
||||
BMOSlotType slottypes[BMO_OP_MAX_SLOTS];
|
||||
void (*exec)(BMesh *bm, BMOperator *op);
|
||||
int flag;
|
||||
} BMOpDefine;
|
||||
|
||||
/*BMOpDefine->flag*/
|
||||
#define BMOP_UNTAN_MULTIRES 1 /*switch from multires tangent space to absolute coordinates*/
|
||||
|
||||
/* BMOpDefine->flag */
|
||||
#define BMO_OP_FLAG_UNTAN_MULTIRES 1 /*switch from multires tangent space to absolute coordinates*/
|
||||
|
||||
/* ensures consistent normals before operator execution,
|
||||
* restoring the original ones windings/normals afterwards.
|
||||
* keep in mind, this won't work if the input mesh isn't
|
||||
* manifold.*/
|
||||
#define BMOP_RATIONALIZE_NORMALS 2
|
||||
#define BMO_OP_FLAG_RATIONALIZE_NORMALS 2
|
||||
|
||||
/*------------- Operator API --------------*/
|
||||
|
||||
@@ -458,7 +457,7 @@ 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) {
|
||||
if (slot->slottype != BMO_OP_SLOT_MAPPING) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -499,7 +498,7 @@ BM_INLINE int BMO_slot_map_contains(BMesh *UNUSED(bm), BMOperator *op, const cha
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
/*sanity check*/
|
||||
if (slot->slottype != BMOP_OPSLOT_MAPPING) return 0;
|
||||
if (slot->slottype != BMO_OP_SLOT_MAPPING) return 0;
|
||||
if (!slot->data.ghash) return 0;
|
||||
|
||||
return BLI_ghash_haskey(slot->data.ghash, element);
|
||||
@@ -512,7 +511,7 @@ BM_INLINE void *BMO_slot_map_data_get(BMesh *UNUSED(bm), BMOperator *op, const c
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
/*sanity check*/
|
||||
if (slot->slottype != BMOP_OPSLOT_MAPPING) return NULL;
|
||||
if (slot->slottype != BMO_OP_SLOT_MAPPING) return NULL;
|
||||
if (!slot->data.ghash) return NULL;
|
||||
|
||||
mapping = (BMOElemMapping *)BLI_ghash_lookup(slot->data.ghash, element);
|
||||
|
||||
@@ -98,8 +98,8 @@ struct EditMesh;
|
||||
#if 0
|
||||
void BMO_dupe_from_flag(struct BMesh *bm, int etypeflag, const char hflag);
|
||||
#endif
|
||||
void BM_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float smooth,
|
||||
float fractal, int beauty, int numcuts, int seltype,
|
||||
int cornertype, int singleedge, int gridfill, int seed);
|
||||
void BM_mesh_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float smooth,
|
||||
float fractal, int beauty, int numcuts, int seltype,
|
||||
int cornertype, int singleedge, int gridfill, int seed);
|
||||
|
||||
#endif /* __BMESH_OPERATORS_H__ */
|
||||
|
||||
@@ -52,8 +52,6 @@ struct BMVert *BM_edge_other_vert(struct BMEdge *e, struct BMVert *v);
|
||||
/*finds other loop that shares v with e's loop in f.*/
|
||||
struct BMLoop *BM_face_other_loop(BMEdge *e, BMFace *f, BMVert *v);
|
||||
|
||||
//#define BM_edge_other_vert(e, v) (v==e->v1?e->v2:e->v1)
|
||||
|
||||
/*returns the edge existing between v1 and v2, or NULL if there isn't one.*/
|
||||
struct BMEdge *BM_edge_exists(struct BMVert *v1, struct BMVert *v2);
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
#define SELECT 1
|
||||
|
||||
/* prototypes */
|
||||
static void bm_copy_loop_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMLoop *source_loop, BMLoop *target_loop);
|
||||
static void bm_loop_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMLoop *source_loop, BMLoop *target_loop);
|
||||
#if 0
|
||||
|
||||
/*
|
||||
@@ -177,7 +177,7 @@ BMFace *BM_face_create_quad_tri_v(BMesh *bm, BMVert **verts, int len, const BMFa
|
||||
f = BM_face_create(bm, verts, edar, len, FALSE);
|
||||
|
||||
if (example && f) {
|
||||
BM_elem_copy_attrs(bm, bm, example, f);
|
||||
BM_elem_attrs_copy(bm, bm, example, f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,11 +199,11 @@ void BM_face_copy_shared(BMesh *bm, BMFace *f)
|
||||
|
||||
if (l2 && l2 != l) {
|
||||
if (l2->v == l->v) {
|
||||
bm_copy_loop_attributes(bm, bm, l2, l);
|
||||
bm_loop_attrs_copy(bm, bm, l2, l);
|
||||
}
|
||||
else {
|
||||
l2 = l2->next;
|
||||
bm_copy_loop_attributes(bm, bm, l2, l);
|
||||
bm_loop_attrs_copy(bm, bm, l2, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
|
||||
|
||||
/* put edges in correct order */
|
||||
for (i = 0; i < len; i++) {
|
||||
bmesh_api_setflag(edges[i], _FLAG_MF);
|
||||
BM_ELEM_API_FLAG_ENABLE(edges[i], _FLAG_MF);
|
||||
}
|
||||
|
||||
ev1 = edges[0]->v1;
|
||||
@@ -268,7 +268,7 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
|
||||
|
||||
do {
|
||||
e2 = bmesh_disk_nextedge(e2, v);
|
||||
if (e2 != e && bmesh_api_getflag(e2, _FLAG_MF)) {
|
||||
if (e2 != e && BM_ELEM_API_FLAG_TEST(e2, _FLAG_MF)) {
|
||||
v = BM_edge_other_vert(e2, v);
|
||||
break;
|
||||
}
|
||||
@@ -327,7 +327,7 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
|
||||
|
||||
/* clean up flags */
|
||||
for (i = 0; i < len; i++) {
|
||||
bmesh_api_clearflag(edges2[i], _FLAG_MF);
|
||||
BM_ELEM_API_FLAG_DISABLE(edges2[i], _FLAG_MF);
|
||||
}
|
||||
|
||||
BLI_array_free(verts);
|
||||
@@ -337,7 +337,7 @@ BMFace *BM_face_create_ngon(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge **edges, i
|
||||
|
||||
err:
|
||||
for (i = 0; i < len; i++) {
|
||||
bmesh_api_clearflag(edges[i], _FLAG_MF);
|
||||
BM_ELEM_API_FLAG_DISABLE(edges[i], _FLAG_MF);
|
||||
}
|
||||
|
||||
BLI_array_free(verts);
|
||||
@@ -568,13 +568,8 @@ void BMO_remove_tagged_context(BMesh *bm, const short oflag, const int type)
|
||||
/*************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void bm_copy_vert_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMVert *source_vertex, BMVert *target_vertex)
|
||||
static void bm_vert_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMVert *source_vertex, BMVert *target_vertex)
|
||||
{
|
||||
if ((source_mesh == target_mesh) && (source_vertex == target_vertex)) {
|
||||
return;
|
||||
@@ -585,8 +580,8 @@ static void bm_copy_vert_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
source_vertex->head.data, &target_vertex->head.data);
|
||||
}
|
||||
|
||||
static void bm_copy_edge_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMEdge *source_edge, BMEdge *target_edge)
|
||||
static void bm_edge_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMEdge *source_edge, BMEdge *target_edge)
|
||||
{
|
||||
if ((source_mesh == target_mesh) && (source_edge == target_edge)) {
|
||||
return;
|
||||
@@ -596,8 +591,8 @@ static void bm_copy_edge_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
source_edge->head.data, &target_edge->head.data);
|
||||
}
|
||||
|
||||
static void bm_copy_loop_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMLoop *source_loop, BMLoop *target_loop)
|
||||
static void bm_loop_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMLoop *source_loop, BMLoop *target_loop)
|
||||
{
|
||||
if ((source_mesh == target_mesh) && (source_loop == target_loop)) {
|
||||
return;
|
||||
@@ -607,8 +602,8 @@ static void bm_copy_loop_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
source_loop->head.data, &target_loop->head.data);
|
||||
}
|
||||
|
||||
static void bm_copy_face_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMFace *source_face, BMFace *target_face)
|
||||
static void bm_face_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
|
||||
const BMFace *source_face, BMFace *target_face)
|
||||
{
|
||||
if ((source_mesh == target_mesh) && (source_face == target_face)) {
|
||||
return;
|
||||
@@ -622,7 +617,7 @@ static void bm_copy_face_attributes(BMesh *source_mesh, BMesh *target_mesh,
|
||||
|
||||
/* BMESH_TODO: Special handling for hide flags? */
|
||||
|
||||
void BM_elem_copy_attrs(BMesh *source_mesh, BMesh *target_mesh, const void *source, void *target)
|
||||
void BM_elem_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, const void *source, void *target)
|
||||
{
|
||||
const BMHeader *sheader = source;
|
||||
BMHeader *theader = target;
|
||||
@@ -638,13 +633,13 @@ void BM_elem_copy_attrs(BMesh *source_mesh, BMesh *target_mesh, const void *sour
|
||||
|
||||
/* Copy specific attributes */
|
||||
if (theader->htype == BM_VERT)
|
||||
bm_copy_vert_attributes(source_mesh, target_mesh, (const BMVert *)source, (BMVert *)target);
|
||||
bm_vert_attrs_copy(source_mesh, target_mesh, (const BMVert *)source, (BMVert *)target);
|
||||
else if (theader->htype == BM_EDGE)
|
||||
bm_copy_edge_attributes(source_mesh, target_mesh, (const BMEdge *)source, (BMEdge *)target);
|
||||
bm_edge_attrs_copy(source_mesh, target_mesh, (const BMEdge *)source, (BMEdge *)target);
|
||||
else if (theader->htype == BM_LOOP)
|
||||
bm_copy_loop_attributes(source_mesh, target_mesh, (const BMLoop *)source, (BMLoop *)target);
|
||||
bm_loop_attrs_copy(source_mesh, target_mesh, (const BMLoop *)source, (BMLoop *)target);
|
||||
else if (theader->htype == BM_FACE)
|
||||
bm_copy_face_attributes(source_mesh, target_mesh, (const BMFace *)source, (BMFace *)target);
|
||||
bm_face_attrs_copy(source_mesh, target_mesh, (const BMFace *)source, (BMFace *)target);
|
||||
}
|
||||
|
||||
BMesh *BM_mesh_copy(BMesh *bmold)
|
||||
@@ -680,7 +675,7 @@ BMesh *BM_mesh_copy(BMesh *bmold)
|
||||
v = BM_iter_new(&iter, bmold, BM_VERTS_OF_MESH, NULL);
|
||||
for (i = 0; v; v = BM_iter_step(&iter), i++) {
|
||||
v2 = BM_vert_create(bm, v->co, NULL); /* copy between meshes so cant use 'example' argument */
|
||||
BM_elem_copy_attrs(bmold, bm, v, v2);
|
||||
BM_elem_attrs_copy(bmold, bm, v, v2);
|
||||
vtable[i] = v2;
|
||||
BM_elem_index_set(v, i); /* set_inline */
|
||||
BM_elem_index_set(v2, i); /* set_inline */
|
||||
@@ -698,7 +693,7 @@ BMesh *BM_mesh_copy(BMesh *bmold)
|
||||
vtable[BM_elem_index_get(e->v2)],
|
||||
e, FALSE);
|
||||
|
||||
BM_elem_copy_attrs(bmold, bm, e, e2);
|
||||
BM_elem_attrs_copy(bmold, bm, e, e2);
|
||||
etable[i] = e2;
|
||||
BM_elem_index_set(e, i); /* set_inline */
|
||||
BM_elem_index_set(e2, i); /* set_inline */
|
||||
@@ -740,12 +735,12 @@ BMesh *BM_mesh_copy(BMesh *bmold)
|
||||
|
||||
ftable[i] = f2;
|
||||
|
||||
BM_elem_copy_attrs(bmold, bm, f, f2);
|
||||
BM_elem_attrs_copy(bmold, bm, f, f2);
|
||||
copy_v3_v3(f2->no, f->no);
|
||||
|
||||
l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f2);
|
||||
for (j = 0; j < f->len; j++, l = BM_iter_step(&liter)) {
|
||||
BM_elem_copy_attrs(bmold, bm, loops[j], l);
|
||||
BM_elem_attrs_copy(bmold, bm, loops[j], l);
|
||||
}
|
||||
|
||||
if (f == bmold->act_face) bm->act_face = f2;
|
||||
|
||||
@@ -207,7 +207,7 @@ void BM_face_interp_from_face(BMesh *bm, BMFace *target, BMFace *source)
|
||||
BLI_array_fixedstack_declare(blocks, BM_NGON_STACK_SIZE, source->len, __func__);
|
||||
int i;
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, source, target);
|
||||
BM_elem_attrs_copy(bm, bm, source, target);
|
||||
|
||||
i = 0;
|
||||
l_iter = l_first = BM_FACE_FIRST_LOOP(source);
|
||||
@@ -734,7 +734,7 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
|
||||
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);
|
||||
BM_elem_attrs_copy(bm, bm, source, target->f);
|
||||
|
||||
i = 0;
|
||||
l_iter = l_first = BM_FACE_FIRST_LOOP(source);
|
||||
|
||||
@@ -421,25 +421,25 @@ void bmesh_begin_edit(BMesh *bm, int flag)
|
||||
{
|
||||
bm->opflag = flag;
|
||||
|
||||
/* Most operators seem to be using BMOP_UNTAN_MULTIRES to change the MDisps to
|
||||
/* Most operators seem to be using BMO_OP_FLAG_UNTAN_MULTIRES to change the MDisps to
|
||||
* absolute space during mesh edits. With this enabled, changes to the topology
|
||||
* (loop cuts, edge subdivides, etc) are not reflected in the higher levels of
|
||||
* the mesh at all, which doesn't seem right. Turning off completely for now,
|
||||
* until this is shown to be better for certain types of mesh edits. */
|
||||
#if BMOP_UNTAN_MULTIRES_ENABLED
|
||||
/* switch multires data out of tangent space */
|
||||
if ((flag & BMOP_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
|
||||
if ((flag & BMO_OP_FLAG_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
|
||||
bmesh_set_mdisps_space(bm, MULTIRES_SPACE_TANGENT, MULTIRES_SPACE_ABSOLUTE);
|
||||
|
||||
/* ensure correct normals, if possible */
|
||||
bmesh_rationalize_normals(bm, 0);
|
||||
BM_mesh_normals_update(bm);
|
||||
}
|
||||
else if (flag & BMOP_RATIONALIZE_NORMALS) {
|
||||
else if (flag & BMO_OP_FLAG_RATIONALIZE_NORMALS) {
|
||||
bmesh_rationalize_normals(bm, 0);
|
||||
}
|
||||
#else
|
||||
if (flag & BMOP_RATIONALIZE_NORMALS) {
|
||||
if (flag & BMO_OP_FLAG_RATIONALIZE_NORMALS) {
|
||||
bmesh_rationalize_normals(bm, 0);
|
||||
}
|
||||
#endif
|
||||
@@ -447,19 +447,19 @@ void bmesh_begin_edit(BMesh *bm, int flag)
|
||||
|
||||
void bmesh_end_edit(BMesh *bm, int flag)
|
||||
{
|
||||
/* BMOP_UNTAN_MULTIRES disabled for now, see comment above in bmesh_begin_edit. */
|
||||
/* BMO_OP_FLAG_UNTAN_MULTIRES disabled for now, see comment above in bmesh_begin_edit. */
|
||||
#if BMOP_UNTAN_MULTIRES_ENABLED
|
||||
/* switch multires data into tangent space */
|
||||
if ((flag & BMOP_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
|
||||
if ((flag & BMO_OP_FLAG_UNTAN_MULTIRES) && CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
|
||||
/* set normals to their previous winding */
|
||||
bmesh_rationalize_normals(bm, 1);
|
||||
bmesh_set_mdisps_space(bm, MULTIRES_SPACE_ABSOLUTE, MULTIRES_SPACE_TANGENT);
|
||||
}
|
||||
else if (flag & BMOP_RATIONALIZE_NORMALS) {
|
||||
else if (flag & BMO_OP_FLAG_RATIONALIZE_NORMALS) {
|
||||
bmesh_rationalize_normals(bm, 1);
|
||||
}
|
||||
#else
|
||||
if (flag & BMOP_RATIONALIZE_NORMALS) {
|
||||
if (flag & BMO_OP_FLAG_RATIONALIZE_NORMALS) {
|
||||
bmesh_rationalize_normals(bm, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -353,7 +353,7 @@ BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **nl,
|
||||
nf = bmesh_sfme(bm, f, v1, v2, nl, NULL);
|
||||
|
||||
if (nf) {
|
||||
BM_elem_copy_attrs(bm, bm, f, nf);
|
||||
BM_elem_attrs_copy(bm, bm, f, nf);
|
||||
copy_v3_v3(nf->no, f->no);
|
||||
|
||||
/* handle multires update */
|
||||
@@ -577,7 +577,7 @@ BMVert *BM_edge_split(BMesh *bm, BMVert *v, BMEdge *e, BMEdge **ne, float percen
|
||||
|
||||
if (ne) {
|
||||
(*ne)->head.hflag = e->head.hflag;
|
||||
BM_elem_copy_attrs(bm, bm, e, *ne);
|
||||
BM_elem_attrs_copy(bm, bm, e, *ne);
|
||||
}
|
||||
|
||||
/* v->nv->v2 */
|
||||
|
||||
@@ -66,7 +66,7 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const struct BMVert *exampl
|
||||
|
||||
v->head.htype = BM_VERT;
|
||||
|
||||
/* 'v->no' is handled by BM_elem_copy_attrs */
|
||||
/* 'v->no' is handled by BM_elem_attrs_copy */
|
||||
if (co) copy_v3_v3(v->co, co);
|
||||
|
||||
/* allocate flag */
|
||||
@@ -75,7 +75,7 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const struct BMVert *exampl
|
||||
CustomData_bmesh_set_default(&bm->vdata, &v->head.data);
|
||||
|
||||
if (example) {
|
||||
BM_elem_copy_attrs(bm, bm, (BMVert *)example, (BMVert *)v);
|
||||
BM_elem_attrs_copy(bm, bm, (BMVert *)example, (BMVert *)v);
|
||||
}
|
||||
|
||||
BM_CHECK_ELEMENT(bm, v);
|
||||
@@ -141,7 +141,7 @@ BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example,
|
||||
bmesh_disk_append_edge(e, e->v2);
|
||||
|
||||
if (example)
|
||||
BM_elem_copy_attrs(bm, bm, (BMEdge *)example, (BMEdge *)e);
|
||||
BM_elem_attrs_copy(bm, bm, (BMEdge *)example, (BMEdge *)e);
|
||||
|
||||
BM_CHECK_ELEMENT(bm, e);
|
||||
|
||||
@@ -237,12 +237,12 @@ BMFace *BM_face_copy(BMesh *bm, BMFace *f, int copyedges, int copyverts)
|
||||
|
||||
f2 = BM_face_create(bm, verts, edges, f->len, FALSE);
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, f, f2);
|
||||
BM_elem_attrs_copy(bm, bm, f, f2);
|
||||
|
||||
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
|
||||
l2 = BM_FACE_FIRST_LOOP(f2);
|
||||
do {
|
||||
BM_elem_copy_attrs(bm, bm, l_iter, l2);
|
||||
BM_elem_attrs_copy(bm, bm, l_iter, l2);
|
||||
l2 = l2->next;
|
||||
} while ((l_iter = l_iter->next) != l_first);
|
||||
|
||||
@@ -719,7 +719,7 @@ static void bmesh_systag_elements(BMesh *UNUSED(bm), void *veles, int tot, int f
|
||||
int i;
|
||||
|
||||
for (i = 0; i < tot; i++) {
|
||||
bmesh_api_setflag(eles[i], flag);
|
||||
BM_ELEM_API_FLAG_ENABLE(eles[i], flag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ static void bmesh_clear_systag_elements(BMesh *UNUSED(bm), void *veles, int tot,
|
||||
int i;
|
||||
|
||||
for (i = 0; i < tot; i++) {
|
||||
bmesh_api_clearflag(eles[i], flag);
|
||||
BM_ELEM_API_FLAG_DISABLE(eles[i], flag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ static int count_flagged_radial(BMesh *bm, BMLoop *l, int flag)
|
||||
goto error;
|
||||
}
|
||||
|
||||
i += bmesh_api_getflag(l2->f, flag) ? 1 : 0;
|
||||
i += BM_ELEM_API_FLAG_TEST(l2->f, flag) ? 1 : 0;
|
||||
l2 = bmesh_radial_nextloop(l2);
|
||||
if (c >= BM_LOOP_RADIAL_MAX) {
|
||||
bmesh_error();
|
||||
@@ -771,7 +771,7 @@ static int UNUSED_FUNCTION(count_flagged_disk)(BMVert *v, int flag)
|
||||
return 0;
|
||||
|
||||
do {
|
||||
i += bmesh_api_getflag(e, flag) ? 1 : 0;
|
||||
i += BM_ELEM_API_FLAG_TEST(e, flag) ? 1 : 0;
|
||||
e = bmesh_disk_nextedge(e, v);
|
||||
} while (e != v->e);
|
||||
|
||||
@@ -796,7 +796,7 @@ static int disk_is_flagged(BMVert *v, int flag)
|
||||
return FALSE;
|
||||
|
||||
do {
|
||||
if (!bmesh_api_getflag(l->f, flag))
|
||||
if (!BM_ELEM_API_FLAG_TEST(l->f, flag))
|
||||
return FALSE;
|
||||
|
||||
l = l->radial_next;
|
||||
@@ -873,19 +873,19 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
|
||||
d1 = disk_is_flagged(l_iter->e->v1, _FLAG_JF);
|
||||
d2 = disk_is_flagged(l_iter->e->v2, _FLAG_JF);
|
||||
|
||||
if (!d1 && !d2 && !bmesh_api_getflag(l_iter->e, _FLAG_JF)) {
|
||||
if (!d1 && !d2 && !BM_ELEM_API_FLAG_TEST(l_iter->e, _FLAG_JF)) {
|
||||
BLI_array_append(deledges, l_iter->e);
|
||||
bmesh_api_setflag(l_iter->e, _FLAG_JF);
|
||||
BM_ELEM_API_FLAG_ENABLE(l_iter->e, _FLAG_JF);
|
||||
}
|
||||
else {
|
||||
if (d1 && !bmesh_api_getflag(l_iter->e->v1, _FLAG_JF)) {
|
||||
if (d1 && !BM_ELEM_API_FLAG_TEST(l_iter->e->v1, _FLAG_JF)) {
|
||||
BLI_array_append(delverts, l_iter->e->v1);
|
||||
bmesh_api_setflag(l_iter->e->v1, _FLAG_JF);
|
||||
BM_ELEM_API_FLAG_ENABLE(l_iter->e->v1, _FLAG_JF);
|
||||
}
|
||||
|
||||
if (d2 && !bmesh_api_getflag(l_iter->e->v2, _FLAG_JF)) {
|
||||
if (d2 && !BM_ELEM_API_FLAG_TEST(l_iter->e->v2, _FLAG_JF)) {
|
||||
BLI_array_append(delverts, l_iter->e->v2);
|
||||
bmesh_api_setflag(l_iter->e->v2, _FLAG_JF);
|
||||
BM_ELEM_API_FLAG_ENABLE(l_iter->e->v2, _FLAG_JF);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -913,7 +913,7 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
|
||||
BMLoop *l2 = l_iter->radial_next;
|
||||
|
||||
do {
|
||||
if (bmesh_api_getflag(l2->f, _FLAG_JF))
|
||||
if (BM_ELEM_API_FLAG_TEST(l2->f, _FLAG_JF))
|
||||
break;
|
||||
l2 = l2->radial_next;
|
||||
} while (l2 != l_iter);
|
||||
@@ -924,11 +924,11 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
|
||||
l2 = l2->next;
|
||||
}
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, l2, l_iter);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l_iter);
|
||||
}
|
||||
} while ((l_iter = l_iter->next) != l_first);
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, faces[0], newf);
|
||||
BM_elem_attrs_copy(bm, bm, faces[0], newf);
|
||||
|
||||
/* add hole */
|
||||
BLI_movelisttolist(&newf->loops, &holes);
|
||||
@@ -943,7 +943,7 @@ BMFace *BM_faces_join(BMesh *bm, BMFace **faces, int totface)
|
||||
}
|
||||
|
||||
bmesh_clear_systag_elements(bm, faces, totface, _FLAG_JF);
|
||||
bmesh_api_clearflag(newf, _FLAG_JF);
|
||||
BM_ELEM_API_FLAG_DISABLE(newf, _FLAG_JF);
|
||||
|
||||
/* handle multires data */
|
||||
if (CustomData_has_layer(&bm->ldata, CD_MDISPS)) {
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
* would be extracted from comments
|
||||
* next to them, e.g.
|
||||
*
|
||||
* {BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, //output slot, boundary region
|
||||
* {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output slot, boundary region
|
||||
*
|
||||
* the doc generator would automatically detect the presence of "output slot"
|
||||
* and flag the slot as an output. the same happens for "input slot". also
|
||||
@@ -97,11 +97,11 @@
|
||||
*/
|
||||
static BMOpDefine def_vertexsmooth = {
|
||||
"vertexsmooth",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMOP_OPSLOT_INT, "mirror_clip_x"}, //set vertices close to the x axis before the operation to 0
|
||||
{BMOP_OPSLOT_INT, "mirror_clip_y"}, //set vertices close to the y axis before the operation to 0
|
||||
{BMOP_OPSLOT_INT, "mirror_clip_z"}, //set vertices close to the z axis before the operation to 0
|
||||
{BMOP_OPSLOT_FLT, "clipdist"}, //clipping threshod for the above three slots
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMO_OP_SLOT_INT, "mirror_clip_x"}, //set vertices close to the x axis before the operation to 0
|
||||
{BMO_OP_SLOT_INT, "mirror_clip_y"}, //set vertices close to the y axis before the operation to 0
|
||||
{BMO_OP_SLOT_INT, "mirror_clip_z"}, //set vertices close to the z axis before the operation to 0
|
||||
{BMO_OP_SLOT_FLT, "clipdist"}, //clipping threshod for the above three slots
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
bmesh_vertexsmooth_exec,
|
||||
@@ -116,12 +116,12 @@ static BMOpDefine def_vertexsmooth = {
|
||||
|
||||
static BMOpDefine def_righthandfaces = {
|
||||
"righthandfaces",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"},
|
||||
{BMOP_OPSLOT_INT, "doflip"}, //internal flag, used by bmesh_rationalize_normals
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"},
|
||||
{BMO_OP_SLOT_INT, "doflip"}, //internal flag, used by bmesh_rationalize_normals
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
bmesh_righthandfaces_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -136,10 +136,10 @@ static BMOpDefine def_righthandfaces = {
|
||||
*/
|
||||
static BMOpDefine def_regionextend = {
|
||||
"regionextend",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"}, //input geometry
|
||||
{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
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output slot, computed boundary geometry.
|
||||
{BMO_OP_SLOT_INT, "constrict"}, //find boundary inside the regions, not outside.
|
||||
{BMO_OP_SLOT_INT, "usefaces"}, //extend from faces instead of edges
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
bmesh_regionextend_exec,
|
||||
@@ -154,13 +154,13 @@ static BMOpDefine def_regionextend = {
|
||||
*/
|
||||
static BMOpDefine def_edgerotate = {
|
||||
"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
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //newly spun edges
|
||||
{BMO_OP_SLOT_INT, "ccw"}, //rotate edge counter-clockwise if true, othewise clockwise
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
bmesh_edgerotate_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -171,11 +171,11 @@ static BMOpDefine def_edgerotate = {
|
||||
*/
|
||||
static BMOpDefine def_reversefaces = {
|
||||
"reversefaces",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, //input faces
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
bmesh_reversefaces_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -186,13 +186,13 @@ 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
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges
|
||||
{BMO_OP_SLOT_INT, "numcuts"}, //number of cuts
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "outsplit"}, //newly created vertices and edges
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
esplit_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -205,13 +205,13 @@ static BMOpDefine def_edgebisect = {
|
||||
|
||||
static BMOpDefine def_mirror = {
|
||||
"mirror",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"}, //input geometry
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix defining the mirror transformation
|
||||
{BMOP_OPSLOT_FLT, "mergedist"}, //maximum distance for merging. does no merging if 0.
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "newout"}, //output geometry, mirrored
|
||||
{BMOP_OPSLOT_INT, "axis"}, //the axis to use, 0, 1, or 2 for x, y, z
|
||||
{BMOP_OPSLOT_INT, "mirror_u"}, //mirror UVs across the u axis
|
||||
{BMOP_OPSLOT_INT, "mirror_v"}, //mirror UVs across the v axis
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix defining the mirror transformation
|
||||
{BMO_OP_SLOT_FLT, "mergedist"}, //maximum distance for merging. does no merging if 0.
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "newout"}, //output geometry, mirrored
|
||||
{BMO_OP_SLOT_INT, "axis"}, //the axis to use, 0, 1, or 2 for x, y, z
|
||||
{BMO_OP_SLOT_INT, "mirror_u"}, //mirror UVs across the u axis
|
||||
{BMO_OP_SLOT_INT, "mirror_v"}, //mirror UVs across the v axis
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_mirror_exec,
|
||||
0,
|
||||
@@ -225,10 +225,10 @@ static BMOpDefine def_mirror = {
|
||||
*/
|
||||
static BMOpDefine def_finddoubles = {
|
||||
"finddoubles",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "keepverts"}, //list of verts to keep
|
||||
{BMOP_OPSLOT_FLT, "dist"}, //minimum distance
|
||||
{BMOP_OPSLOT_MAPPING, "targetmapout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "keepverts"}, //list of verts to keep
|
||||
{BMO_OP_SLOT_FLT, "dist"}, //minimum distance
|
||||
{BMO_OP_SLOT_MAPPING, "targetmapout"},
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_finddoubles_exec,
|
||||
0,
|
||||
@@ -242,11 +242,11 @@ static BMOpDefine def_finddoubles = {
|
||||
*/
|
||||
static BMOpDefine def_removedoubles = {
|
||||
"removedoubles",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input verts
|
||||
{BMOP_OPSLOT_FLT, "dist"}, //minimum distance
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts
|
||||
{BMO_OP_SLOT_FLT, "dist"}, //minimum distance
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_removedoubles_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -258,11 +258,11 @@ static BMOpDefine def_removedoubles = {
|
||||
*/
|
||||
static BMOpDefine def_automerge = {
|
||||
"automerge",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input verts
|
||||
{BMOP_OPSLOT_FLT, "dist"}, //minimum distance
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts
|
||||
{BMO_OP_SLOT_FLT, "dist"}, //minimum distance
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_automerge_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -272,10 +272,10 @@ static BMOpDefine def_automerge = {
|
||||
*/
|
||||
static BMOpDefine def_collapse = {
|
||||
"collapse",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_collapse_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
|
||||
@@ -286,8 +286,8 @@ static BMOpDefine def_collapse = {
|
||||
*/
|
||||
static BMOpDefine def_pointmerge_facedata = {
|
||||
"pointmerge_facedata",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "snapv"}, /* snap verte */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "snapv"}, /* snap verte */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_pointmerge_facedata_exec,
|
||||
0,
|
||||
@@ -302,7 +302,7 @@ static BMOpDefine def_pointmerge_facedata = {
|
||||
*/
|
||||
static BMOpDefine def_vert_average_facedata = {
|
||||
"vert_average_facedata",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_vert_average_facedata_exec,
|
||||
0,
|
||||
@@ -315,11 +315,11 @@ static BMOpDefine def_vert_average_facedata = {
|
||||
*/
|
||||
static BMOpDefine def_pointmerge = {
|
||||
"pointmerge",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{BMOP_OPSLOT_VEC, "mergeco"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
|
||||
{BMO_OP_SLOT_VEC, "mergeco"},
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_pointmerge_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -329,7 +329,7 @@ static BMOpDefine def_pointmerge = {
|
||||
*/
|
||||
static BMOpDefine def_collapse_uvs = {
|
||||
"collapse_uvs",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_collapsecon_exec,
|
||||
0,
|
||||
@@ -344,10 +344,10 @@ static BMOpDefine def_collapse_uvs = {
|
||||
*/
|
||||
static BMOpDefine def_weldverts = {
|
||||
"weldverts",
|
||||
{{BMOP_OPSLOT_MAPPING, "targetmap"}, /* maps welded vertices to verts they should weld to */
|
||||
{{BMO_OP_SLOT_MAPPING, "targetmap"}, /* maps welded vertices to verts they should weld to */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_weldverts_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -358,8 +358,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
|
||||
{{BMO_OP_SLOT_VEC, "co"}, //the coordinate of the new vert
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "newvertout"}, //the new vert
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_makevert_exec,
|
||||
0,
|
||||
@@ -373,16 +373,16 @@ static BMOpDefine def_makevert = {
|
||||
*/
|
||||
static BMOpDefine def_join_triangles = {
|
||||
"join_triangles",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, //input geometry.
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, //joined faces
|
||||
{BMOP_OPSLOT_INT, "compare_sharp"},
|
||||
{BMOP_OPSLOT_INT, "compare_uvs"},
|
||||
{BMOP_OPSLOT_INT, "compare_vcols"},
|
||||
{BMOP_OPSLOT_INT, "compare_materials"},
|
||||
{BMOP_OPSLOT_FLT, "limit"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input geometry.
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //joined faces
|
||||
{BMO_OP_SLOT_INT, "compare_sharp"},
|
||||
{BMO_OP_SLOT_INT, "compare_uvs"},
|
||||
{BMO_OP_SLOT_INT, "compare_vcols"},
|
||||
{BMO_OP_SLOT_INT, "compare_materials"},
|
||||
{BMO_OP_SLOT_FLT, "limit"},
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_jointriangles_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -398,11 +398,11 @@ static BMOpDefine def_join_triangles = {
|
||||
*/
|
||||
static BMOpDefine def_contextual_create = {
|
||||
"contextual_create",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"}, //input geometry.
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, //newly-made face(s)
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry.
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //newly-made face(s)
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_contextual_create_exec,
|
||||
BMOP_UNTAN_MULTIRES,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -410,8 +410,8 @@ static BMOpDefine def_contextual_create = {
|
||||
*/
|
||||
static BMOpDefine def_bridge_loops = {
|
||||
"bridge_loops",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, /* new face */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_bridge_loops_exec,
|
||||
0,
|
||||
@@ -419,12 +419,12 @@ static BMOpDefine def_bridge_loops = {
|
||||
|
||||
static BMOpDefine def_edgenet_fill = {
|
||||
"edgenet_fill",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{BMOP_OPSLOT_MAPPING, "restrict"}, /* restricts edges to groups. maps edges to integer */
|
||||
{BMOP_OPSLOT_INT, "use_restrict"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "excludefaces"}, /* list of faces to ignore for manifold check */
|
||||
{BMOP_OPSLOT_MAPPING, "faceout_groupmap"}, /* maps new faces to the group numbers they came fro */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, /* new face */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
|
||||
{BMO_OP_SLOT_MAPPING, "restrict"}, /* restricts edges to groups. maps edges to integer */
|
||||
{BMO_OP_SLOT_INT, "use_restrict"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "excludefaces"}, /* list of faces to ignore for manifold check */
|
||||
{BMO_OP_SLOT_MAPPING, "faceout_groupmap"}, /* maps new faces to the group numbers they came fro */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_edgenet_fill_exec,
|
||||
0,
|
||||
@@ -442,8 +442,8 @@ static BMOpDefine def_edgenet_fill = {
|
||||
*/
|
||||
static BMOpDefine def_edgenet_prepare = {
|
||||
"edgenet_prepare",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, //input edges
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout"}, //new edges
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //new edges
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_edgenet_prepare,
|
||||
0,
|
||||
@@ -457,9 +457,9 @@ static BMOpDefine def_edgenet_prepare = {
|
||||
*/
|
||||
static BMOpDefine def_rotate = {
|
||||
"rotate",
|
||||
{{BMOP_OPSLOT_VEC, "cent"}, //center of rotation
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix defining rotation
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{{BMO_OP_SLOT_VEC, "cent"}, //center of rotation
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix defining rotation
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_rotate_exec,
|
||||
0,
|
||||
@@ -473,8 +473,8 @@ static BMOpDefine def_rotate = {
|
||||
*/
|
||||
static BMOpDefine def_translate = {
|
||||
"translate",
|
||||
{{BMOP_OPSLOT_VEC, "vec"}, //translation offset
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{{BMO_OP_SLOT_VEC, "vec"}, //translation offset
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_translate_exec,
|
||||
0,
|
||||
@@ -487,8 +487,8 @@ static BMOpDefine def_translate = {
|
||||
*/
|
||||
static BMOpDefine def_scale = {
|
||||
"scale",
|
||||
{{BMOP_OPSLOT_VEC, "vec"}, //scale factor
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{{BMO_OP_SLOT_VEC, "vec"}, //scale factor
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_scale_exec,
|
||||
0,
|
||||
@@ -503,8 +503,8 @@ static BMOpDefine def_scale = {
|
||||
*/
|
||||
static BMOpDefine def_transform = {
|
||||
"transform",
|
||||
{{BMOP_OPSLOT_MAT, "mat"}, //transform matrix
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{{BMO_OP_SLOT_MAT, "mat"}, //transform matrix
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_transform_exec,
|
||||
0,
|
||||
@@ -518,8 +518,8 @@ static BMOpDefine def_transform = {
|
||||
*/
|
||||
static BMOpDefine def_object_load_bmesh = {
|
||||
"object_load_bmesh",
|
||||
{{BMOP_OPSLOT_PNT, "scene"},
|
||||
{BMOP_OPSLOT_PNT, "object"},
|
||||
{{BMO_OP_SLOT_PNT, "scene"},
|
||||
{BMO_OP_SLOT_PNT, "object"},
|
||||
{0, /* null-terminating sentine */}},
|
||||
object_load_bmesh_exec,
|
||||
0,
|
||||
@@ -533,9 +533,9 @@ static BMOpDefine def_object_load_bmesh = {
|
||||
*/
|
||||
static BMOpDefine def_bmesh_to_mesh = {
|
||||
"bmesh_to_mesh",
|
||||
{{BMOP_OPSLOT_PNT, "mesh"}, //pointer to a mesh structure to fill in
|
||||
{BMOP_OPSLOT_PNT, "object"}, //pointer to an object structure
|
||||
{BMOP_OPSLOT_INT, "notesselation"}, //don't calculate mfaces
|
||||
{{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a mesh structure to fill in
|
||||
{BMO_OP_SLOT_PNT, "object"}, //pointer to an object structure
|
||||
{BMO_OP_SLOT_INT, "notesselation"}, //don't calculate mfaces
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_to_mesh_exec,
|
||||
0,
|
||||
@@ -549,9 +549,9 @@ static BMOpDefine def_bmesh_to_mesh = {
|
||||
*/
|
||||
static BMOpDefine def_mesh_to_bmesh = {
|
||||
"mesh_to_bmesh",
|
||||
{{BMOP_OPSLOT_PNT, "mesh"}, //pointer to a Mesh structure
|
||||
{BMOP_OPSLOT_PNT, "object"}, //pointer to an Object structure
|
||||
{BMOP_OPSLOT_INT, "set_shapekey"}, //load active shapekey coordinates into verts
|
||||
{{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a Mesh structure
|
||||
{BMO_OP_SLOT_PNT, "object"}, //pointer to an Object structure
|
||||
{BMO_OP_SLOT_INT, "set_shapekey"}, //load active shapekey coordinates into verts
|
||||
{0, /* null-terminating sentine */}},
|
||||
mesh_to_bmesh_exec,
|
||||
0
|
||||
@@ -564,9 +564,9 @@ static BMOpDefine def_mesh_to_bmesh = {
|
||||
*/
|
||||
static BMOpDefine def_extrude_indivface = {
|
||||
"extrude_face_indiv",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, //input faces
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, //output faces
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "skirtout"}, //output skirt geometry, faces and edges
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //output faces
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "skirtout"}, //output skirt geometry, faces and edges
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_extrude_face_indiv_exec,
|
||||
0
|
||||
@@ -580,8 +580,8 @@ static BMOpDefine def_extrude_indivface = {
|
||||
*/
|
||||
static BMOpDefine def_extrude_onlyedge = {
|
||||
"extrude_edge_only",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, //input vertices
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, //output geometry
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input vertices
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output geometry
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_extrude_onlyedge_exec,
|
||||
0
|
||||
@@ -594,9 +594,9 @@ static BMOpDefine def_extrude_onlyedge = {
|
||||
*/
|
||||
static BMOpDefine def_extrudeverts_indiv = {
|
||||
"extrude_vert_indiv",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout"}, //output wire edges
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output vertices
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //output wire edges
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output vertices
|
||||
{0} /* null-terminating sentine */},
|
||||
extrude_vert_indiv_exec,
|
||||
0
|
||||
@@ -604,19 +604,19 @@ static BMOpDefine def_extrudeverts_indiv = {
|
||||
|
||||
static BMOpDefine def_connectverts = {
|
||||
"connectverts",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"},
|
||||
{0} /* null-terminating sentine */},
|
||||
connectverts_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_extrudefaceregion = {
|
||||
"extrudefaceregion",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edgefacein"},
|
||||
{BMOP_OPSLOT_MAPPING, "exclude"},
|
||||
{BMOP_OPSLOT_INT, "alwayskeeporig"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edgefacein"},
|
||||
{BMO_OP_SLOT_MAPPING, "exclude"},
|
||||
{BMO_OP_SLOT_INT, "alwayskeeporig"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"},
|
||||
{0} /* null-terminating sentine */},
|
||||
extrude_edge_context_exec,
|
||||
0
|
||||
@@ -624,82 +624,82 @@ static BMOpDefine def_extrudefaceregion = {
|
||||
|
||||
static BMOpDefine def_dissolvevertsop = {
|
||||
"dissolveverts",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"},
|
||||
{0} /* null-terminating sentine */},
|
||||
dissolveverts_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_dissolveedgessop = {
|
||||
"dissolveedges",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "regionout"},
|
||||
{BMOP_OPSLOT_INT, "use_verts"}, // dissolve verts left between only 2 edges.
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "regionout"},
|
||||
{BMO_OP_SLOT_INT, "use_verts"}, // dissolve verts left between only 2 edges.
|
||||
{0} /* null-terminating sentine */},
|
||||
dissolveedges_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_dissolveedgeloopsop = {
|
||||
"dissolveedgeloop",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "regionout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "regionout"},
|
||||
{0} /* null-terminating sentine */},
|
||||
dissolve_edgeloop_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_dissolvefacesop = {
|
||||
"dissolvefaces",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "regionout"},
|
||||
{BMOP_OPSLOT_INT, "use_verts"}, // dissolve verts left between only 2 edges.
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "regionout"},
|
||||
{BMO_OP_SLOT_INT, "use_verts"}, // dissolve verts left between only 2 edges.
|
||||
{0} /* null-terminating sentine */},
|
||||
dissolvefaces_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
|
||||
static BMOpDefine def_triangop = {
|
||||
"triangulate",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"},
|
||||
{BMOP_OPSLOT_MAPPING, "facemap"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"},
|
||||
{BMO_OP_SLOT_MAPPING, "facemap"},
|
||||
{0} /* null-terminating sentine */},
|
||||
triangulate_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_subdop = {
|
||||
"esubd",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"},
|
||||
{BMOP_OPSLOT_INT, "numcuts"},
|
||||
{BMOP_OPSLOT_FLT, "smooth"},
|
||||
{BMOP_OPSLOT_FLT, "fractal"},
|
||||
{BMOP_OPSLOT_INT, "beauty"},
|
||||
{BMOP_OPSLOT_INT, "seed"},
|
||||
{BMOP_OPSLOT_MAPPING, "custompatterns"},
|
||||
{BMOP_OPSLOT_MAPPING, "edgepercents"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"},
|
||||
{BMO_OP_SLOT_INT, "numcuts"},
|
||||
{BMO_OP_SLOT_FLT, "smooth"},
|
||||
{BMO_OP_SLOT_FLT, "fractal"},
|
||||
{BMO_OP_SLOT_INT, "beauty"},
|
||||
{BMO_OP_SLOT_INT, "seed"},
|
||||
{BMO_OP_SLOT_MAPPING, "custompatterns"},
|
||||
{BMO_OP_SLOT_MAPPING, "edgepercents"},
|
||||
|
||||
/* these next three can have multiple types of elements in them */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "outinner"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "outsplit"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, /* contains all output geometr */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "outinner"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "outsplit"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* contains all output geometr */
|
||||
|
||||
{BMOP_OPSLOT_INT, "quadcornertype"}, //quad corner type, see bmesh_operators.h
|
||||
{BMOP_OPSLOT_INT, "gridfill"}, //fill in fully-selected faces with a grid
|
||||
{BMOP_OPSLOT_INT, "singleedge"}, //tesselate the case of one edge selected in a quad or triangle
|
||||
{BMO_OP_SLOT_INT, "quadcornertype"}, //quad corner type, see bmesh_operators.h
|
||||
{BMO_OP_SLOT_INT, "gridfill"}, //fill in fully-selected faces with a grid
|
||||
{BMO_OP_SLOT_INT, "singleedge"}, //tesselate the case of one edge selected in a quad or triangle
|
||||
|
||||
{0} /* null-terminating sentine */,
|
||||
},
|
||||
esubdivide_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
static BMOpDefine def_delop = {
|
||||
"del",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"}, {BMOP_OPSLOT_INT, "context"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_INT, "context"},
|
||||
{0} /* null-terminating sentine */},
|
||||
delop_exec,
|
||||
0
|
||||
@@ -707,15 +707,15 @@ static BMOpDefine def_delop = {
|
||||
|
||||
static BMOpDefine def_dupeop = {
|
||||
"dupe",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "origout"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "newout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "origout"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "newout"},
|
||||
/* facemap maps from source faces to dupe
|
||||
* faces, and from dupe faces to source faces */
|
||||
{BMOP_OPSLOT_MAPPING, "facemap"},
|
||||
{BMOP_OPSLOT_MAPPING, "boundarymap"},
|
||||
{BMOP_OPSLOT_MAPPING, "isovertmap"},
|
||||
{BMOP_OPSLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */
|
||||
{BMO_OP_SLOT_MAPPING, "facemap"},
|
||||
{BMO_OP_SLOT_MAPPING, "boundarymap"},
|
||||
{BMO_OP_SLOT_MAPPING, "isovertmap"},
|
||||
{BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */
|
||||
{0} /* null-terminating sentine */},
|
||||
dupeop_exec,
|
||||
0
|
||||
@@ -723,11 +723,11 @@ static BMOpDefine def_dupeop = {
|
||||
|
||||
static BMOpDefine def_splitop = {
|
||||
"split",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"},
|
||||
{BMOP_OPSLOT_MAPPING, "boundarymap"},
|
||||
{BMOP_OPSLOT_MAPPING, "isovertmap"},
|
||||
{BMOP_OPSLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"},
|
||||
{BMO_OP_SLOT_MAPPING, "boundarymap"},
|
||||
{BMO_OP_SLOT_MAPPING, "isovertmap"},
|
||||
{BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */
|
||||
{0} /* null-terminating sentine */},
|
||||
splitop_exec,
|
||||
0
|
||||
@@ -741,14 +741,14 @@ static BMOpDefine def_splitop = {
|
||||
*/
|
||||
static BMOpDefine def_spinop = {
|
||||
"spin",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "lastout"}, /* result of last step */
|
||||
{BMOP_OPSLOT_VEC, "cent"}, /* rotation center */
|
||||
{BMOP_OPSLOT_VEC, "axis"}, /* rotation axis */
|
||||
{BMOP_OPSLOT_VEC, "dvec"}, /* translation delta per step */
|
||||
{BMOP_OPSLOT_FLT, "ang"}, /* total rotation angle (degrees) */
|
||||
{BMOP_OPSLOT_INT, "steps"}, /* number of steps */
|
||||
{BMOP_OPSLOT_INT, "dupli"}, /* duplicate or extrude? */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "lastout"}, /* result of last step */
|
||||
{BMO_OP_SLOT_VEC, "cent"}, /* rotation center */
|
||||
{BMO_OP_SLOT_VEC, "axis"}, /* rotation axis */
|
||||
{BMO_OP_SLOT_VEC, "dvec"}, /* translation delta per step */
|
||||
{BMO_OP_SLOT_FLT, "ang"}, /* total rotation angle (degrees) */
|
||||
{BMO_OP_SLOT_INT, "steps"}, /* number of steps */
|
||||
{BMO_OP_SLOT_INT, "dupli"}, /* duplicate or extrude? */
|
||||
{0} /* null-terminating sentine */},
|
||||
spinop_exec,
|
||||
0
|
||||
@@ -762,10 +762,10 @@ static BMOpDefine def_spinop = {
|
||||
*/
|
||||
static BMOpDefine def_similarfaces = {
|
||||
"similarfaces",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "faceout"}, /* output faces */
|
||||
{BMOP_OPSLOT_INT, "type"}, /* type of selection */
|
||||
{BMOP_OPSLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* output faces */
|
||||
{BMO_OP_SLOT_INT, "type"}, /* type of selection */
|
||||
{BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_similarfaces_exec,
|
||||
0
|
||||
@@ -778,10 +778,10 @@ static BMOpDefine def_similarfaces = {
|
||||
*/
|
||||
static BMOpDefine def_similaredges = {
|
||||
"similaredges",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout"}, /* output edges */
|
||||
{BMOP_OPSLOT_INT, "type"}, /* type of selection */
|
||||
{BMOP_OPSLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* output edges */
|
||||
{BMO_OP_SLOT_INT, "type"}, /* type of selection */
|
||||
{BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_similaredges_exec,
|
||||
0
|
||||
@@ -794,10 +794,10 @@ static BMOpDefine def_similaredges = {
|
||||
*/
|
||||
static BMOpDefine def_similarverts = {
|
||||
"similarverts",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "verts"}, /* input vertices */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, /* output vertices */
|
||||
{BMOP_OPSLOT_INT, "type"}, /* type of selection */
|
||||
{BMOP_OPSLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertices */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */
|
||||
{BMO_OP_SLOT_INT, "type"}, /* type of selection */
|
||||
{BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_similarverts_exec,
|
||||
0
|
||||
@@ -809,8 +809,8 @@ static BMOpDefine def_similarverts = {
|
||||
*/
|
||||
static BMOpDefine def_meshrotateuvs = {
|
||||
"meshrotateuvs",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMOP_OPSLOT_INT, "dir"}, /* direction */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMO_OP_SLOT_INT, "dir"}, /* direction */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_rotateuvs_exec,
|
||||
0
|
||||
@@ -822,7 +822,7 @@ static BMOpDefine def_meshrotateuvs = {
|
||||
*/
|
||||
static BMOpDefine def_meshreverseuvs = {
|
||||
"meshreverseuvs",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_reverseuvs_exec,
|
||||
0
|
||||
@@ -834,8 +834,8 @@ static BMOpDefine def_meshreverseuvs = {
|
||||
*/
|
||||
static BMOpDefine def_meshrotatecolors = {
|
||||
"meshrotatecolors",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMOP_OPSLOT_INT, "dir"}, /* direction */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMO_OP_SLOT_INT, "dir"}, /* direction */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_rotatecolors_exec,
|
||||
0
|
||||
@@ -847,7 +847,7 @@ static BMOpDefine def_meshrotatecolors = {
|
||||
*/
|
||||
static BMOpDefine def_meshreversecolors = {
|
||||
"meshreversecolors",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_reversecolors_exec,
|
||||
0
|
||||
@@ -860,10 +860,10 @@ static BMOpDefine def_meshreversecolors = {
|
||||
*/
|
||||
static BMOpDefine def_vertexshortestpath = {
|
||||
"vertexshortestpath",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "startv"}, /* start vertex */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "endv"}, /* end vertex */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, /* output vertices */
|
||||
{BMOP_OPSLOT_INT, "type"}, /* type of selection */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "startv"}, /* start vertex */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "endv"}, /* end vertex */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */
|
||||
{BMO_OP_SLOT_INT, "type"}, /* type of selection */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_vertexshortestpath_exec,
|
||||
0
|
||||
@@ -876,12 +876,12 @@ static BMOpDefine def_vertexshortestpath = {
|
||||
*/
|
||||
static BMOpDefine def_edgesplit = {
|
||||
"edgesplit",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout1"}, /* old output disconnected edges */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "edgeout2"}, /* new output disconnected edges */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout1"}, /* old output disconnected edges */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "edgeout2"}, /* new output disconnected edges */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_edgesplitop_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -891,11 +891,11 @@ static BMOpDefine def_edgesplit = {
|
||||
*/
|
||||
static BMOpDefine def_create_grid = {
|
||||
"create_grid",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_INT, "xsegments"}, //number of x segments
|
||||
{BMOP_OPSLOT_INT, "ysegments"}, //number of y segments
|
||||
{BMOP_OPSLOT_FLT, "size"}, //size of the grid
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_INT, "xsegments"}, //number of x segments
|
||||
{BMO_OP_SLOT_INT, "ysegments"}, //number of y segments
|
||||
{BMO_OP_SLOT_FLT, "size"}, //size of the grid
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_grid_exec,
|
||||
0,
|
||||
@@ -908,11 +908,11 @@ static BMOpDefine def_create_grid = {
|
||||
*/
|
||||
static BMOpDefine def_create_uvsphere = {
|
||||
"create_uvsphere",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_INT, "segments"}, //number of u segments
|
||||
{BMOP_OPSLOT_INT, "revolutions"}, //number of v segment
|
||||
{BMOP_OPSLOT_FLT, "diameter"}, //diameter
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_INT, "segments"}, //number of u segments
|
||||
{BMO_OP_SLOT_INT, "revolutions"}, //number of v segment
|
||||
{BMO_OP_SLOT_FLT, "diameter"}, //diameter
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_uvsphere_exec,
|
||||
0,
|
||||
@@ -925,10 +925,10 @@ static BMOpDefine def_create_uvsphere = {
|
||||
*/
|
||||
static BMOpDefine def_create_icosphere = {
|
||||
"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
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_INT, "subdivisions"}, //how many times to recursively subdivide the sphere
|
||||
{BMO_OP_SLOT_FLT, "diameter"}, //diameter
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_icosphere_exec,
|
||||
0,
|
||||
@@ -941,8 +941,8 @@ static BMOpDefine def_create_icosphere = {
|
||||
*/
|
||||
static BMOpDefine def_create_monkey = {
|
||||
"create_monkey",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_monkey_exec,
|
||||
0,
|
||||
@@ -955,14 +955,14 @@ static BMOpDefine def_create_monkey = {
|
||||
*/
|
||||
static BMOpDefine def_create_cone = {
|
||||
"create_cone",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_INT, "cap_ends"}, //wheter or not to fill in the ends with faces
|
||||
{BMOP_OPSLOT_INT, "cap_tris"}, //fill ends with triangles instead of ngons
|
||||
{BMOP_OPSLOT_INT, "segments"},
|
||||
{BMOP_OPSLOT_FLT, "diameter1"}, //diameter of one end
|
||||
{BMOP_OPSLOT_FLT, "diameter2"}, //diameter of the opposite
|
||||
{BMOP_OPSLOT_FLT, "depth"}, //distance between ends
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_INT, "cap_ends"}, //wheter or not to fill in the ends with faces
|
||||
{BMO_OP_SLOT_INT, "cap_tris"}, //fill ends with triangles instead of ngons
|
||||
{BMO_OP_SLOT_INT, "segments"},
|
||||
{BMO_OP_SLOT_FLT, "diameter1"}, //diameter of one end
|
||||
{BMO_OP_SLOT_FLT, "diameter2"}, //diameter of the opposite
|
||||
{BMO_OP_SLOT_FLT, "depth"}, //distance between ends
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_cone_exec,
|
||||
0,
|
||||
@@ -973,12 +973,12 @@ static BMOpDefine def_create_cone = {
|
||||
*/
|
||||
static BMOpDefine def_create_circle = {
|
||||
"create_circle",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_INT, "cap_ends"}, //wheter or not to fill in the ends with faces
|
||||
{BMOP_OPSLOT_INT, "cap_tris"}, //fill ends with triangles instead of ngons
|
||||
{BMOP_OPSLOT_INT, "segments"},
|
||||
{BMOP_OPSLOT_FLT, "diameter"}, //diameter of one end
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_INT, "cap_ends"}, //wheter or not to fill in the ends with faces
|
||||
{BMO_OP_SLOT_INT, "cap_tris"}, //fill ends with triangles instead of ngons
|
||||
{BMO_OP_SLOT_INT, "segments"},
|
||||
{BMO_OP_SLOT_FLT, "diameter"}, //diameter of one end
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_circle_exec,
|
||||
0,
|
||||
@@ -991,9 +991,9 @@ static BMOpDefine def_create_circle = {
|
||||
*/
|
||||
static BMOpDefine def_create_cube = {
|
||||
"create_cube",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMOP_OPSLOT_FLT, "size"}, //size of the cube
|
||||
{BMOP_OPSLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts
|
||||
{BMO_OP_SLOT_FLT, "size"}, //size of the cube
|
||||
{BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with--
|
||||
{0, /* null-terminating sentine */}},
|
||||
bmesh_create_cube_exec,
|
||||
0,
|
||||
@@ -1006,18 +1006,18 @@ static BMOpDefine def_create_cube = {
|
||||
*/
|
||||
static BMOpDefine def_bevel = {
|
||||
"bevel",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"}, /* input edges and vertices */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "face_spans"}, /* new geometry */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "face_holes"}, /* new geometry */
|
||||
{BMOP_OPSLOT_INT, "use_lengths"}, /* grab edge lengths from a PROP_FLT customdata laye */
|
||||
{BMOP_OPSLOT_INT, "use_even"}, /* corner vert placement: use shell/angle calculations */
|
||||
{BMOP_OPSLOT_INT, "use_dist"}, /* corner vert placement: evaluate percent as a distance,
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, /* input edges and vertices */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "face_spans"}, /* new geometry */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "face_holes"}, /* new geometry */
|
||||
{BMO_OP_SLOT_INT, "use_lengths"}, /* grab edge lengths from a PROP_FLT customdata laye */
|
||||
{BMO_OP_SLOT_INT, "use_even"}, /* corner vert placement: use shell/angle calculations */
|
||||
{BMO_OP_SLOT_INT, "use_dist"}, /* corner vert placement: evaluate percent as a distance,
|
||||
* modifier uses this. We could do this as another float setting */
|
||||
{BMOP_OPSLOT_INT, "lengthlayer"}, /* which PROP_FLT layer to us */
|
||||
{BMOP_OPSLOT_FLT, "percent"}, /* percentage to expand bevelled edge */
|
||||
{BMO_OP_SLOT_INT, "lengthlayer"}, /* which PROP_FLT layer to us */
|
||||
{BMO_OP_SLOT_FLT, "percent"}, /* percentage to expand bevelled edge */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_bevel_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1027,12 +1027,12 @@ static BMOpDefine def_bevel = {
|
||||
*/
|
||||
static BMOpDefine def_beautify_fill = {
|
||||
"beautify_fill",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "constrain_edges"}, /* edges that can't be flipped */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, /* new flipped faces and edges */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "constrain_edges"}, /* edges that can't be flipped */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new flipped faces and edges */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_beautify_fill_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1042,11 +1042,11 @@ static BMOpDefine def_beautify_fill = {
|
||||
*/
|
||||
static BMOpDefine def_triangle_fill = {
|
||||
"triangle_fill",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"}, /* new faces and edges */
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new faces and edges */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmesh_triangle_fill_exec,
|
||||
BMOP_UNTAN_MULTIRES
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1056,9 +1056,9 @@ static BMOpDefine def_triangle_fill = {
|
||||
*/
|
||||
static BMOpDefine def_solidify = {
|
||||
"solidify",
|
||||
{{BMOP_OPSLOT_ELEMENT_BUF, "geom"},
|
||||
{BMOP_OPSLOT_FLT, "thickness"},
|
||||
{BMOP_OPSLOT_ELEMENT_BUF, "geomout"},
|
||||
{{BMO_OP_SLOT_ELEMENT_BUF, "geom"},
|
||||
{BMO_OP_SLOT_FLT, "thickness"},
|
||||
{BMO_OP_SLOT_ELEMENT_BUF, "geomout"},
|
||||
{0}},
|
||||
bmesh_solidify_face_region_exec,
|
||||
0
|
||||
|
||||
@@ -197,7 +197,7 @@ void BMO_op_finish(BMesh *bm, BMOperator *op)
|
||||
|
||||
for (i = 0; opdefines[op->type]->slottypes[i].type; i++) {
|
||||
slot = &op->slots[i];
|
||||
if (slot->slottype == BMOP_OPSLOT_MAPPING) {
|
||||
if (slot->slottype == BMO_OP_SLOT_MAPPING) {
|
||||
if (slot->data.ghash)
|
||||
BLI_ghash_free(slot->data.ghash, NULL, NULL);
|
||||
}
|
||||
@@ -257,8 +257,8 @@ void BMO_slot_copy(BMOperator *source_op, BMOperator *dest_op, const char *src,
|
||||
if (source_slot->slottype != dest_slot->slottype)
|
||||
return;
|
||||
|
||||
if (dest_slot->slottype > BMOP_OPSLOT_VEC) {
|
||||
if (dest_slot->slottype != BMOP_OPSLOT_MAPPING) {
|
||||
if (dest_slot->slottype > BMO_OP_SLOT_VEC) {
|
||||
if (dest_slot->slottype != BMO_OP_SLOT_MAPPING) {
|
||||
/* do buffer copy */
|
||||
dest_slot->data.buf = NULL;
|
||||
dest_slot->len = source_slot->len;
|
||||
@@ -309,7 +309,7 @@ void BMO_slot_copy(BMOperator *source_op, BMOperator *dest_op, const char *src,
|
||||
void BMO_slot_float_set(BMOperator *op, const char *slotname, float f)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_FLT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_FLT))
|
||||
return;
|
||||
|
||||
slot->data.f = f;
|
||||
@@ -318,7 +318,7 @@ void BMO_slot_float_set(BMOperator *op, const char *slotname, float f)
|
||||
void BMO_slot_int_set(BMOperator *op, const char *slotname, int i)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_INT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_INT))
|
||||
return;
|
||||
|
||||
slot->data.i = i;
|
||||
@@ -328,7 +328,7 @@ void BMO_slot_int_set(BMOperator *op, const char *slotname, int i)
|
||||
void BMO_slot_mat_set(struct BMOperator *op, const char *slotname, float *mat, int size)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_MAT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_MAT))
|
||||
return;
|
||||
|
||||
slot->len = 4;
|
||||
@@ -351,7 +351,7 @@ void BMO_slot_mat_set(struct BMOperator *op, const char *slotname, float *mat, i
|
||||
void BMO_slot_mat4_set(struct BMOperator *op, const char *slotname, float mat[4][4])
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_MAT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_MAT))
|
||||
return;
|
||||
|
||||
memcpy(mat, slot->data.p, sizeof(float) * 4 * 4);
|
||||
@@ -360,7 +360,7 @@ void BMO_slot_mat4_set(struct BMOperator *op, const char *slotname, float mat[4]
|
||||
void BMO_slot_mat3_set(struct BMOperator *op, const char *slotname, float mat[3][3])
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_MAT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_MAT))
|
||||
return;
|
||||
|
||||
copy_m3_m4(mat, slot->data.p);
|
||||
@@ -369,7 +369,7 @@ void BMO_slot_mat3_set(struct BMOperator *op, const char *slotname, float mat[3]
|
||||
void BMO_slot_ptr_set(BMOperator *op, const char *slotname, void *p)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_PNT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_PNT))
|
||||
return;
|
||||
|
||||
slot->data.p = p;
|
||||
@@ -378,7 +378,7 @@ void BMO_slot_ptr_set(BMOperator *op, const char *slotname, void *p)
|
||||
void BMO_slot_vec_set(BMOperator *op, const char *slotname, const float vec[3])
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_VEC))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_VEC))
|
||||
return;
|
||||
|
||||
copy_v3_v3(slot->data.vec, vec);
|
||||
@@ -388,7 +388,7 @@ void BMO_slot_vec_set(BMOperator *op, const char *slotname, const float vec[3])
|
||||
float BMO_slot_float_get(BMOperator *op, const char *slotname)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_FLT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_FLT))
|
||||
return 0.0f;
|
||||
|
||||
return slot->data.f;
|
||||
@@ -397,7 +397,7 @@ float BMO_slot_float_get(BMOperator *op, const char *slotname)
|
||||
int BMO_slot_int_get(BMOperator *op, const char *slotname)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_INT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_INT))
|
||||
return 0;
|
||||
|
||||
return slot->data.i;
|
||||
@@ -407,7 +407,7 @@ int BMO_slot_int_get(BMOperator *op, const char *slotname)
|
||||
void *BMO_slot_ptr_get(BMOperator *op, const char *slotname)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_PNT))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_PNT))
|
||||
return NULL;
|
||||
|
||||
return slot->data.p;
|
||||
@@ -416,7 +416,7 @@ void *BMO_slot_ptr_get(BMOperator *op, const char *slotname)
|
||||
void BMO_slot_vec_get(BMOperator *op, const char *slotname, float r_vec[3])
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
if (!(slot->slottype == BMOP_OPSLOT_VEC))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_VEC))
|
||||
return;
|
||||
|
||||
copy_v3_v3(r_vec, slot->data.vec);
|
||||
@@ -484,7 +484,7 @@ int BMO_slot_buf_count(struct BMesh *UNUSED(bm), struct BMOperator *op, const ch
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
/* check if its actually a buffer */
|
||||
if (!(slot->slottype > BMOP_OPSLOT_VEC))
|
||||
if (!(slot->slottype > BMO_OP_SLOT_VEC))
|
||||
return 0;
|
||||
|
||||
return slot->len;
|
||||
@@ -495,7 +495,7 @@ int BMO_slot_map_count(BMesh *UNUSED(bm), BMOperator *op, const char *slotname)
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
/* check if its actually a buffer */
|
||||
if (!(slot->slottype == BMOP_OPSLOT_MAPPING))
|
||||
if (!(slot->slottype == BMO_OP_SLOT_MAPPING))
|
||||
return 0;
|
||||
|
||||
return slot->data.ghash ? BLI_ghash_size(slot->data.ghash) : 0;
|
||||
@@ -508,7 +508,7 @@ void *BMO_Grow_Array(BMesh *bm, BMOperator *op, int slotcode, int totadd)
|
||||
void *tmp;
|
||||
|
||||
/* check if its actually a buffer */
|
||||
if (!(slot->slottype > BMOP_OPSLOT_VEC))
|
||||
if (!(slot->slottype > BMO_OP_SLOT_VEC))
|
||||
return NULL;
|
||||
|
||||
if (slot->flag & BMOS_DYNAMIC_ARRAY) {
|
||||
@@ -544,7 +544,7 @@ void BMO_slot_map_to_flag(struct BMesh *bm, struct BMOperator *op,
|
||||
BMHeader *ele;
|
||||
|
||||
/* sanity check */
|
||||
if (slot->slottype != BMOP_OPSLOT_MAPPING) return;
|
||||
if (slot->slottype != BMO_OP_SLOT_MAPPING) return;
|
||||
if (!slot->data.ghash) return;
|
||||
|
||||
BLI_ghashIterator_init(&it, slot->data.ghash);
|
||||
@@ -558,7 +558,7 @@ static void *bmo_slot_buffer_alloc(BMOperator *op, const char *slotname, int len
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
/* check if its actually a buffer */
|
||||
if (!(slot->slottype > BMOP_OPSLOT_VEC))
|
||||
if (!(slot->slottype > BMO_OP_SLOT_VEC))
|
||||
return NULL;
|
||||
|
||||
slot->len = len;
|
||||
@@ -959,7 +959,7 @@ void *BMO_slot_elem_first(BMOperator *op, const char *slotname)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(op, slotname);
|
||||
|
||||
if (slot->slottype != BMOP_OPSLOT_ELEMENT_BUF)
|
||||
if (slot->slottype != BMO_OP_SLOT_ELEMENT_BUF)
|
||||
return NULL;
|
||||
|
||||
return slot->data.buf ? *(void **)slot->data.buf : NULL;
|
||||
@@ -976,7 +976,7 @@ void *BMO_iter_new(BMOIter *iter, BMesh *UNUSED(bm), BMOperator *op,
|
||||
iter->cur = 0;
|
||||
iter->restrictmask = restrictmask;
|
||||
|
||||
if (iter->slot->slottype == BMOP_OPSLOT_MAPPING) {
|
||||
if (iter->slot->slottype == BMO_OP_SLOT_MAPPING) {
|
||||
if (iter->slot->data.ghash) {
|
||||
BLI_ghashIterator_init(&iter->giter, slot->data.ghash);
|
||||
}
|
||||
@@ -990,7 +990,7 @@ void *BMO_iter_new(BMOIter *iter, BMesh *UNUSED(bm), BMOperator *op,
|
||||
|
||||
void *BMO_iter_step(BMOIter *iter)
|
||||
{
|
||||
if (iter->slot->slottype == BMOP_OPSLOT_ELEMENT_BUF) {
|
||||
if (iter->slot->slottype == BMO_OP_SLOT_ELEMENT_BUF) {
|
||||
BMHeader *h;
|
||||
|
||||
if (iter->cur >= iter->slot->len) {
|
||||
@@ -1008,7 +1008,7 @@ void *BMO_iter_step(BMOIter *iter)
|
||||
|
||||
return h;
|
||||
}
|
||||
else if (iter->slot->slottype == BMOP_OPSLOT_MAPPING) {
|
||||
else if (iter->slot->slottype == BMO_OP_SLOT_MAPPING) {
|
||||
struct BMOElemMapping *map;
|
||||
void *ret = BLI_ghashIterator_getKey(&iter->giter);
|
||||
map = BLI_ghashIterator_getValue(&iter->giter);
|
||||
@@ -1369,62 +1369,3 @@ int BMO_op_callf(BMesh *bm, const char *fmt, ...)
|
||||
va_end(list);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* BMO_TOGGLEFLAG
|
||||
*
|
||||
* Toggles a flag for a certain element
|
||||
*/
|
||||
#ifdef BMO_elem_flag_toggle
|
||||
#undef BMO_elem_flag_toggle
|
||||
#endif
|
||||
static void BMO_elem_flag_toggle(BMesh *bm, void *element, const short oflag)
|
||||
{
|
||||
BMHeader *head = element;
|
||||
head->flags[bm->stackdepth - 1].f ^= oflag;
|
||||
}
|
||||
|
||||
/*
|
||||
* BMO_SETFLAG
|
||||
*
|
||||
* Sets a flag for a certain element
|
||||
*/
|
||||
#ifdef BMO_elem_flag_enable
|
||||
#undef BMO_elem_flag_enable
|
||||
#endif
|
||||
static void BMO_elem_flag_enable(BMesh *bm, void *element, const short oflag)
|
||||
{
|
||||
BMHeader *head = element;
|
||||
head->flags[bm->stackdepth - 1].f |= oflag;
|
||||
}
|
||||
|
||||
/*
|
||||
* BMO_CLEARFLAG
|
||||
*
|
||||
* Clears a specific flag from a given element
|
||||
*/
|
||||
#ifdef BMO_elem_flag_disable
|
||||
#undef BMO_elem_flag_disable
|
||||
#endif
|
||||
static void BMO_elem_flag_disable(BMesh *bm, void *element, const short oflag)
|
||||
{
|
||||
BMHeader *head = element;
|
||||
head->flags[bm->stackdepth - 1].f &= ~oflag;
|
||||
}
|
||||
|
||||
/*
|
||||
* BMO_TESTFLAG
|
||||
*
|
||||
* Tests whether or not a flag is set for a specific element
|
||||
*
|
||||
*/
|
||||
#ifdef BMO_elem_flag_test
|
||||
#undef BMO_elem_flag_test
|
||||
#endif
|
||||
static int BMO_elem_flag_test(BMesh *bm, void *element, const short oflag)
|
||||
{
|
||||
BMHeader *head = element;
|
||||
if (head->flags[bm->stackdepth - 1].f & oflag)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@ static BMLoop *find_ear(BMesh *UNUSED(bm), BMFace *f, float (*verts)[3], const i
|
||||
* with a length equal to f->len. it will be filled with the new
|
||||
* triangles, and will be NULL-terminated.
|
||||
*/
|
||||
void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3],
|
||||
void BM_face_triangulate(BMesh *bm, BMFace *f, float (*projectverts)[3],
|
||||
const short newedge_oflag, const short newface_oflag, BMFace **newfaces)
|
||||
{
|
||||
int i, done, nvert, nf_i = 0;
|
||||
|
||||
@@ -50,7 +50,7 @@ int bmesh_check_element(BMesh *bm, void *element, const char htype);
|
||||
__LINE__, __FILE__); \
|
||||
}
|
||||
|
||||
#define bm_get_edge_link(e, v) ( \
|
||||
#define BM_EDGE_LINK_GET(e, v) ( \
|
||||
((v) == ((BMEdge*)(e))->v1) ? \
|
||||
(Link *)&(((BMEdge*)(e))->dlink1) : \
|
||||
(Link *)&(((BMEdge*)(e))->dlink2) \
|
||||
@@ -71,13 +71,13 @@ int bmesh_get_filter_argtype(int type);
|
||||
#define _FLAG_JF 1 /* join faces */
|
||||
#define _FLAG_MF 2 /* make face */
|
||||
|
||||
#define bmesh_api_setflag(element, f) (((BMHeader*)(element))->flags[0].pflag |= (f))
|
||||
#define bmesh_api_getflag(element, f) (((BMHeader*)(element))->flags[0].pflag & (f))
|
||||
#define bmesh_api_clearflag(element, f) (((BMHeader*)(element))->flags[0].pflag &= ~(f))
|
||||
#define BM_ELEM_API_FLAG_ENABLE(element, f) (((BMHeader*)(element))->flags[0].pflag |= (f))
|
||||
#define BM_ELEM_API_FLAG_DISABLE(element, f) (((BMHeader*)(element))->flags[0].pflag &= ~(f))
|
||||
#define BM_ELEM_API_FLAG_TEST(element, f) (((BMHeader*)(element))->flags[0].pflag & (f))
|
||||
|
||||
/* Polygon Utilities ? FIXME... where do these each go? */
|
||||
/* newedgeflag sets a flag layer flag, obviously not the header flag. */
|
||||
void BM_Triangulate_Face(BMesh *bm, BMFace *f, float (*projectverts)[3],
|
||||
void BM_face_triangulate(BMesh *bm, BMFace *f, float (*projectverts)[3],
|
||||
const short newedge_oflag, const short newface_oflag, BMFace **newfaces);
|
||||
void bmesh_update_face_normal(struct BMesh *bm, struct BMFace *f, float no[3],
|
||||
float (*projectverts)[3]);
|
||||
|
||||
@@ -151,7 +151,7 @@ int bmesh_edge_swapverts(BMEdge *e, BMVert *orig, BMVert *newv)
|
||||
int bmesh_disk_append_edge(struct BMEdge *e, struct BMVert *v)
|
||||
{
|
||||
if (!v->e) {
|
||||
Link *e1 = bm_get_edge_link(e, v);
|
||||
Link *e1 = BM_EDGE_LINK_GET(e, v);
|
||||
|
||||
v->e = e;
|
||||
e1->next = e1->prev = (Link *)e;
|
||||
@@ -159,9 +159,9 @@ int bmesh_disk_append_edge(struct BMEdge *e, struct BMVert *v)
|
||||
else {
|
||||
Link *e1, *e2, *e3;
|
||||
|
||||
e1 = bm_get_edge_link(e, v);
|
||||
e2 = bm_get_edge_link(v->e, v);
|
||||
e3 = e2->prev ? bm_get_edge_link(e2->prev, v) : NULL;
|
||||
e1 = BM_EDGE_LINK_GET(e, v);
|
||||
e2 = BM_EDGE_LINK_GET(v->e, v);
|
||||
e3 = e2->prev ? BM_EDGE_LINK_GET(e2->prev, v) : NULL;
|
||||
|
||||
e1->next = (Link *)v->e;
|
||||
e1->prev = e2->prev;
|
||||
@@ -178,14 +178,14 @@ void bmesh_disk_remove_edge(struct BMEdge *e, struct BMVert *v)
|
||||
{
|
||||
Link *e1, *e2;
|
||||
|
||||
e1 = bm_get_edge_link(e, v);
|
||||
e1 = BM_EDGE_LINK_GET(e, v);
|
||||
if (e1->prev) {
|
||||
e2 = bm_get_edge_link(e1->prev, v);
|
||||
e2 = BM_EDGE_LINK_GET(e1->prev, v);
|
||||
e2->next = e1->next;
|
||||
}
|
||||
|
||||
if (e1->next) {
|
||||
e2 = bm_get_edge_link(e1->next, v);
|
||||
e2 = BM_EDGE_LINK_GET(e1->next, v);
|
||||
e2->prev = e1->prev;
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
if (lastv) {
|
||||
e = BM_edge_create(bm, lastv, tag->newv, l->e, TRUE);
|
||||
BM_elem_copy_attrs(bm, bm, l->prev->e, e);
|
||||
BM_elem_attrs_copy(bm, bm, l->prev->e, e);
|
||||
BLI_array_append(edges, e);
|
||||
}
|
||||
lastv = tag->newv;
|
||||
@@ -440,7 +440,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
BLI_array_append(verts, v2);
|
||||
|
||||
e = BM_edge_create(bm, lastv, v2, l->e, TRUE);
|
||||
BM_elem_copy_attrs(bm, bm, l->e, e);
|
||||
BM_elem_attrs_copy(bm, bm, l->e, e);
|
||||
|
||||
BLI_array_append(edges, e);
|
||||
lastv = v2;
|
||||
@@ -449,7 +449,7 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
e = BM_edge_create(bm, firstv, lastv, BM_FACE_FIRST_LOOP(faces[i])->e, TRUE);
|
||||
if (BM_FACE_FIRST_LOOP(faces[i])->prev->e != e) {
|
||||
BM_elem_copy_attrs(bm, bm, BM_FACE_FIRST_LOOP(faces[i])->prev->e, e);
|
||||
BM_elem_attrs_copy(bm, bm, BM_FACE_FIRST_LOOP(faces[i])->prev->e, e);
|
||||
}
|
||||
BLI_array_append(edges, e);
|
||||
|
||||
@@ -529,8 +529,8 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
e1 = BM_edge_exists(v4, v3);
|
||||
e2 = BM_edge_exists(v2, v1);
|
||||
BM_elem_copy_attrs(bm, bm, l->e, e1);
|
||||
BM_elem_copy_attrs(bm, bm, l->e, e2);
|
||||
BM_elem_attrs_copy(bm, bm, l->e, e1);
|
||||
BM_elem_attrs_copy(bm, bm, l->e, e2);
|
||||
|
||||
/* set edge lengths of cross edges as the average of the cross edges they're based o */
|
||||
if (has_elens) {
|
||||
@@ -777,12 +777,12 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
continue;
|
||||
|
||||
if (tag->newv != l->v || HasMDisps) {
|
||||
BM_elem_copy_attrs(bm, bm, l->f, l2->f);
|
||||
BM_elem_attrs_copy(bm, bm, l->f, l2->f);
|
||||
BM_loop_interp_from_face(bm, l2, l->f, TRUE, TRUE);
|
||||
}
|
||||
else {
|
||||
BM_elem_copy_attrs(bm, bm, l->f, l2->f);
|
||||
BM_elem_copy_attrs(bm, bm, l, l2);
|
||||
BM_elem_attrs_copy(bm, bm, l->f, l2->f);
|
||||
BM_elem_attrs_copy(bm, bm, l, l2);
|
||||
}
|
||||
|
||||
if (HasMDisps) {
|
||||
@@ -820,8 +820,8 @@ void bmesh_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
BM_ITER(l, &liter, bm, BM_LOOPS_OF_VERT, v) {
|
||||
BMLoop *l2 = l->v == v ? l : l->next;
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, lorig->f, l2->f);
|
||||
BM_elem_copy_attrs(bm, bm, lorig, l2);
|
||||
BM_elem_attrs_copy(bm, bm, lorig->f, l2->f);
|
||||
BM_elem_attrs_copy(bm, bm, lorig, l2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ static BMVert *copy_vertex(BMesh *source_mesh, BMVert *source_vertex, BMesh *tar
|
||||
BLI_ghash_insert(vhash, source_vertex, target_vertex);
|
||||
|
||||
/* Copy attribute */
|
||||
BM_elem_copy_attrs(source_mesh, target_mesh, source_vertex, target_vertex);
|
||||
BM_elem_attrs_copy(source_mesh, target_mesh, source_vertex, target_vertex);
|
||||
|
||||
/* Set internal op flag */
|
||||
BMO_elem_flag_enable(target_mesh, (BMHeader *)target_vertex, DUPE_NEW);
|
||||
@@ -107,7 +107,7 @@ static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh,
|
||||
BLI_ghash_insert(ehash, source_edge, target_edge);
|
||||
|
||||
/* Copy attributes */
|
||||
BM_elem_copy_attrs(source_mesh, target_mesh, source_edge, target_edge);
|
||||
BM_elem_attrs_copy(source_mesh, target_mesh, source_edge, target_edge);
|
||||
|
||||
/* Set internal op flags */
|
||||
BMO_elem_flag_enable(target_mesh, (BMHeader *)target_edge, DUPE_NEW);
|
||||
@@ -156,7 +156,7 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
|
||||
BMO_slot_map_ptr_insert(source_mesh, op,
|
||||
"facemap", target_face, source_face);
|
||||
|
||||
BM_elem_copy_attrs(source_mesh, target_mesh, source_face, target_face);
|
||||
BM_elem_attrs_copy(source_mesh, target_mesh, source_face, target_face);
|
||||
|
||||
/* mark the face for outpu */
|
||||
BMO_elem_flag_enable(target_mesh, (BMHeader *)target_face, DUPE_NEW);
|
||||
@@ -165,7 +165,7 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh,
|
||||
BM_ITER(source_loop, &iter, source_mesh, BM_LOOPS_OF_FACE, source_face) {
|
||||
BM_ITER(target_loop, &iter2, target_mesh, BM_LOOPS_OF_FACE, target_face) {
|
||||
if (BLI_ghash_lookup(vhash, source_loop->v) == target_loop->v) {
|
||||
BM_elem_copy_attrs(source_mesh, target_mesh, source_loop, target_loop);
|
||||
BM_elem_attrs_copy(source_mesh, target_mesh, source_loop, target_loop);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,12 +74,12 @@ static BMFace *remake_face(BMesh *bm, EdgeTag *etags, BMFace *f, BMVert **verts,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, f, f2);
|
||||
BM_elem_attrs_copy(bm, bm, f, f2);
|
||||
|
||||
l = BM_iter_new(&liter1, bm, BM_LOOPS_OF_FACE, f);
|
||||
l2 = BM_iter_new(&liter2, bm, BM_LOOPS_OF_FACE, f2);
|
||||
for ( ; l && l2; l = BM_iter_step(&liter1), l2 = BM_iter_step(&liter2)) {
|
||||
BM_elem_copy_attrs(bm, bm, l, l2);
|
||||
BM_elem_attrs_copy(bm, bm, l, l2);
|
||||
if (l->e != l2->e) {
|
||||
/* set up data for figuring out the two sides of
|
||||
* the split */
|
||||
@@ -106,7 +106,7 @@ static BMFace *remake_face(BMesh *bm, EdgeTag *etags, BMFace *f, BMVert **verts,
|
||||
BMO_elem_flag_enable(bm, l2->e, EDGE_SEAM);
|
||||
}
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, l->e, l2->e);
|
||||
BM_elem_attrs_copy(bm, bm, l->e, l2->e);
|
||||
}
|
||||
|
||||
BMO_elem_flag_enable(bm, l->e, EDGE_MARK);
|
||||
|
||||
@@ -83,21 +83,21 @@ void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
BMO_elem_flag_enable(bm, f2, EXT_KEEP);
|
||||
BM_elem_copy_attrs(bm, bm, f, f2);
|
||||
BM_elem_attrs_copy(bm, bm, f, f2);
|
||||
|
||||
l2 = BM_iter_new(&liter2, bm, BM_LOOPS_OF_FACE, f2);
|
||||
BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) {
|
||||
BM_elem_copy_attrs(bm, bm, l, l2);
|
||||
BM_elem_attrs_copy(bm, bm, l, l2);
|
||||
|
||||
l3 = l->next;
|
||||
l4 = l2->next;
|
||||
|
||||
f3 = BM_face_create_quad_tri(bm, l3->v, l4->v, l2->v, l->v, f, FALSE);
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3));
|
||||
BM_elem_copy_attrs(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3)->next);
|
||||
BM_elem_copy_attrs(bm, bm, l, BM_FACE_FIRST_LOOP(f3)->next->next);
|
||||
BM_elem_copy_attrs(bm, bm, l, BM_FACE_FIRST_LOOP(f3)->next->next->next);
|
||||
BM_elem_attrs_copy(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3));
|
||||
BM_elem_attrs_copy(bm, bm, l->next, BM_FACE_FIRST_LOOP(f3)->next);
|
||||
BM_elem_attrs_copy(bm, bm, l, BM_FACE_FIRST_LOOP(f3)->next->next);
|
||||
BM_elem_attrs_copy(bm, bm, l, BM_FACE_FIRST_LOOP(f3)->next->next->next);
|
||||
|
||||
l2 = BM_iter_step(&liter2);
|
||||
}
|
||||
@@ -309,29 +309,29 @@ void extrude_edge_context_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
if (l2 == l) {
|
||||
l2 = newedge->l;
|
||||
BM_elem_copy_attrs(bm, bm, l2->f, l->f);
|
||||
BM_elem_attrs_copy(bm, bm, l2->f, l->f);
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
l2 = l2->next;
|
||||
l = l->next;
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
}
|
||||
else {
|
||||
BM_elem_copy_attrs(bm, bm, l2->f, l->f);
|
||||
BM_elem_attrs_copy(bm, bm, l2->f, l->f);
|
||||
|
||||
/* copy dat */
|
||||
if (l2->v == l->v) {
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
l2 = l2->next;
|
||||
l = l->next;
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
}
|
||||
else {
|
||||
l2 = l2->next;
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
l2 = l2->prev;
|
||||
l = l->next;
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,12 +201,12 @@ void bmesh_weldverts_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
f2 = BM_face_create_ngon(bm, v, v2, edges, a, TRUE);
|
||||
if (f2 && (f2 != f)) {
|
||||
BM_elem_copy_attrs(bm, bm, f, f2);
|
||||
BM_elem_attrs_copy(bm, bm, f, f2);
|
||||
|
||||
a = 0;
|
||||
BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f2) {
|
||||
l2 = loops[a];
|
||||
BM_elem_copy_attrs(bm, bm, l2, l);
|
||||
BM_elem_attrs_copy(bm, bm, l2, l);
|
||||
|
||||
a++;
|
||||
}
|
||||
|
||||
@@ -1014,7 +1014,7 @@ void esubdivide_exec(BMesh *bmesh, BMOperator *op)
|
||||
}
|
||||
|
||||
/* editmesh-emulating functio */
|
||||
void BM_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float smooth,
|
||||
void BM_mesh_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float smooth,
|
||||
float fractal, int beauty, int numcuts,
|
||||
int seltype, int cornertype, int singleedge,
|
||||
int gridfill, int seed)
|
||||
|
||||
@@ -62,7 +62,7 @@ void triangulate_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
BM_Triangulate_Face(bm, face, projectverts, EDGE_NEW, FACE_NEW, newfaces);
|
||||
BM_face_triangulate(bm, face, projectverts, EDGE_NEW, FACE_NEW, newfaces);
|
||||
|
||||
BMO_slot_map_ptr_insert(bm, op, "facemap", face, face);
|
||||
for (i = 0; newfaces[i]; i++) {
|
||||
|
||||
@@ -395,6 +395,7 @@ static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
|
||||
return sv;
|
||||
}
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
static float BME_bevel_set_max(BMVert *v1, BMVert *v2, float value, BME_TransData_Head *td)
|
||||
{
|
||||
BME_TransData *vtd1, *vtd2;
|
||||
@@ -449,6 +450,7 @@ static float BME_bevel_set_max(BMVert *v1, BMVert *v2, float value, BME_TransDat
|
||||
|
||||
return max;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
static BMVert *BME_bevel_wire(BMesh *bm, BMVert *v, float value, int res, int UNUSED(options), BME_TransData_Head *td)
|
||||
@@ -867,6 +869,8 @@ static BMesh *BME_bevel_initialize(BMesh *bm, int options, int UNUSED(defgrp_ind
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
static BMesh *BME_bevel_reinitialize(BMesh *bm)
|
||||
{
|
||||
BMVert *v;
|
||||
@@ -887,6 +891,8 @@ static BMesh *BME_bevel_reinitialize(BMesh *bm)
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* BME_bevel_mesh
|
||||
*
|
||||
|
||||
@@ -94,7 +94,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
|
||||
RNA_enum_set(op->ptr, "quadcorner", SUBD_INNERVERT);
|
||||
}
|
||||
|
||||
BM_esubdivideflag(obedit, em->bm, BM_ELEM_SELECT,
|
||||
BM_mesh_esubdivideflag(obedit, em->bm, BM_ELEM_SELECT,
|
||||
smooth, fractal,
|
||||
ts->editbutflag|flag,
|
||||
cuts, 0, RNA_enum_get(op->ptr, "quadcorner"),
|
||||
@@ -2896,8 +2896,8 @@ static EnumPropertyItem knife_items[] = {
|
||||
|
||||
/* seg_intersect() Determines if and where a mouse trail intersects an EditEdge */
|
||||
|
||||
static float bm_seg_intersect(BMEdge *e, CutCurve *c, int len, char mode,
|
||||
struct GHash *gh, int *isected)
|
||||
static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode,
|
||||
struct GHash *gh, int *isected)
|
||||
{
|
||||
#define MAXSLOPE 100000
|
||||
float x11, y11, x12 = 0, y12 = 0, x2max, x2min, y2max;
|
||||
@@ -3111,7 +3111,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
|
||||
/* store percentage of edge cut for KNIFE_EXACT here.*/
|
||||
for (be = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL); be; be = BM_iter_step(&iter)) {
|
||||
if (BM_elem_select_test(bm, be)) {
|
||||
isect = bm_seg_intersect(be, curve, len, mode, gh, &isected);
|
||||
isect = bm_edge_seg_isect(be, curve, len, mode, gh, &isected);
|
||||
|
||||
if (isect != 0.0f) {
|
||||
if (mode != KNIFE_MULTICUT && mode != KNIFE_MIDPOINT) {
|
||||
|
||||
@@ -1736,7 +1736,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
||||
int i, j, k = 0, totface = bm->totface;
|
||||
|
||||
BMO_push(bm, NULL);
|
||||
bmesh_begin_edit(bm, BMOP_UNTAN_MULTIRES);
|
||||
bmesh_begin_edit(bm, BMO_OP_FLAG_UNTAN_MULTIRES);
|
||||
|
||||
/* BMESH_TODO this should be valid now, leaving here until we can ensure this - campbell */
|
||||
i = 0;
|
||||
@@ -1946,7 +1946,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
||||
fprintf(stderr, "%s: face index out of range! (bmesh internal error)\n", __func__);
|
||||
}
|
||||
|
||||
BM_elem_copy_attrs(bm, bm, f2, f);
|
||||
BM_elem_attrs_copy(bm, bm, f2, f);
|
||||
|
||||
BM_ITER(l1, &liter1, bm, BM_LOOPS_OF_FACE, f) {
|
||||
BM_loop_interp_from_face(bm, l1, f2, TRUE, TRUE);
|
||||
@@ -1970,7 +1970,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd)
|
||||
|
||||
BMO_error_clear(bm); /* remerge_faces sometimes raises errors, so make sure to clear them */
|
||||
|
||||
bmesh_end_edit(bm, BMOP_UNTAN_MULTIRES);
|
||||
bmesh_end_edit(bm, BMO_OP_FLAG_UNTAN_MULTIRES);
|
||||
BMO_pop(bm);
|
||||
}
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ static void ringsel_finish(bContext *C, wmOperator *op)
|
||||
edgering_sel(lcd, cuts, 1);
|
||||
|
||||
if (lcd->do_cut) {
|
||||
BM_esubdivideflag(lcd->ob, em->bm, BM_ELEM_SELECT, 0.0f,
|
||||
BM_mesh_esubdivideflag(lcd->ob, em->bm, BM_ELEM_SELECT, 0.0f,
|
||||
0.0f, 0, cuts, SUBDIV_SELECT_LOOPCUT,
|
||||
SUBD_PATH, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -4601,7 +4601,7 @@ static int createSlideVerts(TransInfo *t)
|
||||
}
|
||||
|
||||
em->bm->ob = t->obedit;
|
||||
bmesh_begin_edit(em->bm, BMOP_UNTAN_MULTIRES);
|
||||
bmesh_begin_edit(em->bm, BMO_OP_FLAG_UNTAN_MULTIRES);
|
||||
|
||||
/*create copies of faces for customdata projection*/
|
||||
tempsv = sld->sv;
|
||||
@@ -4731,7 +4731,7 @@ void projectSVData(TransInfo *t, int final)
|
||||
}
|
||||
|
||||
/*make sure face-attributes are correct (e.g. MTexPoly)*/
|
||||
BM_elem_copy_attrs(em->bm, em->bm, copyf2, f);
|
||||
BM_elem_attrs_copy(em->bm, em->bm, copyf2, f);
|
||||
|
||||
/*restore selection and hidden flags*/
|
||||
BM_elem_select_set(em->bm, f, sel);
|
||||
@@ -4783,7 +4783,7 @@ void freeSlideVerts(TransInfo *t)
|
||||
}
|
||||
|
||||
sld->em->bm->ob = t->obedit;
|
||||
bmesh_end_edit(sld->em->bm, BMOP_UNTAN_MULTIRES);
|
||||
bmesh_end_edit(sld->em->bm, BMO_OP_FLAG_UNTAN_MULTIRES);
|
||||
|
||||
BLI_smallhash_release(&sld->vhash);
|
||||
BLI_smallhash_release(&sld->origfaces);
|
||||
|
||||
Reference in New Issue
Block a user