mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-21 09:39:56 +00:00
Handle case in osgAnimation bone names
This commit is contained in:
parent
7d3f2bc113
commit
2162b97fef
@ -9,6 +9,7 @@
|
|||||||
#include <components/nifosg/nifloader.hpp>
|
#include <components/nifosg/nifloader.hpp>
|
||||||
#include <components/sceneutil/keyframe.hpp>
|
#include <components/sceneutil/keyframe.hpp>
|
||||||
#include <components/sceneutil/osgacontroller.hpp>
|
#include <components/sceneutil/osgacontroller.hpp>
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
|
|
||||||
#include "animation.hpp"
|
#include "animation.hpp"
|
||||||
#include "objectcache.hpp"
|
#include "objectcache.hpp"
|
||||||
@ -21,7 +22,7 @@ namespace Resource
|
|||||||
|
|
||||||
void RetrieveAnimationsVisitor::apply(osg::Node& node)
|
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();
|
osg::ref_ptr<SceneUtil::OsgAnimationController> callback = new SceneUtil::OsgAnimationController();
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <osgAnimation/UpdateMatrixTransform>
|
#include <osgAnimation/UpdateMatrixTransform>
|
||||||
|
|
||||||
#include <components/debug/debuglog.hpp>
|
#include <components/debug/debuglog.hpp>
|
||||||
|
#include <components/misc/stringops.hpp>
|
||||||
#include <components/resource/animation.hpp>
|
#include <components/resource/animation.hpp>
|
||||||
#include <components/sceneutil/controller.hpp>
|
#include <components/sceneutil/controller.hpp>
|
||||||
#include <components/sceneutil/keyframe.hpp>
|
#include <components/sceneutil/keyframe.hpp>
|
||||||
@ -83,7 +84,7 @@ namespace SceneUtil
|
|||||||
{
|
{
|
||||||
osgAnimation::UpdateMatrixTransform* umt = dynamic_cast<osgAnimation::UpdateMatrixTransform*>(cb);
|
osgAnimation::UpdateMatrixTransform* umt = dynamic_cast<osgAnimation::UpdateMatrixTransform*>(cb);
|
||||||
if (umt)
|
if (umt)
|
||||||
if (node.getName() != "bip01") link(umt);
|
if (Misc::StringUtils::lowerCase(node.getName()) != "bip01") link(umt);
|
||||||
cb = cb->getNestedCallback();
|
cb = cb->getNestedCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user