diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-04 01:03:16 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-04 01:03:16 +0300 |
commit | bc15812e0d9664ab5b26995f2a2b29b7f2c75fd6 (patch) | |
tree | 7fd1088d68cb3280cc316b424554d33d7308b294 /source/blender/io/wavefront_obj | |
parent | 6089a96be2993d0808018cdf209db3691a1f2d0f (diff) | |
parent | 1cc11e32e4acefa095b5a851d49172c0972fc261 (diff) |
Merge branch 'blender-v3.3-release'
Diffstat (limited to 'source/blender/io/wavefront_obj')
-rw-r--r-- | source/blender/io/wavefront_obj/importer/obj_import_mesh.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc index 6f66ce5a6bd..d7b2bc2e67c 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc @@ -323,6 +323,10 @@ void MeshFromGeometry::create_normals(Mesh *mesh) if (global_vertices_.vertex_normals.is_empty()) { return; } + /* Custom normals can only be stored on face corners. */ + if (mesh_geometry_.total_loops_ == 0) { + return; + } float(*loop_normals)[3] = static_cast<float(*)[3]>( MEM_malloc_arrayN(mesh_geometry_.total_loops_, sizeof(float[3]), __func__)); |