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/cdderivedmesh.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/cdderivedmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index a1bf255c239..48fcaf6503f 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -2208,7 +2208,7 @@ void CDDM_calc_normals(DerivedMesh *dm) #endif -void CDDM_calc_loop_normals(DerivedMesh *dm, const float split_angle) +void CDDM_calc_loop_normals(DerivedMesh *dm, const bool use_split_normals, const float split_angle) { MVert *mverts = dm->getVertArray(dm); MEdge *medges = dm->getEdgeArray(dm); @@ -2246,7 +2246,7 @@ void CDDM_calc_loop_normals(DerivedMesh *dm, const float split_angle) dm->dirty &= ~DM_DIRTY_NORMALS; BKE_mesh_normals_loop_split(mverts, numVerts, medges, numEdges, mloops, lnors, numLoops, - mpolys, pnors, numPolys, split_angle); + mpolys, pnors, numPolys, use_split_normals, split_angle); } |