diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-27 01:32:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-27 01:32:20 +0400 |
commit | 7068fee2dd7e7630ad5aa37971071ab7ac4baeb0 (patch) | |
tree | 5af0ad5c75205e497865e5a90daf5fcaef1ebec3 /source/blender/python | |
parent | 5cfab7f52131b506ac1b138305aad34b7ca6e8e0 (diff) |
fix for a bmesh glitch when making a face (Fkey).
On a place, Ctrl+T, Fkey would create a quad overlapping the 2 Tris.
Now this case is checked for in a general way - if the bounds of the face are already filled in with faces (that _only_ use these edges-verts), then dont create the face.
This is an option for the 'edgenet_fill' operator, since creating the face isnt incorrect, just not-what-you-want mostly.
added functions
* BM_edge_share_vert - returns shared vert between 2 edges.
* BM_face_exists_multi, BM_face_exists_multi_edge - check if existing faces fill the edge bounds.
* also add BM_ELEM_INTERNAL_TAG so low level functions can tag without conflicting with higher level functions that also rely on tagging elements.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index f18741ba0ed..14acc305e64 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1274,7 +1274,7 @@ static PyObject *bpy_bmfaceseq_new(BPy_BMElemSeq *self, PyObject *args) edge_array = (BMEdge **)PyMem_MALLOC(vert_seq_len * sizeof(BMEdge **)); /* ensure edges */ - for (i_next = 0, i = vert_seq_len - 1; i_next < vert_seq_len; (i=i_next++)) { + for (i = vert_seq_len - 1, i_next = 0; i_next < vert_seq_len; (i=i_next++)) { edge_array[i] = BM_edge_create(bm, vert_array[i], vert_array[i_next], NULL, TRUE); } @@ -2535,7 +2535,7 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ alloc[i] = item->ele; if (do_unique_check) { - BM_elem_flag_enable(item->ele, BM_ELEM_TAG); + BM_elem_flag_enable(item->ele, BM_ELEM_INTERNAL_TAG); } } @@ -2543,12 +2543,12 @@ void *BPy_BMElem_PySeq_As_Array(BMesh **r_bm, PyObject *seq, Py_ssize_t min, Py_ /* check for double verts! */ int ok = TRUE; for (i = 0; i < seq_len; i++) { - if (UNLIKELY(BM_elem_flag_test(alloc[i], BM_ELEM_TAG) == FALSE)) { + if (UNLIKELY(BM_elem_flag_test(alloc[i], BM_ELEM_INTERNAL_TAG) == FALSE)) { ok = FALSE; } /* ensure we dont leave this enabled */ - BM_elem_flag_disable(alloc[i], BM_ELEM_TAG); + BM_elem_flag_disable(alloc[i], BM_ELEM_INTERNAL_TAG); } if (ok == FALSE) { |