fixed signature-based detection on unknown extensions
parent
b79b84d34e
commit
ae93f53b51
|
@ -676,15 +676,12 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags) {
|
||||||
|
|
||||||
if (!imp) {
|
if (!imp) {
|
||||||
// not so bad yet ... try format auto detection.
|
// not so bad yet ... try format auto detection.
|
||||||
const std::string::size_type s = pFile.find_last_of('.');
|
ASSIMP_LOG_INFO("File extension not known, trying signature-based detection");
|
||||||
if (s != std::string::npos) {
|
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
|
||||||
ASSIMP_LOG_INFO("File extension not known, trying signature-based detection");
|
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
|
||||||
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
|
imp = pimpl->mImporter[a];
|
||||||
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
|
SetPropertyInteger("importerIndex", a);
|
||||||
imp = pimpl->mImporter[a];
|
break;
|
||||||
SetPropertyInteger("importerIndex", a);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Put a proper error message if no suitable importer was found
|
// Put a proper error message if no suitable importer was found
|
||||||
|
|
Loading…
Reference in New Issue