From b96f6966ab966a86489d446368a1d53ab60ab383 Mon Sep 17 00:00:00 2001 From: Jens Olsson Date: Thu, 24 May 2018 15:29:54 +0200 Subject: [PATCH 1/2] added missing extras serialization for nodes --- tiny_gltf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tiny_gltf.h b/tiny_gltf.h index f60d9fb..b1ef164 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -3880,6 +3880,10 @@ static void SerializeGltfNode(Node &node, json &o) { SerializeNumberProperty("camera", node.camera, o); } + if (node.extras.Type() != NULL_TYPE) + SerializeValue("extras", node.extras, o); + } + SerializeExtensionMap(node.extensions, o); SerializeStringProperty("name", node.name, o); SerializeNumberArrayProperty("children", node.children, o); From a9718668b4a66c6e1108305d09a8fe8b7f72f87e Mon Sep 17 00:00:00 2001 From: Jens Olsson Date: Thu, 24 May 2018 15:48:49 +0200 Subject: [PATCH 2/2] fixing typo --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index b1ef164..dccb1e0 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -3880,7 +3880,7 @@ static void SerializeGltfNode(Node &node, json &o) { SerializeNumberProperty("camera", node.camera, o); } - if (node.extras.Type() != NULL_TYPE) + if (node.extras.Type() != NULL_TYPE) { SerializeValue("extras", node.extras, o); }