Blender Git Loki

Git Commits -> Revision 38984b5

November 11, 2019, 17:05 (GMT)
Alembic: improved import/export of mesh normals

This commit implements the change in behaviour described in T71246.
In short:

For export, per mesh:
- Custom loop normals are defined ? loop normals are exported.
- One or more polys are marked flat ? loop normals are exported.
- Otherwise, no normals are exported.

For import, when the Alembic mesh contains:
- loop normals (kFacevaryingScope) ? use as custom loop normals, and
enble Auto Smooth to have Blender actually use them.
- vertex normals (kVertexScope or kVaryingScope) ? convert to loop
normals, and handle as above.
- no normals ? mark mesh as smooth.
- unsupported normal types (kConstantScope, kUniformScope,
kUnknownScope) ? handle as 'no normals'.

This also fixes T71130: Alembic split normal export issue

Previously the mesh flag `ME_AUTOSMOOTH` was used in conjunction with
the poly flag `ME_SMOOTH` to determine whether loop normals or vertex
normals were exported. This behaviour was hard to predict for artists,
and hard to describe in the manual. Instead, Blender now only exports
loop normals, computing them if necessary. This way, the mesh in Alembic
should always have the same loop normals as in Blender.

Maniphest Tasks: T71130

Differential Revision: https://developer.blender.org/D6197

Commit Details:

Full Hash: 38984b551010e0cd70ead9df58a237ebd50b9c3f
Parent Commit: 8486a47
Committed By: Germano Cavalcante
Lines Changed: +99, -135

2 Modified Paths:

/source/blender/alembic/intern/abc_mesh.cc (+97, -133) (Diff)
/source/blender/alembic/intern/abc_mesh.h (+2, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021