diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-25 04:20:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-25 04:20:42 +0400 |
commit | b0bf816ececfaf56281e1539577656df3c995aa0 (patch) | |
tree | 0e289fc19194472a88e08528efb9e8fb9947d9a1 /source/blender/blenkernel/intern/mesh.c | |
parent | 687cacfdd0aec599e56f7f5e2ed69f0bf6c61b4e (diff) |
fix [#32646] Duplifaces can have wrong orientation with ngons
concave ngons could flip the dupliface, now use the faces normal when calculating the dupli-face.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 206d80a6ff0..f0354b892b7 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1864,7 +1864,7 @@ void BKE_mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts, /* only calc poly normals */ mp = mpolys; for (i = 0; i < numPolys; i++, mp++) { - mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]); + BKE_mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]); } } @@ -1914,7 +1914,7 @@ void BKE_mesh_calc_normals(MVert *mverts, int numVerts, MLoop *mloop, MPoly *mpo mp = mpolys; for (i = 0; i < numPolys; i++, mp++) { - mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]); + BKE_mesh_calc_poly_normal(mp, mloop + mp->loopstart, mverts, pnors[i]); ml = mloop + mp->loopstart; BLI_array_empty(vertcos); @@ -2900,8 +2900,8 @@ static void mesh_calc_ngon_normal(MPoly *mpoly, MLoop *loopstart, } } -void mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart, - MVert *mvarray, float no[3]) +void BKE_mesh_calc_poly_normal(MPoly *mpoly, MLoop *loopstart, + MVert *mvarray, float no[3]) { if (mpoly->totloop > 4) { mesh_calc_ngon_normal(mpoly, loopstart, mvarray, no); @@ -3045,7 +3045,7 @@ float BKE_mesh_calc_poly_area(MPoly *mpoly, MLoop *loopstart, /* need normal for area_poly_v3 as well */ if (polynormal == NULL) { - mesh_calc_poly_normal(mpoly, loopstart, mvarray, no); + BKE_mesh_calc_poly_normal(mpoly, loopstart, mvarray, no); } /* finally calculate the area */ |