Collada exporter: improve compatibility when exported path contains ':'.
Old code exported "c:/foo.jpg" path as "c%3a/foo.jpg". Replacing : with %3a was probably legal, but it made paths unreadable for existing Max importers.pull/756/head
parent
df9bb8b915
commit
c062eb0db4
|
@ -547,7 +547,7 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin
|
||||||
std::stringstream imageUrlEncoded;
|
std::stringstream imageUrlEncoded;
|
||||||
for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
|
for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
|
||||||
{
|
{
|
||||||
if( isalnum_C( (unsigned char) *it) || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
|
if( isalnum_C( (unsigned char) *it) || *it == ':' || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
|
||||||
imageUrlEncoded << *it;
|
imageUrlEncoded << *it;
|
||||||
else
|
else
|
||||||
imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec;
|
imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec;
|
||||||
|
|
Loading…
Reference in New Issue