Merge pull request #1555 from assimp/issue_1315

closes https://github.com/assimp/assimp/issues/1315: check in exporti…
pull/1556/head^2
Kim Kulling 2017-11-08 22:52:32 +01:00 committed by GitHub
commit bd104bda3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -258,7 +258,6 @@ void ObjExporter::WriteMaterialFile()
}
}
// ------------------------------------------------------------------------------------------------
void ObjExporter::WriteGeometryFile(bool noMtl) {
WriteHeader(mOutput);
if (!noMtl)
@ -280,8 +279,10 @@ void ObjExporter::WriteGeometryFile(bool noMtl) {
mOutput << "# " << vp.size() << " vertex positions and colors" << endl;
size_t colIdx = 0;
for ( const aiVector3D& v : vp ) {
if ( colIdx < vc.size() ) {
mOutput << "v " << v.x << " " << v.y << " " << v.z << " " << vc[ colIdx ].r << " " << vc[ colIdx ].g << " " << vc[ colIdx ].b << endl;
colIdx++;
}
++colIdx;
}
}
mOutput << endl;