Merge pull request #301 from eyethereal/obj-exporter-no-name-no-group

OBJ Exporter: No "g" lines with empty names
pull/309/head
Kim Kulling 2014-06-21 15:21:27 +02:00
commit 9fbc9c4fb7
1 changed files with 3 additions and 1 deletions

View File

@ -228,7 +228,9 @@ void ObjExporter :: WriteGeometryFile()
// now write all mesh instances
BOOST_FOREACH(const MeshInstance& m, meshes) {
mOutput << "# Mesh \'" << m.name << "\' with " << m.faces.size() << " faces" << endl;
if (!m.name.empty()) {
mOutput << "g " << m.name << endl;
}
mOutput << "usemtl " << m.matname << endl;
BOOST_FOREACH(const Face& f, m.faces) {