Fix stupid typo that broke split normal shading in edit mode, when there was some...
authorBastien Montagne <montagne29@wanadoo.fr>
Sun, 20 Apr 2014 21:12:18 +0000 (23:12 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 20 Apr 2014 21:12:18 +0000 (23:12 +0200)
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/bmesh/intern/bmesh_mesh.c

index d4af1768accd8030a7417813b2f1725b659917e6..f1724553ad743338daf5d014b45ac409ea088e69 100644 (file)
@@ -180,6 +180,7 @@ static void emDM_calcLoopNormals(DerivedMesh *dm, const float split_angle)
 
        /* calculate loop normals from poly and vertex normals */
        emDM_ensureVertNormals(bmdm);
+       emDM_ensurePolyNormals(bmdm);
        dm->dirty &= ~DM_DIRTY_NORMALS;
 
        vertexCos = bmdm->vertexCos;
index e7233535760c0e7f01c6af1920d0059420fe1c46..70660bba050583abcd5133635a01d75b829f6298 100644 (file)
@@ -473,7 +473,7 @@ static void bm_mesh_edges_sharp_tag(BMesh *bm, const float (*vnos)[3], const flo
                if (BM_edge_loop_pair(e, &l_a, &l_b)) {
                        bool is_angle_smooth = true;
                        if (check_angle) {
-                               const float *no_a = fnos ? fnos[BM_elem_index_get(l_b->f)] : l_a->f->no;
+                               const float *no_a = fnos ? fnos[BM_elem_index_get(l_a->f)] : l_a->f->no;
                                const float *no_b = fnos ? fnos[BM_elem_index_get(l_b->f)] : l_b->f->no;
                                is_angle_smooth = (dot_v3v3(no_a, no_b) >= split_angle);
                        }