Save/Load Collada 1.4 Root Asset Metadata
Add Collada 1.4 <asset/> metadata to export and import. Can store in the Scene or the Root Node for export, will be loaded into the Scene during Import
This commit is contained in:
@@ -208,9 +208,14 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
|
||||
}
|
||||
|
||||
// Store scene metadata
|
||||
for (auto it = parser.mAssetMetaData.cbegin(); it != parser.mAssetMetaData.cend(); ++it)
|
||||
{
|
||||
pScene->mMetaData->Add((*it).first, (*it).second);
|
||||
if (!parser.mAssetMetaData.empty()) {
|
||||
const size_t numMeta(parser.mAssetMetaData.size());
|
||||
pScene->mMetaData = aiMetadata::Alloc(static_cast<unsigned int>(numMeta));
|
||||
size_t i = 0;
|
||||
for (auto it = parser.mAssetMetaData.cbegin(); it != parser.mAssetMetaData.cend(); ++it, ++i)
|
||||
{
|
||||
pScene->mMetaData->Set(static_cast<unsigned int>(i), (*it).first, (*it).second);
|
||||
}
|
||||
}
|
||||
|
||||
// store all meshes
|
||||
|
||||
Reference in New Issue
Block a user