From 62dbef895bb854df8a1a14db033c367be4a8a7f2 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 15 Jan 2024 11:18:25 -0500 Subject: [PATCH] Mesh: Add missing sharing of cached face corner normals Sharing of the normals cache between copied meshes was missing from 89e3ba4e25c9ff921b25, which under-represented the benefits of the change. In a simple file where geometry nodes causes a re-evaluation without changing the normals, this increased FPS from 2.6 to 14. --- source/blender/blenkernel/intern/mesh.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index 668933e4cfc..fe4a5839e44 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -137,6 +137,7 @@ static void mesh_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int mesh_dst->runtime->bounds_cache = mesh_src->runtime->bounds_cache; mesh_dst->runtime->vert_normals_cache = mesh_src->runtime->vert_normals_cache; mesh_dst->runtime->face_normals_cache = mesh_src->runtime->face_normals_cache; + mesh_dst->runtime->corner_normals_cache = mesh_src->runtime->corner_normals_cache; mesh_dst->runtime->loose_verts_cache = mesh_src->runtime->loose_verts_cache; mesh_dst->runtime->verts_no_face_cache = mesh_src->runtime->verts_no_face_cache; mesh_dst->runtime->loose_edges_cache = mesh_src->runtime->loose_edges_cache;