- Collada Exporter id naming scheme once again revised to exclude any potential invalid chars
- Collada Exporter outputs proper URLs for texture file names now. - Updated Collada Loader to understand and convert texture file name URLs git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1191 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -1398,6 +1398,24 @@ void ColladaLoader::ConvertPath (aiString& ss)
|
||||
memmove(ss.data,ss.data+7,ss.length);
|
||||
ss.data[ss.length] = '\0';
|
||||
}
|
||||
|
||||
// find and convert all %xyz special chars
|
||||
char* out = ss.data;
|
||||
for( const char* it = ss.data; it != ss.data + ss.length; /**/ )
|
||||
{
|
||||
if( *it == '%' )
|
||||
{
|
||||
size_t nbr = strtoul16( ++it, &it);
|
||||
*out++ = nbr;
|
||||
} else
|
||||
{
|
||||
*out++ = *it++;
|
||||
}
|
||||
}
|
||||
|
||||
// adjust length and terminator of the shortened string
|
||||
*out = 0;
|
||||
ss.length = (ptrdiff_t) (out - ss.data);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user