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.
This commit is contained in:
2015-01-19 14:11:40 +01:00
parent 694806a9cf
commit 0af11a1742
14 changed files with 107 additions and 50 deletions

View File

@@ -45,7 +45,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData data, BL::Object object, BL:
BL::Mesh me = data.meshes.new_from_object(scene, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
if ((bool)me) {
if (me.use_auto_smooth()) {
me.calc_normals_split(me.auto_smooth_angle());
me.calc_normals_split();
}
me.calc_tessface();
}