From 3389cc80836757c035fd08c4c06fbae658bc5d6f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sun, 23 Apr 2023 11:21:28 -0400 Subject: [PATCH] Fix: Incorrect mesh cache tagging causing excess calculation 8e967cfeaf478ca8adca only meant to tag the "verts no face" cache calculated eagerly if both loose edges and loose verts were already calculated. Instead it caused the calculation of one of the caches. --- source/blender/blenkernel/intern/mesh_runtime.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/mesh_runtime.cc b/source/blender/blenkernel/intern/mesh_runtime.cc index 36db52b3180..4a294aa5a7b 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.cc +++ b/source/blender/blenkernel/intern/mesh_runtime.cc @@ -136,10 +136,10 @@ static void bit_vector_with_reset_bits_or_empty(const Span indices_to_reset */ static void try_tag_verts_no_face_none(const Mesh &mesh) { - if (mesh.runtime->loose_edges_cache.is_cached() || mesh.loose_edges().count > 0) { + if (!mesh.runtime->loose_edges_cache.is_cached() || mesh.loose_edges().count > 0) { return; } - if (mesh.runtime->loose_verts_cache.is_cached() || mesh.loose_verts().count > 0) { + if (!mesh.runtime->loose_verts_cache.is_cached() || mesh.loose_verts().count > 0) { return; } mesh.runtime->verts_no_face_cache.ensure([&](LooseVertCache &r_data) {