mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:53:51 +00:00
Limit conversion of underscores to nodes origating from osgAnimation library
This commit is contained in:
parent
2c67f34c6d
commit
1221889cf7
1 changed files with 8 additions and 5 deletions
|
@ -62,12 +62,15 @@ namespace SceneUtil
|
||||||
// Take transformation for first found node in file
|
// Take transformation for first found node in file
|
||||||
std::string originalNodeName = Misc::StringUtils::lowerCase(trans.getName());
|
std::string originalNodeName = Misc::StringUtils::lowerCase(trans.getName());
|
||||||
|
|
||||||
// Convert underscores to whitespaces as a workaround for Collada (OpenMW's animation system uses whitespace-separated names)
|
if (trans.libraryName() == std::string("osgAnimation"))
|
||||||
std::string underscore = "_";
|
{
|
||||||
std::size_t foundUnderscore = originalNodeName.find(underscore);
|
// Convert underscores to whitespaces as a workaround for Collada (OpenMW's animation system uses whitespace-separated names)
|
||||||
|
std::string underscore = "_";
|
||||||
|
std::size_t foundUnderscore = originalNodeName.find(underscore);
|
||||||
|
|
||||||
if (foundUnderscore != std::string::npos)
|
if (foundUnderscore != std::string::npos)
|
||||||
std::replace(originalNodeName.begin(), originalNodeName.end(), '_', ' ');
|
std::replace(originalNodeName.begin(), originalNodeName.end(), '_', ' ');
|
||||||
|
}
|
||||||
|
|
||||||
const std::string nodeName = originalNodeName;
|
const std::string nodeName = originalNodeName;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue