Fix the issue that the extension of primitive written as extension of mesh.

This commit is contained in:
zhaozhiquan 2019-12-18 11:28:57 +08:00
parent 1322c7bf09
commit 3eb65e269a

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