Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2020-05-15 13:58:48 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-05-15 13:58:48 +0300
commit0ae64a9945db9f3d00ba7ef3780e25e16fabf664 (patch)
tree0d29c7e5e23e422c96d8c23f8e652ff43a463816 /source/blender/io
parent7049d2dc584d1aada54848fbaa7be6d599972fb8 (diff)
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.
Diffstat (limited to 'source/blender/io')
-rw-r--r--source/blender/io/alembic/intern/abc_writer_mesh.cc3
1 files changed, 2 insertions, 1 deletions
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;
}