mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Make RigGeometry bone references case-insensitive (Fixes #3058)
This commit is contained in:
parent
53158d29b1
commit
c60f4ba7bd
@ -3,6 +3,8 @@
|
|||||||
#include <osg/Transform>
|
#include <osg/Transform>
|
||||||
#include <osg/MatrixTransform>
|
#include <osg/MatrixTransform>
|
||||||
|
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
@ -23,7 +25,7 @@ public:
|
|||||||
if (!bone)
|
if (!bone)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mCache[bone->getName()] = std::make_pair(getNodePath(), bone);
|
mCache[Misc::StringUtils::lowerCase(bone->getName())] = std::make_pair(getNodePath(), bone);
|
||||||
|
|
||||||
traverse(node);
|
traverse(node);
|
||||||
}
|
}
|
||||||
@ -59,7 +61,7 @@ Bone* Skeleton::getBone(const std::string &name)
|
|||||||
mBoneCacheInit = true;
|
mBoneCacheInit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
BoneCache::iterator found = mBoneCache.find(name);
|
BoneCache::iterator found = mBoneCache.find(Misc::StringUtils::lowerCase(name));
|
||||||
if (found == mBoneCache.end())
|
if (found == mBoneCache.end())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user