forked from bartvdbraak/blender
- swap arg order for BM_face_copy() boolean options.
- use edge example for BM_face_split().
This commit is contained in:
parent
ecb6f13618
commit
d232815481
@ -189,7 +189,7 @@ BM_INLINE void BM_elem_index_set(void *element, const int index);
|
||||
BM_INLINE int BM_elem_index_get(const void *element);
|
||||
|
||||
/* todo */
|
||||
BMFace *BM_face_copy(BMesh *bm, BMFace *f, int copyedges, int copyverts);
|
||||
BMFace *BM_face_copy(BMesh *bm, BMFace *f, const short copyverts, const short copyedges);
|
||||
|
||||
/* copies loop data from adjacent faces */
|
||||
void BM_face_copy_shared(BMesh *bm, BMFace *f);
|
||||
|
@ -340,20 +340,20 @@ BMEdge *BM_verts_connect(BMesh *bm, BMVert *v1, BMVert *v2, BMFace **nf)
|
||||
*
|
||||
*/
|
||||
|
||||
BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **nl, BMEdge *UNUSED(example))
|
||||
BMFace *BM_face_split(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **nl, BMEdge *example)
|
||||
{
|
||||
const int has_mdisp = CustomData_has_layer(&bm->ldata, CD_MDISPS);
|
||||
BMFace *nf, *of;
|
||||
|
||||
/* do we have a multires layer */
|
||||
if (has_mdisp) {
|
||||
of = BM_face_copy(bm, f, 0, 0);
|
||||
of = BM_face_copy(bm, f, FALSE, FALSE);
|
||||
}
|
||||
|
||||
#ifdef USE_BMESH_HOLES
|
||||
nf = bmesh_sfme(bm, f, v1, v2, nl, NULL);
|
||||
nf = bmesh_sfme(bm, f, v1, v2, nl, NULL, example);
|
||||
#else
|
||||
nf = bmesh_sfme(bm, f, v1, v2, nl);
|
||||
nf = bmesh_sfme(bm, f, v1, v2, nl, example);
|
||||
#endif
|
||||
|
||||
if (nf) {
|
||||
@ -567,7 +567,7 @@ BMVert *BM_edge_split(BMesh *bm, BMVert *v, BMEdge *e, BMEdge **ne, float percen
|
||||
BLI_smallhash_init(&hash);
|
||||
|
||||
for (i = 0; i < BLI_array_count(oldfaces); i++) {
|
||||
oldfaces[i] = BM_face_copy(bm, oldfaces[i], 1, 1);
|
||||
oldfaces[i] = BM_face_copy(bm, oldfaces[i], TRUE, TRUE);
|
||||
BLI_smallhash_insert(&hash, (intptr_t)oldfaces[i], NULL);
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ static BMLoop *bm_face_boundry_add(BMesh *bm, BMFace *f, BMVert *startv, BMEdge
|
||||
return l;
|
||||
}
|
||||
|
||||
BMFace *BM_face_copy(BMesh *bm, BMFace *f, int copyedges, int copyverts)
|
||||
BMFace *BM_face_copy(BMesh *bm, BMFace *f, const short copyverts, const short copyedges)
|
||||
{
|
||||
BMEdge **edges = NULL;
|
||||
BMVert **verts = NULL;
|
||||
@ -1123,10 +1123,11 @@ static BMFace *bmesh_addpolylist(BMesh *bm, BMFace *UNUSED(example))
|
||||
* A BMFace pointer
|
||||
*/
|
||||
BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
|
||||
BMLoop **rl
|
||||
BMLoop **rl,
|
||||
#ifdef USE_BMESH_HOLES
|
||||
, ListBase *holes
|
||||
ListBase *holes,
|
||||
#endif
|
||||
BMEdge *example
|
||||
)
|
||||
{
|
||||
#ifdef USE_BMESH_HOLES
|
||||
@ -1151,7 +1152,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
|
||||
}
|
||||
|
||||
/* allocate new edge between v1 and v2 */
|
||||
e = BM_edge_create(bm, v1, v2, NULL, FALSE);
|
||||
e = BM_edge_create(bm, v1, v2, example, FALSE);
|
||||
|
||||
f2 = bmesh_addpolylist(bm, f);
|
||||
f1loop = bmesh_create_loop(bm, v2, e, f, v2loop);
|
||||
|
@ -91,10 +91,11 @@ int bmesh_ke(struct BMesh *bm, struct BMEdge *e);
|
||||
int bmesh_kf(struct BMesh *bm, struct BMFace *bply);
|
||||
struct BMVert *bmesh_semv(struct BMesh *bm, struct BMVert *tv, struct BMEdge *e, struct BMEdge **re);
|
||||
struct BMFace *bmesh_sfme(struct BMesh *bm, struct BMFace *f, struct BMVert *v1,
|
||||
struct BMVert *v2, struct BMLoop **rl
|
||||
struct BMVert *v2, struct BMLoop **rl,
|
||||
#ifdef USE_BMESH_HOLES
|
||||
, ListBase *holes
|
||||
ListBase *holes,
|
||||
#endif
|
||||
BMEdge *example
|
||||
);
|
||||
int bmesh_jekv(struct BMesh *bm, struct BMEdge *ke, struct BMVert *kv);
|
||||
int bmesh_loop_reverse(struct BMesh *bm, struct BMFace *f);
|
||||
|
@ -4613,7 +4613,7 @@ static int createSlideVerts(TransInfo *t)
|
||||
BM_ITER(f, &fiter, em->bm, BM_FACES_OF_VERT, tempsv->v) {
|
||||
|
||||
if (!BLI_smallhash_haskey(&sld->origfaces, (uintptr_t)f)) {
|
||||
BMFace *copyf = BM_face_copy(em->bm, f, 1, 1);
|
||||
BMFace *copyf = BM_face_copy(em->bm, f, TRUE, TRUE);
|
||||
|
||||
BM_elem_select_set(em->bm, copyf, FALSE);
|
||||
BM_elem_flag_enable(copyf, BM_ELEM_HIDDEN);
|
||||
|
@ -723,7 +723,7 @@ static PyObject *bpy_bmface_copy(BPy_BMFace *self, PyObject *args, PyObject *kw)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
f_cpy = BM_face_copy(bm, self->f, do_edges, do_verts);
|
||||
f_cpy = BM_face_copy(bm, self->f, do_verts, do_edges);
|
||||
|
||||
if (f_cpy) {
|
||||
return BPy_BMFace_CreatePyObject(bm, f_cpy);
|
||||
|
Loading…
Reference in New Issue
Block a user