浏览代码

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

OBJ Exporter: No "g" lines with empty names
Kim Kulling 11 年之前
父节点
当前提交
9fbc9c4fb7
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      code/ObjExporter.cpp

+ 3 - 1
code/ObjExporter.cpp

@@ -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;
-		mOutput << "g " << m.name << endl;
+		if (!m.name.empty()) {
+			mOutput << "g " << m.name << endl;
+		}
 		mOutput << "usemtl " << m.matname << endl;
 
 		BOOST_FOREACH(const Face& f, m.faces) {