[Bf-blender-cvs] [394e8002ca4] refactor-mesh-selection-generic: Cleanup

Hans Goudey noreply at git.blender.org
Sun Sep 11 00:15:58 CEST 2022


Commit: 394e8002ca4cd791b5c90605bb874bd631e8eaa6
Author: Hans Goudey
Date:   Sat Sep 10 17:15:52 2022 -0500
Branches: refactor-mesh-selection-generic
https://developer.blender.org/rB394e8002ca4cd791b5c90605bb874bd631e8eaa6

Cleanup

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

M	source/blender/editors/mesh/editface.cc
M	tests/python/modules/mesh_test.py

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

diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index 0f2525cf4d0..41a7610dc62 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -633,7 +633,7 @@ void paintvert_select_ungrouped(Object *ob, bool extend, bool flush_flags)
   bke::SpanAttributeWriter<bool> selection_vert = attributes.lookup_or_add_for_write_span<bool>(
       ".selection_vert", ATTR_DOMAIN_POINT);
 
-  for (int i = 0; i < me->totvert; i++) {
+  for (const int i : selection_vert.span.index_range()) {
     if (!hide_vert[i]) {
       if (dverts[i].dw == nullptr) {
         /* if null weight then not grouped */
diff --git a/tests/python/modules/mesh_test.py b/tests/python/modules/mesh_test.py
index 7af21f7cfbb..1e2b90d701a 100644
--- a/tests/python/modules/mesh_test.py
+++ b/tests/python/modules/mesh_test.py
@@ -396,6 +396,7 @@ class MeshTest(ABC):
         selected_expected_verts = [
             v.index for v in expected_mesh.vertices if v.select]
 
+        # TODO(@HooglyBoogly): Reenable when mesh tests are updated.
         # if selected_evaluated_verts == selected_expected_verts:
         #     result_selection = "Same"
         #     result_codes['Selection Comparison'] = (True, result_selection)



More information about the Bf-blender-cvs mailing list