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>2013-06-26 06:47:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-26 06:47:56 +0400
commita7858767f46d25d8b7d95b37a3e66aaf552d67c8 (patch)
tree13d671ffc1666dbdaa39c11f8c3489774c42b022 /source/blender/editors/mesh/editface.c
parent47cfdc4494c285b59f131aab33bf628a5f37f480 (diff)
fix [#35858] Weight Paint: Hiding faces isnt flushing the flag to the vertices.
Diffstat (limited to 'source/blender/editors/mesh/editface.c')
-rw-r--r--source/blender/editors/mesh/editface.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index e194f990739..82d958a5c7b 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -74,6 +74,8 @@ void paintface_flush_flags(Object *ob)
if (me == NULL)
return;
+ /* note, call #BKE_mesh_flush_hidden_from_verts_ex first when changing hidden flags */
+
/* we could call this directly in all areas that change selection,
* since this could become slow for realtime updates (circle-select for eg) */
BKE_mesh_flush_select_from_polys(me);
@@ -139,18 +141,20 @@ void paintface_hide(Object *ob, const bool unselected)
a = me->totpoly;
while (a--) {
if ((mpoly->flag & ME_HIDE) == 0) {
- if (unselected) {
- if ((mpoly->flag & ME_FACE_SEL) == 0) mpoly->flag |= ME_HIDE;
- }
- else {
- if ((mpoly->flag & ME_FACE_SEL)) mpoly->flag |= ME_HIDE;
+ if (((mpoly->flag & ME_FACE_SEL) == 0) == unselected) {
+ mpoly->flag |= ME_HIDE;
}
}
- if (mpoly->flag & ME_HIDE) mpoly->flag &= ~ME_FACE_SEL;
+
+ if (mpoly->flag & ME_HIDE) {
+ mpoly->flag &= ~ME_FACE_SEL;
+ }
mpoly++;
}
+ BKE_mesh_flush_hidden_from_polys(me);
+
paintface_flush_flags(ob);
}
@@ -174,6 +178,8 @@ void paintface_reveal(Object *ob)
mpoly++;
}
+ BKE_mesh_flush_hidden_from_polys(me);
+
paintface_flush_flags(ob);
}