Added automatic removal of .qt extension that allows one to automatically select

the quicktime plugin.
This commit is contained in:
Robert Osfield
2007-09-05 16:47:43 +00:00
parent 0372825d9b
commit 4b84acbec6

View File

@@ -100,6 +100,11 @@ public:
virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const
{
std::string ext = osgDB::getLowerCaseFileExtension(file);
if (osgDB::equalCaseInsensitive(ext,"qt"))
{
return readImage(osgDB::getNameLessExtension(file),options);
}
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
std::string fileName = osgDB::findDataFile( file, options);