Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-02-15 16:58:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-02-15 16:58:49 +0300
commit20283bfa0b1e38f6c33271b97f22488103243b50 (patch)
tree5f0e67bcac66ae87056ae7bf70a787d847ffef3b /source/blender/blenkernel/intern/mesh.c
parentdd79f907a7cc2c902d8b15e27a1890c42bbb7df7 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r--source/blender/blenkernel/intern/mesh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 75e2a13f069..42b6a841da0 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -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