[Bf-blender-cvs] [8b192e1a6a5] master: fix D4187: Collada Importer: Material assignment broken after importing Mesh with multiple materials
Trevor Glauz
noreply at git.blender.org
Thu Jan 10 20:25:05 CET 2019
Commit: 8b192e1a6a5f985087949591d75e5757589ee16a
Author: Trevor Glauz
Date: Thu Jan 10 20:23:40 2019 +0100
Branches: master
https://developer.blender.org/rB8b192e1a6a5f985087949591d75e5757589ee16a
fix D4187: Collada Importer: Material assignment broken after importing Mesh with multiple materials
===================================================================
M source/blender/collada/MeshImporter.cpp
===================================================================
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);
More information about the Bf-blender-cvs
mailing list