From ac51e2f326965816e23f7948e2e3fbdfb07cb66c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 4 Sep 2015 22:41:10 +0200 Subject: Fix T46015: normals_split_custom_set_from_vertices doesn't work with zero vectors This was simply broken for vertex case (indexing loop normals with vert indices...). Turns out to be rather verbose to replace on-the-fly zero normals by default ones correctly, and do not want to make a full copy of the given custom normals array, so now this one is editied in place (replacing zero vectors by correct default normals). Don't think this could be a serious issue anyway. --- source/blender/blenkernel/BKE_mesh.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_mesh.h') diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 41241988f2b..a27688c1c61 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -234,11 +234,11 @@ void BKE_mesh_normals_loop_split( void BKE_mesh_normals_loop_custom_set( const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, - struct MLoop *mloops, float (*custom_loopnors)[3], const int numLoops, + struct MLoop *mloops, float (*r_custom_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float (*polynors)[3], const int numPolys, short (*r_clnors_data)[2]); void BKE_mesh_normals_loop_custom_from_vertices_set( - const struct MVert *mverts, float (*custom_vertnors)[3], const int numVerts, + const struct MVert *mverts, float (*r_custom_vertnors)[3], const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, const int numLoops, struct MPoly *mpolys, const float (*polynors)[3], const int numPolys, short (*r_clnors_data)[2]); -- cgit v1.2.3