[Bf-blender-cvs] [0ae64a9945d] blender-v2.83-release: Fix T76695: Not exporting normals properly in Alembic format
Sybren A. Stüvel
noreply at git.blender.org
Fri May 15 12:59:05 CEST 2020
Commit: 0ae64a9945db9f3d00ba7ef3780e25e16fabf664
Author: Sybren A. Stüvel
Date: Fri May 15 12:58:48 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB0ae64a9945db9f3d00ba7ef3780e25e16fabf664
Fix T76695: Not exporting normals properly in Alembic format
When auto-smooth enabled, but no custom normals layer present, the Alembic
exporter would incorrectly assume the mesh was shaded smooth. This is now
corrected, and normals are always written when auto-smooth is enabled.
===================================================================
M source/blender/io/alembic/intern/abc_writer_mesh.cc
===================================================================
diff --git a/source/blender/io/alembic/intern/abc_writer_mesh.cc b/source/blender/io/alembic/intern/abc_writer_mesh.cc
index f7b575e7b23..6093068463c 100644
--- a/source/blender/io/alembic/intern/abc_writer_mesh.cc
+++ b/source/blender/io/alembic/intern/abc_writer_mesh.cc
@@ -139,7 +139,8 @@ static void get_loop_normals(struct Mesh *mesh,
/* If all polygons are smooth shaded, and there are no custom normals, we don't need to export
* normals at all. This is also done by other software, see T71246. */
- if (!has_flat_shaded_poly && !CustomData_has_layer(&mesh->ldata, CD_CUSTOMLOOPNORMAL)) {
+ if (!has_flat_shaded_poly && !CustomData_has_layer(&mesh->ldata, CD_CUSTOMLOOPNORMAL) &&
+ (mesh->flag & ME_AUTOSMOOTH) == 0) {
return;
}
More information about the Bf-blender-cvs
mailing list