diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-16 17:58:27 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-16 17:58:27 +0300 |
commit | 257ba175fa7e324792ce5f32d5369bcd685b8f55 (patch) | |
tree | 46e4b52448e4dfc8c01d42e11a1804772adb684f /source | |
parent | f059bdc82311e79a2b60f9af9154ac7822fd7001 (diff) |
Fix: removing anonymous attributes before adding mesh to bmain
This was an issue when e.g. `bpy.data.meshes.new_from_object` was
used on an object that uses geometry nodes.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index 87631348188..22e4c3bf13c 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -1236,6 +1236,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); + /* 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). */ BKE_library_foreach_ID_link( |