mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +00:00
Handle case in osgAnimation bone names
This commit is contained in:
parent
7d3f2bc113
commit
2162b97fef
2 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <components/nifosg/nifloader.hpp>
|
||||
#include <components/sceneutil/keyframe.hpp>
|
||||
#include <components/sceneutil/osgacontroller.hpp>
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
#include "animation.hpp"
|
||||
#include "objectcache.hpp"
|
||||
|
@ -21,7 +22,7 @@ namespace Resource
|
|||
|
||||
void RetrieveAnimationsVisitor::apply(osg::Node& node)
|
||||
{
|
||||
if (node.libraryName() == std::string("osgAnimation") && node.className() == std::string("Bone") && node.getName() == std::string("bip01"))
|
||||
if (node.libraryName() == std::string("osgAnimation") && node.className() == std::string("Bone") && Misc::StringUtils::lowerCase(node.getName()) == std::string("bip01"))
|
||||
{
|
||||
osg::ref_ptr<SceneUtil::OsgAnimationController> callback = new SceneUtil::OsgAnimationController();
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <osgAnimation/UpdateMatrixTransform>
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/misc/stringops.hpp>
|
||||
#include <components/resource/animation.hpp>
|
||||
#include <components/sceneutil/controller.hpp>
|
||||
#include <components/sceneutil/keyframe.hpp>
|
||||
|
@ -83,7 +84,7 @@ namespace SceneUtil
|
|||
{
|
||||
osgAnimation::UpdateMatrixTransform* umt = dynamic_cast<osgAnimation::UpdateMatrixTransform*>(cb);
|
||||
if (umt)
|
||||
if (node.getName() != "bip01") link(umt);
|
||||
if (Misc::StringUtils::lowerCase(node.getName()) != "bip01") link(umt);
|
||||
cb = cb->getNestedCallback();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue