[Bf-blender-cvs] [64f0c25a465] master: Fix: Incorrect access of mesh hide layers

Hans Goudey noreply at git.blender.org
Sun Aug 14 04:34:13 CEST 2022


Commit: 64f0c25a4655de44ef8ddc82fe2df7a101319f4a
Author: Hans Goudey
Date:   Sat Aug 13 22:34:11 2022 -0400
Branches: master
https://developer.blender.org/rB64f0c25a4655de44ef8ddc82fe2df7a101319f4a

Fix: Incorrect access of mesh hide layers

Mistake in 2480b55f216c31373a

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

M	source/blender/editors/mesh/editface.cc

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

diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index 0d988b9551f..c55d96bac55 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -530,15 +530,13 @@ bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags)
   bke::AttributeAccessor attributes = bke::mesh_attributes(*me);
   const VArray<bool> hide_vert = attributes.lookup_or_default<bool>(
       ".hide_vert", ATTR_DOMAIN_POINT, false);
-  const VArray<bool> hide_poly = attributes.lookup_or_default<bool>(
-      ".hide_poly", ATTR_DOMAIN_FACE, false);
 
   if (action == SEL_TOGGLE) {
     action = SEL_SELECT;
 
     for (int i = 0; i < me->totvert; i++) {
       MVert *mvert = &me->mvert[i];
-      if (!hide_poly[i] && mvert->flag & SELECT) {
+      if (!hide_vert[i] && mvert->flag & SELECT) {
         action = SEL_DESELECT;
         break;
       }
@@ -603,13 +601,13 @@ void paintvert_select_ungrouped(Object *ob, bool extend, bool flush_flags)
   }
 
   bke::AttributeAccessor attributes = bke::mesh_attributes(*me);
-  const VArray<bool> hide_poly = attributes.lookup_or_default<bool>(
-      ".hide_poly", ATTR_DOMAIN_FACE, false);
+  const VArray<bool> hide_vert = attributes.lookup_or_default<bool>(
+      ".hide_vert", ATTR_DOMAIN_POINT, false);
 
   for (int i = 0; i < me->totvert; i++) {
     MVert *mv = &me->mvert[i];
     MDeformVert *dv = &me->dvert[i];
-    if (!hide_poly[i]) {
+    if (!hide_vert[i]) {
       if (dv->dw == nullptr) {
         /* if null weight then not grouped */
         mv->flag |= SELECT;



More information about the Bf-blender-cvs mailing list