diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-17 13:14:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-17 14:59:07 +0300 |
commit | e1606e8c87102a2295d40f817a3643df9b697c3d (patch) | |
tree | c540964c83b331c407485b6373934ec426ef9e4f /source/blender/blenkernel/intern/cdderivedmesh.c | |
parent | 19614f4395b3a5404c96fdec02e0d5e89bfe9e32 (diff) |
Don't create MFace's when calculating normals
Instead only create MFace layer when its requested
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 4820514b314..6880c1c9b2a 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -2495,7 +2495,7 @@ void CDDM_calc_normals_mapping_ex(DerivedMesh *dm, const bool only_face_normals) cddm->mvert = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT, dm->numVertData); #endif - +#if 0 if (dm->numTessFaceData == 0) { /* No tessellation on this mesh yet, need to calculate one. * @@ -2509,6 +2509,7 @@ void CDDM_calc_normals_mapping_ex(DerivedMesh *dm, const bool only_face_normals) BLI_assert(CustomData_has_layer(&dm->faceData, CD_ORIGINDEX)); CustomData_free_layers(&dm->faceData, CD_NORMAL, dm->numTessFaceData); } +#endif face_nors = MEM_mallocN(sizeof(*face_nors) * dm->numPolyData, "face_nors"); |