Only export byteStride if not 0

pull/1423/head
Daniel Hritzkiv 2017-09-01 17:56:42 -04:00
parent a0d97505e5
commit 7f01e3f48f
No known key found for this signature in database
GPG Key ID: D1D19875679D5CBF
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,11 @@ namespace glTF2 {
{ {
obj.AddMember("bufferView", a.bufferView->index, w.mAl); obj.AddMember("bufferView", a.bufferView->index, w.mAl);
obj.AddMember("byteOffset", a.byteOffset, w.mAl); obj.AddMember("byteOffset", a.byteOffset, w.mAl);
if (a.byteStride != 0) {
obj.AddMember("byteStride", a.byteStride, w.mAl); obj.AddMember("byteStride", a.byteStride, w.mAl);
}
obj.AddMember("componentType", int(a.componentType), w.mAl); obj.AddMember("componentType", int(a.componentType), w.mAl);
obj.AddMember("count", a.count, w.mAl); obj.AddMember("count", a.count, w.mAl);
obj.AddMember("type", StringRef(AttribType::ToString(a.type)), w.mAl); obj.AddMember("type", StringRef(AttribType::ToString(a.type)), w.mAl);