Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-08-30 18:41:26 +0300
committerHans Goudey <h.goudey@me.com>2022-08-30 18:41:26 +0300
commit3306b4a86bb8dcb0a1640fc73c355e5fff9073a7 (patch)
tree131f2d90b1b2f32bc150fd8233704dc15a43904b
parent002f339aedd351a68b6fc455421dba5c1bd886cd (diff)
Fix T99253: Missing face center dots with deform modifier cage option
Before 8c25889bb67db4c, subsurf face center tags were stored in each vertex, so they were always copied to duplicate meshes. Now they are stored in runtime data though, so they need to be copied explicitly. The function name "reset_on_copy" is a bit awkward here, so the tags are copied by the caller.
-rw-r--r--source/blender/blenkernel/intern/mesh.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc
index cf05dc0404e..afd8e49f884 100644
--- a/source/blender/blenkernel/intern/mesh.cc
+++ b/source/blender/blenkernel/intern/mesh.cc
@@ -96,6 +96,10 @@ static void mesh_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
const Mesh *mesh_src = (const Mesh *)id_src;
BKE_mesh_runtime_reset_on_copy(mesh_dst, flag);
+ /* Copy face dot tags, since meshes may be duplicated after a subsurf modifier
+ * or node, but we still need to be able to draw face center vertices. */
+ mesh_dst->runtime.subsurf_face_dot_tags = static_cast<uint32_t *>(
+ MEM_dupallocN(mesh_src->runtime.subsurf_face_dot_tags));
if ((mesh_src->id.tag & LIB_TAG_NO_MAIN) == 0) {
/* This is a direct copy of a main mesh, so for now it has the same topology. */
mesh_dst->runtime.deformed_only = true;