[Bf-blender-cvs] [7f4ebd2] alembic_basic_io: Only compute normals if we haven't read normals from alembic.
Kévin Dietrich
noreply at git.blender.org
Mon Jun 20 18:59:29 CEST 2016
Commit: 7f4ebd278de5372d9e775780c820a935cf7f622b
Author: Kévin Dietrich
Date: Mon Jun 20 15:01:31 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB7f4ebd278de5372d9e775780c820a935cf7f622b
Only compute normals if we haven't read normals from alembic.
===================================================================
M source/blender/alembic/intern/alembic_capi.cc
===================================================================
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index 93bd21b..40359c3 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -753,7 +753,10 @@ static DerivedMesh *read_mesh_sample(DerivedMesh *dm, const IObject &iobject, co
read_mpolys(mpolys, mloops, mloopuvs, pdata, face_indices, face_counts, uvs, uvs_indices, poly_normals);
CDDM_calc_edges(dm);
- dm->dirty = static_cast<DMDirtyFlag>(static_cast<int>(dm->dirty) | static_cast<int>(DM_DIRTY_NORMALS));
+
+ if (!normals.valid()) {
+ dm->dirty = static_cast<DMDirtyFlag>(static_cast<int>(dm->dirty) | static_cast<int>(DM_DIRTY_NORMALS));
+ }
return dm;
}
More information about the Bf-blender-cvs
mailing list