[Bf-blender-cvs] [08588d06e86] master: Fix T71554: 'Hide Unselected' not working for certain selections

Philipp Oeser noreply at git.blender.org
Tue Nov 19 09:54:59 CET 2019


Commit: 08588d06e86a096c51ac70da53e74bab67f6a036
Author: Philipp Oeser
Date:   Thu Nov 14 12:31:36 2019 +0100
Branches: master
https://developer.blender.org/rB08588d06e86a096c51ac70da53e74bab67f6a036

Fix T71554: 'Hide Unselected' not working for certain selections

rBc6cbcf83d015 caused to early out e.g when not all faces were selected
(but surrounding faces were, so implicitly all vertices were selected).
Now take (mixed also) selection mode into account.

Maniphest Tasks: T71554

Differential Revision: https://developer.blender.org/D6254

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

M	source/blender/editors/mesh/editmesh_tools.c

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

diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index eb50babf395..f5ff3d0655e 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2094,8 +2094,20 @@ static int edbm_hide_exec(bContext *C, wmOperator *op)
     BMesh *bm = em->bm;
 
     if (unselected) {
-      if (bm->totvertsel == bm->totvert) {
-        continue;
+      if (em->selectmode & SCE_SELECT_VERTEX) {
+        if (bm->totvertsel == bm->totvert) {
+          continue;
+        }
+      }
+      else if (em->selectmode & SCE_SELECT_EDGE) {
+        if (bm->totedgesel == bm->totedge) {
+          continue;
+        }
+      }
+      else if (em->selectmode & SCE_SELECT_FACE) {
+        if (bm->totfacesel == bm->totface) {
+          continue;
+        }
       }
     }
     else {



More information about the Bf-blender-cvs mailing list