mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 19:36:40 +00:00
Remove rename from RenameBonesVisitor, rename to RenameAnimCallbacksVisitor
This commit is contained in:
parent
d09f32d9e4
commit
b7aa3b9f47
1 changed files with 3 additions and 5 deletions
|
@ -383,18 +383,16 @@ namespace Resource
|
|||
}
|
||||
}
|
||||
|
||||
class RenameBonesVisitor : public osg::NodeVisitor
|
||||
class RenameAnimCallbacksVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
RenameBonesVisitor()
|
||||
RenameAnimCallbacksVisitor()
|
||||
: osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
|
||||
{
|
||||
}
|
||||
|
||||
void apply(osg::MatrixTransform& node) override
|
||||
{
|
||||
node.setName(Misc::StringUtils::underscoresToSpaces(node.getName()));
|
||||
|
||||
// osgAnimation update callback name must match bone name/channel targets
|
||||
osg::Callback* cb = node.getUpdateCallback();
|
||||
while (cb)
|
||||
|
@ -687,7 +685,7 @@ namespace Resource
|
|||
{
|
||||
// Collada bones may have underscores in place of spaces due to a collada limitation
|
||||
// we should rename the bones and update callbacks here at load time
|
||||
Resource::RenameBonesVisitor renameBoneVisitor;
|
||||
Resource::RenameAnimCallbacksVisitor renameBoneVisitor;
|
||||
node->accept(renameBoneVisitor);
|
||||
|
||||
if (osg::Group* group = dynamic_cast<osg::Group*>(node))
|
||||
|
|
Loading…
Reference in a new issue