1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 16:15:31 +00:00

Use bip01 for root bone name

This commit is contained in:
Nelsson Huotari 2020-12-15 13:51:49 +02:00
parent 6c1f6169c0
commit 8b2bf12e8f
3 changed files with 3 additions and 5 deletions

View file

@ -782,8 +782,6 @@ namespace MWRender
NodeMap::const_iterator found = nodeMap.find("bip01");
if (found == nodeMap.end())
found = nodeMap.find("root bone");
if (found == nodeMap.end())
found = nodeMap.find("root");
if (found != nodeMap.end())
mAccumRoot = found->second;

View file

@ -21,7 +21,7 @@ namespace Resource
void RetrieveAnimationsVisitor::apply(osg::Node& node)
{
if (node.libraryName() == std::string("osgAnimation") && node.className() == std::string("Bone") && node.getName() == std::string("root"))
if (node.libraryName() == std::string("osgAnimation") && node.className() == std::string("Bone") && node.getName() == std::string("bip01"))
{
osg::ref_ptr<SceneUtil::OsgAnimationController> callback = new SceneUtil::OsgAnimationController();

View file

@ -83,7 +83,7 @@ namespace SceneUtil
{
osgAnimation::UpdateMatrixTransform* umt = dynamic_cast<osgAnimation::UpdateMatrixTransform*>(cb);
if (umt)
if (node.getName() != "root") link(umt);
if (node.getName() != "bip01") link(umt);
cb = cb->getNestedCallback();
}
@ -133,7 +133,7 @@ namespace SceneUtil
for (const auto& channel: channels)
{
if (channel->getTargetName() != "root" || channel->getName() != "transform") continue;
if (channel->getTargetName() != "bip01" || channel->getName() != "transform") continue;
if ( osgAnimation::MatrixLinearSampler* templateSampler = dynamic_cast<osgAnimation::MatrixLinearSampler*> (channel->getSampler()) )
{