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-04-26 16:06:04 +0300
committerHans Goudey <h.goudey@me.com>2022-04-26 16:06:04 +0300
commitdb45292d8e0c29f399cba191e33f8388d9254357 (patch)
treec5540f9c433449f1d0e1d05a9a7daa209db8b62f /source/blender/blenkernel/intern/mesh_convert.cc
parentb7458f909cc2ada343207603f0ecbf0c42b28173 (diff)
Cleanup: Move anonymous attribute removal to geometry component
Implementing removal of anonymous attributes with `GeometryComponent` instead of `Mesh` makes it more reusable for other types like curves.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_convert.cc')
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc
index a289d208684..0038a2aa806 100644
--- a/source/blender/blenkernel/intern/mesh_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_convert.cc
@@ -1219,7 +1219,9 @@ Mesh *BKE_mesh_new_from_object_to_bmain(Main *bmain,
BKE_mesh_nomain_to_mesh(mesh, mesh_in_bmain, nullptr, &CD_MASK_MESH, true);
/* Anonymous attributes shouldn't exist on original data. */
- BKE_mesh_anonymous_attributes_remove(mesh_in_bmain);
+ MeshComponent component;
+ component.replace(mesh_in_bmain, GeometryOwnershipType::Editable);
+ component.attributes_remove_anonymous();
/* User-count is required because so far mesh was in a limbo, where library management does
* not perform any user management (i.e. copy of a mesh will not increase users of materials). */