Handle case in osgAnimation bone names

symlink-ci
Nelsson Huotari 4 years ago
parent 7d3f2bc113
commit 2162b97fef

@ -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…
Cancel
Save