Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-23 08:26:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-23 08:26:24 +0400
commitd2328154810ec6e4b477ab937908060b237f596e (patch)
tree932d91c1fdbbb95a13360357421917b3d6d43b8b
parentecb6f1361857bd6eae6e6785fcc1967ff84aae43 (diff)
- swap arg order for BM_face_copy() boolean options.
- use edge example for BM_face_split().
-rw-r--r--source/blender/bmesh/bmesh.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c10
-rw-r--r--source/blender/bmesh/intern/bmesh_newcore.c9
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.h5
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c2
6 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index ae85c40e270..4ecc58e293a 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -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);
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index f5ca8590690..1117a682f2a 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -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);
}
}
diff --git a/source/blender/bmesh/intern/bmesh_newcore.c b/source/blender/bmesh/intern/bmesh_newcore.c
index 47b8536b3df..110cddf9f10 100644
--- a/source/blender/bmesh/intern/bmesh_newcore.c
+++ b/source/blender/bmesh/intern/bmesh_newcore.c
@@ -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);
diff --git a/source/blender/bmesh/intern/bmesh_structure.h b/source/blender/bmesh/intern/bmesh_structure.h
index aff90dcced7..74da6cc3c58 100644
--- a/source/blender/bmesh/intern/bmesh_structure.h
+++ b/source/blender/bmesh/intern/bmesh_structure.h
@@ -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);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 8e7537b14e4..18df770a873 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -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);
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 0717b5e4426..0e6ec9ef9d5 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -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);