Fix wrong loop normals left after face splitting

Let's keep all data in a consistent state, so we don't have any
issues later on.

This solves rendering artifacts mentioned in the previous commit.
This commit is contained in:
Sergey Sharybin 2017-02-15 14:58:49 +01:00
parent dd79f907a7
commit 20283bfa0b
1 changed files with 5 additions and 0 deletions

View File

@ -2300,6 +2300,11 @@ void BKE_mesh_split_faces(Mesh *mesh)
loop_prev = loop;
}
}
/* Adding new vertices will change loop normals.
* Since we ensured there is CD_NORMAL layer for loops we must bring it
* it back to a consistent state.
*/
BKE_mesh_calc_normals_split(mesh);
#ifdef VALIDATE_MESH
BKE_mesh_validate(mesh, true, true);
#endif