Only serialize Accessor.normalized if it is true

This commit is contained in:
Eero Pajarre 2019-11-18 13:09:25 +02:00
parent ae9364902a
commit 2e8a115d7e

View File

@ -6374,7 +6374,8 @@ static void SerializeGltfAccessor(Accessor &accessor, json &o) {
SerializeNumberProperty<size_t>("count", accessor.count, o); SerializeNumberProperty<size_t>("count", accessor.count, o);
SerializeNumberArrayProperty<double>("min", accessor.minValues, o); SerializeNumberArrayProperty<double>("min", accessor.minValues, o);
SerializeNumberArrayProperty<double>("max", accessor.maxValues, o); SerializeNumberArrayProperty<double>("max", accessor.maxValues, o);
SerializeValue("normalized", Value(accessor.normalized), o); if (accessor.normalized)
SerializeValue("normalized", Value(accessor.normalized), o);
std::string type; std::string type;
switch (accessor.type) { switch (accessor.type) {
case TINYGLTF_TYPE_SCALAR: case TINYGLTF_TYPE_SCALAR: