|
|
@@ -1681,7 +1681,8 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset &a) {
|
|
|
const bool hasGenerator = !a.asset.generator.empty();
|
|
|
const bool hasCopyright = !a.asset.copyright.empty();
|
|
|
const bool hasSceneMetadata = a.scene->customExtensions;
|
|
|
- if (hasVersion || hasGenerator || hasCopyright || hasSceneMetadata) {
|
|
|
+ const bool hasSceneExtras = a.scene->extras.HasExtras();
|
|
|
+ if (hasVersion || hasGenerator || hasCopyright || hasSceneMetadata || hasSceneExtras) {
|
|
|
mScene->mMetaData = new aiMetadata;
|
|
|
if (hasVersion) {
|
|
|
mScene->mMetaData->Add(AI_METADATA_SOURCE_FORMAT_VERSION, aiString(a.asset.version));
|
|
|
@@ -1695,6 +1696,9 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset &a) {
|
|
|
if (hasSceneMetadata) {
|
|
|
ParseExtensions(mScene->mMetaData, a.scene->customExtensions);
|
|
|
}
|
|
|
+ if (hasSceneExtras) {
|
|
|
+ ParseExtras(mScene->mMetaData, a.scene->extras);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|