From 478c77d6f9822141448ef564605f304987a474d8 Mon Sep 17 00:00:00 2001 From: zhaozhiquan Date: Wed, 18 Dec 2019 11:28:57 +0800 Subject: [PATCH] Fix the issue that the extension of primitive written as extension of mesh. --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index fee068c..6303642 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -6782,7 +6782,7 @@ static void SerializeGltfMesh(Mesh &mesh, json &o) { JsonAddMember(primitive, "targets", std::move(targets)); } - SerializeExtensionMap(gltfPrimitive.extensions, o); + SerializeExtensionMap(gltfPrimitive.extensions, primitive); if (gltfPrimitive.extras.Type() != NULL_TYPE) { SerializeValue("extras", gltfPrimitive.extras, primitive);