[Bf-blender-cvs] [53e7a4a83c] master: Correct asserts, un-hiding when selected is ok

Campbell Barton noreply at git.blender.org
Thu Jan 19 19:59:59 CET 2017


Commit: 53e7a4a83ce28a25c26b630cad474319069cc1bf
Author: Campbell Barton
Date:   Fri Jan 20 06:00:55 2017 +1100
Branches: master
https://developer.blender.org/rB53e7a4a83ce28a25c26b630cad474319069cc1bf

Correct asserts, un-hiding when selected is ok

===================================================================

M	source/blender/bmesh/intern/bmesh_marking.c

===================================================================

diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 2231a98a11..7f2032d5f5 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);




More information about the Bf-blender-cvs mailing list