diff options
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 4dd3f1cc219..069215da2b7 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov, Nathan Letwory. + * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov, Nathan Letwory, Trevor Glauz. * * ***** END GPL LICENSE BLOCK ***** */ @@ -1123,6 +1123,9 @@ Object *MeshImporter::create_mesh_object(COLLADAFW::Node *node, COLLADAFW::Insta } } + // clean up the mesh + BKE_mesh_validate((Mesh *)ob->data, false, false); + return ob; } @@ -1154,13 +1157,7 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom) read_vertices(mesh, me); read_polys(mesh, me); - - // must validate before calculating edges - BKE_mesh_calc_normals(me); - BKE_mesh_validate(me, false, false); - // validation does this - // BKE_mesh_calc_edges(me, false, false); - + BKE_mesh_calc_edges(me, false, false); // read_lines() must be called after the face edges have been generated. // Otherwise the loose edges will be silently deleted again. read_lines(mesh, me); |