diff --git a/src/gltf/properties/MeshData.cpp b/src/gltf/properties/MeshData.cpp index 36c06dcb..bf17abf6 100644 --- a/src/gltf/properties/MeshData.cpp +++ b/src/gltf/properties/MeshData.cpp @@ -17,7 +17,7 @@ json MeshData::serialize() const { json jsonTargetNamesArray = json::array(); for (const auto& primitive : primitives) { jsonPrimitivesArray.push_back(*primitive); - if (!primitive->targetNames.empty()) { + if (!primitive->targetNames.empty() && jsonTargetNamesArray.empty()) { for (auto targetName : primitive->targetNames) { jsonTargetNamesArray.push_back(targetName); }