From 3eb65e269a7a805c4a294547804ee6ce3bb80b9b 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);