Update ObjExporter.cpp
In the OBJ spec ( http://www.martinreddy.net/gfx/3d/OBJ.spec ), in the section labeled "Referencing groups of vertices", there is no support for allowing a trailing slash with no valid vertex normal reference at the end. This commit modifies the vertex reference output code to prevent this behavior, as it has been causing compatibility issues with other software that parse OBJ files.pull/300/head
parent
1c4a8e9017
commit
d10d20f62f
|
@ -243,11 +243,8 @@ void ObjExporter :: WriteGeometryFile()
|
|||
if (fv.vt) {
|
||||
mOutput << fv.vt;
|
||||
}
|
||||
if (f.kind == 'f') {
|
||||
mOutput << '/';
|
||||
if (fv.vn) {
|
||||
mOutput << fv.vn;
|
||||
}
|
||||
if (f.kind == 'f' && fv.vn) {
|
||||
mOutput << '/' << fv.vn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue