diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-11 19:02:11 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-08-11 19:02:37 +0300 |
commit | 11509c14c38bdc818f60037921f3455ff626d61b (patch) | |
tree | cbd057861632e16b8eeed69d6956757448bfeeea /source/blender/bmesh | |
parent | 304f0f56c517373aaeb43f8e27c4ff4c26afb33b (diff) |
Fix T75588: Missing loop cuts preview for edges without quads
The preview of points was only done when the edge is wire.
Now the preview of points is done when the edge is not connected to any
quad.
Also to avoid edge slide in this case, all new vertices created in this
specific case are not selected.
Differential Revision: https://developer.blender.org/D7457
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_query.c | 16 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_query.h | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c index a9d1972bd7e..61a81e56a2e 100644 --- a/source/blender/bmesh/intern/bmesh_query.c +++ b/source/blender/bmesh/intern/bmesh_query.c @@ -2511,6 +2511,22 @@ bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag) return false; } +bool BM_edge_is_any_face_len_test(const BMEdge *e, const int len) +{ + if (e->l) { + BMLoop *l_iter, *l_first; + + l_iter = l_first = e->l; + do { + if (l_iter->f->len == len) { + return true; + } + } while ((l_iter = l_iter->radial_next) != l_first); + } + + return false; +} + /** * Use within assert's to check normals are valid. */ diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h index 4ec6b0e50d1..1ff2558ce83 100644 --- a/source/blender/bmesh/intern/bmesh_query.h +++ b/source/blender/bmesh/intern/bmesh_query.h @@ -243,6 +243,9 @@ bool BM_face_is_any_vert_flag_test(const BMFace *f, const char hflag) ATTR_WARN_ bool BM_face_is_any_edge_flag_test(const BMFace *f, const char hflag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); +bool BM_edge_is_any_face_len_test(const BMEdge *e, const int len) ATTR_WARN_UNUSED_RESULT + ATTR_NONNULL(); + bool BM_face_is_normal_valid(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); double BM_mesh_calc_volume(BMesh *bm, bool is_signed) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); |