diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-19 16:11:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-19 17:51:20 +0300 |
commit | 0af11a1742030c1cf2e24304a94fbb96c5138571 (patch) | |
tree | a45621e6b404d4e2e221cab3a50fe33e8265d9f0 /source/blender/blenkernel/intern/editderivedmesh.c | |
parent | 694806a9cfbfef8a8f4cfa0ab7d37a448d0f1bb3 (diff) |
Make use/computation of lnors consistant.
Issue was, when requesting (building) lnors for a mesh that has
autosmooth disabled, one would expect to simply get vnors as lnors.
Until now, it wasn't the case, which was bad e.g. for normal projections
of loops in recent remap code (projecting along split loop normals
when you would expect projection along vertex normals...).
Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`.
This should *always* use mesh settings (both autosmooth and smoothresh),
otherwise once again we'd get inconsistencies in some cases.
Will update fbx and obj addons too.
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index eb7c78c2760..62d9009a131 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -169,7 +169,7 @@ static void emDM_calcNormals(DerivedMesh *dm) dm->dirty &= ~DM_DIRTY_NORMALS; } -static void emDM_calcLoopNormals(DerivedMesh *dm, const float split_angle) +static void emDM_calcLoopNormals(DerivedMesh *dm, const bool use_split_normals, const float split_angle) { EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm; BMesh *bm = bmdm->em->bm; @@ -191,7 +191,7 @@ static void emDM_calcLoopNormals(DerivedMesh *dm, const float split_angle) loopNos = dm->getLoopDataArray(dm, CD_NORMAL); } - BM_loops_calc_normal_vcos(bm, vertexCos, vertexNos, polyNos, split_angle, loopNos); + BM_loops_calc_normal_vcos(bm, vertexCos, vertexNos, polyNos, use_split_normals, split_angle, loopNos); } static void emDM_recalcTessellation(DerivedMesh *UNUSED(dm)) |