diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-10 20:34:20 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-10 20:34:20 +0300 |
commit | 29674d5e7885ca1b31088ff4abeeae0ff05b980f (patch) | |
tree | 0e32b102437a098ab0f308cd4ad16d969a9da67e /source/blender/blenkernel | |
parent | 22c60ac8b1583502a88a5a97d0017618cccb14df (diff) | |
parent | 88ff5e5fb9d66d3a441e325dc381754b6f9c093e (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.cc | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index e1c706a82dc..376bb5c8d2e 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -327,6 +327,8 @@ void BKE_mesh_vert_coords_apply_with_mat4(struct Mesh *mesh, const float mat[4][4]); void BKE_mesh_vert_coords_apply(struct Mesh *mesh, const float (*vert_coords)[3]); +void BKE_mesh_anonymous_attributes_remove(struct Mesh *mesh); + /* *** mesh_tessellate.c *** */ /** diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index c1b1f62a881..4e534726922 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -1933,6 +1933,14 @@ void BKE_mesh_vert_coords_apply_with_mat4(Mesh *mesh, BKE_mesh_normals_tag_dirty(mesh); } +void BKE_mesh_anonymous_attributes_remove(Mesh *mesh) +{ + CustomData_free_layers_anonymous(&mesh->vdata, mesh->totvert); + CustomData_free_layers_anonymous(&mesh->edata, mesh->totedge); + CustomData_free_layers_anonymous(&mesh->pdata, mesh->totpoly); + CustomData_free_layers_anonymous(&mesh->ldata, mesh->totloop); +} + void BKE_mesh_calc_normals_split_ex(Mesh *mesh, MLoopNorSpaceArray *r_lnors_spacearr) { float(*r_loopnors)[3]; |