From 2e8a115d7e364ed8526a0b748ba7fb1aa8ad8094 Mon Sep 17 00:00:00 2001 From: Eero Pajarre Date: Mon, 18 Nov 2019 13:09:25 +0200 Subject: [PATCH] Only serialize Accessor.normalized if it is true --- tiny_gltf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 720f7f3..3fac9d2 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -6374,7 +6374,8 @@ static void SerializeGltfAccessor(Accessor &accessor, json &o) { SerializeNumberProperty("count", accessor.count, o); SerializeNumberArrayProperty("min", accessor.minValues, o); SerializeNumberArrayProperty("max", accessor.maxValues, o); - SerializeValue("normalized", Value(accessor.normalized), o); + if (accessor.normalized) + SerializeValue("normalized", Value(accessor.normalized), o); std::string type; switch (accessor.type) { case TINYGLTF_TYPE_SCALAR: