Remove protocol check
This commit is contained in:
parent
46505f66d3
commit
e1e6e07de3
@ -897,27 +897,20 @@ std::string daeReader::processImagePath(const domImage* pDomImage) const
|
|||||||
if (pDomImage->getInit_from())
|
if (pDomImage->getInit_from())
|
||||||
{
|
{
|
||||||
pDomImage->getInit_from()->getValue().validate();
|
pDomImage->getInit_from()->getValue().validate();
|
||||||
if (strcmp(pDomImage->getInit_from()->getValue().getProtocol(), "file") == 0)
|
std::string path = pDomImage->getInit_from()->getValue().pathDir() +
|
||||||
|
pDomImage->getInit_from()->getValue().pathFile();
|
||||||
|
path = ReaderWriterDAE::ConvertColladaCompatibleURIToFilePath(path);
|
||||||
|
if (path.empty())
|
||||||
{
|
{
|
||||||
std::string path = pDomImage->getInit_from()->getValue().pathDir() +
|
OSG_WARN << "Unable to get path from URI." << std::endl;
|
||||||
pDomImage->getInit_from()->getValue().pathFile();
|
return std::string();
|
||||||
path = ReaderWriterDAE::ConvertColladaCompatibleURIToFilePath(path);
|
}
|
||||||
if (path.empty())
|
|
||||||
{
|
|
||||||
OSG_WARN << "Unable to get path from URI." << std::endl;
|
|
||||||
return std::string();
|
|
||||||
}
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
// If the path has a drive specifier or a UNC name then strip the leading /
|
// If the path has a drive specifier or a UNC name then strip the leading /
|
||||||
if (path.size() > 2 && (path[2] == ':' || (path[1] == '/' && path[2] == '/')))
|
if (path.size() > 2 && (path[2] == ':' || (path[1] == '/' && path[2] == '/')))
|
||||||
return path.substr(1, std::string::npos);
|
return path.substr(1, std::string::npos);
|
||||||
#endif
|
#endif
|
||||||
return path;
|
return path;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
OSG_WARN << "Only images with a \"file\" scheme URI are supported in this version." << std::endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user