Export extensions
parent
d277995a97
commit
63ef19d9ad
|
@ -107,10 +107,6 @@ glTF2Exporter::glTF2Exporter(const char* filename, IOSystem* pIOSystem, const ai
|
|||
|
||||
ExportMetadata();
|
||||
|
||||
if (mScene->mRootNode) {
|
||||
ExportExtensions(mScene->mRootNode);
|
||||
}
|
||||
|
||||
ExportMaterials();
|
||||
|
||||
if (mScene->mRootNode) {
|
||||
|
@ -789,20 +785,6 @@ void glTF2Exporter::ExportMetadata()
|
|||
asset.generator = buffer;
|
||||
}
|
||||
|
||||
void glTF2Exporter::ExportExtensions(const aiNode* n)
|
||||
{
|
||||
aiMetadata* mMetaData = n->mMetaData;
|
||||
|
||||
if (mMetaData != nullptr) {
|
||||
bool pbrSpecularGlossiness;
|
||||
|
||||
if (mMetaData->Get("extensionsUsed.pbrSpecularGlossiness", pbrSpecularGlossiness)) {
|
||||
mAsset->extensionsUsed.KHR_materials_pbrSpecularGlossiness = pbrSpecularGlossiness;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref<Animation>& animRef, Ref<Buffer>& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond)
|
||||
{
|
||||
// Loop over the data and check to see if it exactly matches an existing buffer.
|
||||
|
|
|
@ -118,7 +118,6 @@ namespace Assimp
|
|||
void GetMatColor(const aiMaterial* mat, glTF2::vec4& prop, const char* propName, int type, int idx);
|
||||
void GetMatColor(const aiMaterial* mat, glTF2::vec3& prop, const char* propName, int type, int idx);
|
||||
void ExportMetadata();
|
||||
void ExportExtensions(const aiNode* n);
|
||||
void ExportMaterials();
|
||||
void ExportMeshes();
|
||||
unsigned int ExportNodeHierarchy(const aiNode* n);
|
||||
|
|
|
@ -546,13 +546,6 @@ void glTF2Importer::ImportNodes(glTF2::Asset& r)
|
|||
//if (!mScene->mRootNode) {
|
||||
// mScene->mRootNode = new aiNode("EMPTY");
|
||||
//}
|
||||
|
||||
//initialize mMetaData;
|
||||
aiMetadata* mMetaData = new aiMetadata();
|
||||
|
||||
//store used glTF extensions on the root node, for a lack of a better place.
|
||||
mMetaData->Add("extensionsUsed.pbrSpecularGlossiness", r.extensionsUsed.KHR_materials_pbrSpecularGlossiness);
|
||||
mScene->mRootNode->mMetaData = mMetaData;
|
||||
}
|
||||
|
||||
void glTF2Importer::ImportEmbeddedTextures(glTF2::Asset& r)
|
||||
|
|
Loading…
Reference in New Issue