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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-01-19 22:00:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-01-19 22:00:55 +0300
commit53e7a4a83ce28a25c26b630cad474319069cc1bf (patch)
tree65a225ca5240725d5a7f613f4588cd7a2c67ccb0 /source
parentd6cf28c5e15739f864fbf04614c2a50708b4b152 (diff)
Correct asserts, un-hiding when selected is ok
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 2231a98a116..7f2032d5f53 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -1248,7 +1248,9 @@ void BM_vert_hide_set(BMVert *v, const bool hide)
{
/* vert hiding: vert + surrounding edges and faces */
BLI_assert(v->head.htype == BM_VERT);
- BLI_assert(!BM_elem_flag_test(v, BM_ELEM_SELECT));
+ if (hide) {
+ BLI_assert(!BM_elem_flag_test(v, BM_ELEM_SELECT));
+ }
BM_elem_flag_set(v, BM_ELEM_HIDDEN, hide);
@@ -1271,7 +1273,9 @@ void BM_vert_hide_set(BMVert *v, const bool hide)
void BM_edge_hide_set(BMEdge *e, const bool hide)
{
BLI_assert(e->head.htype == BM_EDGE);
- BLI_assert(!BM_elem_flag_test(e, BM_ELEM_SELECT));
+ if (hide) {
+ BLI_assert(!BM_elem_flag_test(e, BM_ELEM_SELECT));
+ }
/* edge hiding: faces around the edge */
if (e->l) {
@@ -1298,7 +1302,9 @@ void BM_edge_hide_set(BMEdge *e, const bool hide)
void BM_face_hide_set(BMFace *f, const bool hide)
{
BLI_assert(f->head.htype == BM_FACE);
- BLI_assert(!BM_elem_flag_test(f, BM_ELEM_SELECT));
+ if (hide) {
+ BLI_assert(!BM_elem_flag_test(f, BM_ELEM_SELECT));
+ }
BM_elem_flag_set(f, BM_ELEM_HIDDEN, hide);