diff --git a/source/blender/blenlib/BLI_array_utils.hh b/source/blender/blenlib/BLI_array_utils.hh index efb8227b692..2a936cca04e 100644 --- a/source/blender/blenlib/BLI_array_utils.hh +++ b/source/blender/blenlib/BLI_array_utils.hh @@ -300,10 +300,10 @@ bool indexed_data_equal(const Span all_values, const Span indices, const { for (const int i : indices.index_range()) { if (all_values[indices[i]] != values[i]) { - return true; + return false; } } - return false; + return true; } bool indices_are_range(Span indices, IndexRange range); diff --git a/source/blender/editors/sculpt_paint/paint_hide.cc b/source/blender/editors/sculpt_paint/paint_hide.cc index 56453bbf401..bbff2891670 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.cc +++ b/source/blender/editors/sculpt_paint/paint_hide.cc @@ -216,7 +216,7 @@ static void vert_hide_update(Object &object, new_hide.reinitialize(verts.size()); array_utils::gather(hide_vert.span.as_span(), verts, new_hide.as_mutable_span()); calc_hide(verts, new_hide); - if (!array_utils::indexed_data_equal(hide_vert.span, verts, new_hide)) { + if (array_utils::indexed_data_equal(hide_vert.span, verts, new_hide)) { continue; } diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.cc b/source/blender/editors/sculpt_paint/sculpt_face_set.cc index a498886e21e..a42126b949e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.cc +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.cc @@ -517,7 +517,7 @@ static void face_sets_update(Object &object, MutableSpan new_face_sets = tls.new_face_sets; array_utils::gather(face_sets.span.as_span(), faces, new_face_sets); calc_face_sets(faces, new_face_sets); - if (!array_utils::indexed_data_equal(face_sets.span, faces, new_face_sets)) { + if (array_utils::indexed_data_equal(face_sets.span, faces, new_face_sets)) { continue; } @@ -1021,7 +1021,7 @@ static void face_hide_update(Object &object, MutableSpan new_hide = tls.new_hide; array_utils::gather(hide_poly.span.as_span(), faces, new_hide); calc_hide(faces, new_hide); - if (!array_utils::indexed_data_equal(hide_poly.span, faces, new_hide)) { + if (array_utils::indexed_data_equal(hide_poly.span, faces, new_hide)) { continue; }