From 56a40577edc27fc7ad8b1d8ec24ada50c3afa063 Mon Sep 17 00:00:00 2001 From: Sam Hellawell Date: Sun, 14 Jul 2024 02:38:57 +0100 Subject: [PATCH] Revert move of default anim rename --- components/resource/keyframemanager.cpp | 6 ++++++ components/resource/scenemanager.cpp | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/resource/keyframemanager.cpp b/components/resource/keyframemanager.cpp index 41c12837e9..c4d3da2938 100644 --- a/components/resource/keyframemanager.cpp +++ b/components/resource/keyframemanager.cpp @@ -86,6 +86,12 @@ namespace Resource { if (animation) { + //"Default" is osg dae plugin's default naming scheme for unnamed animations + if (animation->getName() == "Default") + { + animation->setName(std::string("idle")); + } + osg::ref_ptr mergedAnimationTrack = new Resource::Animation; const std::string animationName = animation->getName(); mergedAnimationTrack->setName(animationName); diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index 1aeb6078a2..66012e05d4 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -437,10 +437,6 @@ namespace Resource { if (animation) { - // "Default" is osg dae plugin's default naming scheme for unnamed animations - if (animation->getName() == "Default") - animation->setName(std::string("idle")); - auto& channels = animation->getChannels(); for (auto& channel : channels) {