Merge branch 'master' into master
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2021, assimp team
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
|
||||
|
||||
|
||||
@@ -106,21 +106,13 @@ LWOImporter::~LWOImporter() {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
bool LWOImporter::CanRead(const std::string &file, IOSystem *pIOHandler, bool checkSig) const {
|
||||
const std::string extension = GetExtension(file);
|
||||
if (extension == "lwo" || extension == "lxo") {
|
||||
return true;
|
||||
}
|
||||
|
||||
// if check for extension is not enough, check for the magic tokens
|
||||
if (!extension.length() || checkSig) {
|
||||
uint32_t tokens[3];
|
||||
tokens[0] = AI_LWO_FOURCC_LWOB;
|
||||
tokens[1] = AI_LWO_FOURCC_LWO2;
|
||||
tokens[2] = AI_LWO_FOURCC_LXOB;
|
||||
return CheckMagicToken(pIOHandler, file, tokens, 3, 8);
|
||||
}
|
||||
return false;
|
||||
bool LWOImporter::CanRead(const std::string &file, IOSystem *pIOHandler, bool /*checkSig*/) const {
|
||||
static const uint32_t tokens[] = {
|
||||
AI_LWO_FOURCC_LWOB,
|
||||
AI_LWO_FOURCC_LWO2,
|
||||
AI_LWO_FOURCC_LXOB
|
||||
};
|
||||
return CheckMagicToken(pIOHandler, file, tokens, AI_COUNT_OF(tokens), 8);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -402,7 +394,7 @@ void LWOImporter::InternReadFile(const std::string &pFile,
|
||||
|
||||
// If a RGB color map is explicitly requested delete the
|
||||
// alpha channel - it could theoretically be != 1.
|
||||
if (_mSurfaces[i].mVCMapType == AI_LWO_RGB)
|
||||
if (_mSurfaces[j].mVCMapType == AI_LWO_RGB)
|
||||
pvVC[w]->a = 1.f;
|
||||
|
||||
pvVC[w]++;
|
||||
|
||||
Reference in New Issue
Block a user