[Bf-blender-cvs] [b019d8b2fe8] master: Fix edit-mesh face-dot drawing check

Campbell Barton noreply at git.blender.org
Thu May 16 13:18:22 CEST 2019


Commit: b019d8b2fe866c01b8edf187be1d01ede1891d0c
Author: Campbell Barton
Date:   Thu May 16 21:14:15 2019 +1000
Branches: master
https://developer.blender.org/rBb019d8b2fe866c01b8edf187be1d01ede1891d0c

Fix edit-mesh face-dot drawing check

Since 8a6414ed46f66 the old logic no longer applies.

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

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

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

diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index c8d17e76344..63fff243cd8 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -217,18 +217,20 @@ static void edbm_select_pick_cache_free(void)
   MEM_SAFE_FREE(base_array_index_offsets);
 }
 
-static bool check_ob_drawface_dot(short select_mode, View3D *vd, char dt)
+static bool check_ob_drawface_dot(short select_mode, const View3D *v3d, char dt)
 {
-  if ((select_mode & SCE_SELECT_FACE) == 0) {
-    return false;
-  }
-
-  /* if its drawing textures with zbuf sel, then don't draw dots */
-  if (dt == OB_TEXTURE && vd->shading.type == OB_TEXTURE) {
-    return false;
+  if (select_mode & SCE_SELECT_FACE) {
+    if (dt < OB_SOLID) {
+      return true;
+    }
+    if (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_FACE_DOT) {
+      return true;
+    }
+    if (XRAY_FLAG_ENABLED(v3d)) {
+      return true;
+    }
   }
-
-  return true;
+  return false;
 }
 
 static void edbm_select_pick_draw_bases(ViewContext *vc,



More information about the Bf-blender-cvs mailing list