Renamed glTF2::Object::extensions to customExtensions to avoid shadowing in other subclasses.
parent
a7a30baf27
commit
3de20af3cc
|
@ -408,7 +408,7 @@ struct Object {
|
|||
std::string id; //!< The globally unique ID used to reference this object
|
||||
std::string name; //!< The user-defined name of this object
|
||||
|
||||
CustomExtension extensions;
|
||||
CustomExtension customExtensions;
|
||||
|
||||
//! Objects marked as special are not exported (used to emulate the binary body buffer)
|
||||
virtual bool IsSpecial() const { return false; }
|
||||
|
|
|
@ -369,7 +369,7 @@ inline Value *Object::FindExtension(Value &val, const char *extensionId) {
|
|||
|
||||
inline void Object::ReadExtensions(Value &val) {
|
||||
if (Value *curExtensions = FindObject(val, "extensions")) {
|
||||
this->extensions = glTF2::ReadExtensions("extensions", *curExtensions);
|
||||
this->customExtensions = glTF2::ReadExtensions("extensions", *curExtensions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -489,7 +489,7 @@ void glTF2Importer::ImportMeshes(glTF2::Asset &r) {
|
|||
"\" does not match the vertex count");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
auto componentType = attr.color[c]->componentType;
|
||||
if (componentType == glTF2::ComponentType_FLOAT) {
|
||||
attr.color[c]->ExtractData(aim->mColors[c]);
|
||||
|
@ -1002,9 +1002,9 @@ aiNode *ImportNode(aiScene *pScene, glTF2::Asset &r, std::vector<unsigned int> &
|
|||
}
|
||||
}
|
||||
|
||||
if (node.extensions) {
|
||||
if (node.customExtensions) {
|
||||
ainode->mMetaData = new aiMetadata;
|
||||
ParseExtensions(ainode->mMetaData, node.extensions);
|
||||
ParseExtensions(ainode->mMetaData, node.customExtensions);
|
||||
}
|
||||
|
||||
GetNodeTransform(ainode->mTransformation, node);
|
||||
|
@ -1498,7 +1498,7 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
|||
const bool hasVersion = !a.asset.version.empty();
|
||||
const bool hasGenerator = !a.asset.generator.empty();
|
||||
const bool hasCopyright = !a.asset.copyright.empty();
|
||||
const bool hasSceneMetadata = a.scene->extensions;
|
||||
const bool hasSceneMetadata = a.scene->customExtensions;
|
||||
if (hasVersion || hasGenerator || hasCopyright || hasSceneMetadata) {
|
||||
mScene->mMetaData = new aiMetadata;
|
||||
if (hasVersion) {
|
||||
|
@ -1511,7 +1511,7 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
|||
mScene->mMetaData->Add(AI_METADATA_SOURCE_COPYRIGHT, aiString(a.asset.copyright));
|
||||
}
|
||||
if (hasSceneMetadata) {
|
||||
ParseExtensions(mScene->mMetaData, a.scene->extensions);
|
||||
ParseExtensions(mScene->mMetaData, a.scene->customExtensions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue