Blender Git Loki

Git Commits -> Revision b0e7a1d

Revision b0e7a1d by Sybren A. Stüvel (master)
November 6, 2019, 09:45 (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: b0e7a1d4b492ccb825d37547fa722535cb475108
Parent Commit: 4f5086b
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