Replace underscores at load/init, fix bone transforms with osgAnimation

This commit is contained in:
Sam Hellawell 2024-03-23 17:04:49 +00:00
parent 541d09cda7
commit 62f1ca3f4d
11 changed files with 185 additions and 81 deletions

View file

@ -15,6 +15,13 @@ namespace Misc::StringUtils
bool operator()(char x, char y) const { return toLower(x) < toLower(y); }
};
inline std::string underscoresToSpaces(const std::string& oldName)
{
std::string newName = oldName;
std::replace(newName.begin(), newName.end(), '_', ' ');
return newName;
}
inline bool ciLess(std::string_view x, std::string_view y)
{
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharLess());