diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-13 21:29:09 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-13 21:29:09 +0300 |
commit | 46097744adc00db38d41b46c55497fc14f64f64f (patch) | |
tree | b5ffb4520304acced1b1c3f78d169e48874a31ec /source/blender | |
parent | 9355994eefffe1a1256e29fb74772ef7485c1c29 (diff) |
Fix: Mesh validation removes normal layers but doesn't tag dirty
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index fb2a92b5797..f11e8b3f93c 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -304,6 +304,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } const float(*vert_normals)[3] = NULL; + BKE_mesh_assert_normals_dirty_or_calculated(mesh); if (!BKE_mesh_vertex_normals_are_dirty(mesh)) { vert_normals = BKE_mesh_vertex_normals_ensure(mesh); } @@ -1009,6 +1010,11 @@ bool BKE_mesh_validate_all_customdata(CustomData *vdata, mask = CD_MASK_MESH; } + /* Normal data isn't in the mask since it is derived data, + * but it is valid and should not be removed. */ + mask.vmask |= CD_MASK_NORMAL; + mask.pmask |= CD_MASK_NORMAL; + is_valid &= mesh_validate_customdata( vdata, mask.vmask, totvert, do_verbose, do_fixes, &is_change_v); is_valid &= mesh_validate_customdata( |