Merge pull request #230 from itainter/fix-primitive-extension

Fix the issue that the extension of primitive written as extension of mesh.
This commit is contained in:
Syoyo Fujita 2019-12-18 13:33:46 +09:00 committed by GitHub
commit 8ced108571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);