diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-22 20:47:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-22 20:47:05 +0300 |
commit | c7a9f76149d85dfb64710722a45979f6decedbb1 (patch) | |
tree | f4d763e7a41bb9f8f2baab0e8708ac6f9c55c39b /source/blender/blenkernel/BKE_mesh.h | |
parent | f3d97498c3a6afcffbe3c8551fec32efb246a4f1 (diff) | |
parent | 59343ee1627f4c369e237cea201015b979da1540 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index aa56fb7d1da..5628992d415 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -419,6 +419,17 @@ float (*BKE_mesh_vertex_normals_for_write(struct Mesh *mesh))[3]; float (*BKE_mesh_poly_normals_for_write(struct Mesh *mesh))[3]; /** + * Free any cached vertex or poly normals. Face corner (loop) normals are also derived data, + * but are not handled with the same method yet, so they are not included. It's important that this + * is called after the mesh changes size, since otherwise cached normal arrays might not be large + * enough (though it may be called indirectly by other functions). + * + * \note Normally it's preferred to call #BKE_mesh_normals_tag_dirty instead, + * but this can be used in specific situations to reset a mesh or reduce memory usage. + */ +void BKE_mesh_clear_derived_normals(struct Mesh *mesh); + +/** * Mark the mesh's vertex normals non-dirty, for when they are calculated or assigned manually. */ void BKE_mesh_vertex_normals_clear_dirty(struct Mesh *mesh); |