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 id; //!< The globally unique ID used to reference this object
|
||||||
std::string name; //!< The user-defined name of 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)
|
//! Objects marked as special are not exported (used to emulate the binary body buffer)
|
||||||
virtual bool IsSpecial() const { return false; }
|
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) {
|
inline void Object::ReadExtensions(Value &val) {
|
||||||
if (Value *curExtensions = FindObject(val, "extensions")) {
|
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");
|
"\" does not match the vertex count");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto componentType = attr.color[c]->componentType;
|
auto componentType = attr.color[c]->componentType;
|
||||||
if (componentType == glTF2::ComponentType_FLOAT) {
|
if (componentType == glTF2::ComponentType_FLOAT) {
|
||||||
attr.color[c]->ExtractData(aim->mColors[c]);
|
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;
|
ainode->mMetaData = new aiMetadata;
|
||||||
ParseExtensions(ainode->mMetaData, node.extensions);
|
ParseExtensions(ainode->mMetaData, node.customExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetNodeTransform(ainode->mTransformation, node);
|
GetNodeTransform(ainode->mTransformation, node);
|
||||||
|
@ -1498,7 +1498,7 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
||||||
const bool hasVersion = !a.asset.version.empty();
|
const bool hasVersion = !a.asset.version.empty();
|
||||||
const bool hasGenerator = !a.asset.generator.empty();
|
const bool hasGenerator = !a.asset.generator.empty();
|
||||||
const bool hasCopyright = !a.asset.copyright.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) {
|
if (hasVersion || hasGenerator || hasCopyright || hasSceneMetadata) {
|
||||||
mScene->mMetaData = new aiMetadata;
|
mScene->mMetaData = new aiMetadata;
|
||||||
if (hasVersion) {
|
if (hasVersion) {
|
||||||
|
@ -1511,7 +1511,7 @@ void glTF2Importer::ImportCommonMetadata(glTF2::Asset& a) {
|
||||||
mScene->mMetaData->Add(AI_METADATA_SOURCE_COPYRIGHT, aiString(a.asset.copyright));
|
mScene->mMetaData->Add(AI_METADATA_SOURCE_COPYRIGHT, aiString(a.asset.copyright));
|
||||||
}
|
}
|
||||||
if (hasSceneMetadata) {
|
if (hasSceneMetadata) {
|
||||||
ParseExtensions(mScene->mMetaData, a.scene->extensions);
|
ParseExtensions(mScene->mMetaData, a.scene->customExtensions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue