From b9a7bdc0c7ab9e9454ba496e5ff7a0aacdd5c638 Mon Sep 17 00:00:00 2001 From: Sam Hellawell Date: Sat, 20 Jul 2024 20:15:17 +0100 Subject: [PATCH] Dont use NormalizedView for yamlpath, use changeExtension, add setting to tests script --- apps/openmw/mwrender/animation.cpp | 10 ++++------ scripts/integration_tests.py | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 0a4a1cace5..32d775a9bd 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -762,13 +762,11 @@ namespace MWRender { // Note, even if the actual config is .json - we should send a .yaml path to AnimBlendRulesManager, the // manager will check for .json if it will not find a specified .yaml file. - auto yamlpath = kfname; - Misc::StringUtils::replaceLast(yamlpath, ".kf", ".yaml"); - Misc::StringUtils::replaceLast(yamlpath, ".dae", ".yaml"); + VFS::Path::Normalized blendConfigPath(kfname); + blendConfigPath.changeExtension("yaml"); // globalBlendConfigPath is only used with actors! Objects have no default blending. constexpr VFS::Path::NormalizedView globalBlendConfigPath("animations/animation-config.yaml"); - const VFS::Path::NormalizedView blendConfigPath(yamlpath); osg::ref_ptr blendRules; if (mPtr.getClass().isActor()) @@ -776,8 +774,8 @@ namespace MWRender blendRules = mResourceSystem->getAnimBlendRulesManager()->getRules(globalBlendConfigPath, blendConfigPath); if (blendRules == nullptr) - Log(Debug::Warning) << "Unable to find animation blending rules: '" << yamlpath << "' or '" - << globalBlendConfigPath.value() << "'"; + Log(Debug::Warning) << "Unable to find animation blending rules: '" << blendConfigPath << "' or '" + << globalBlendConfigPath << "'"; } else { diff --git a/scripts/integration_tests.py b/scripts/integration_tests.py index 41c6c3a5a2..17c86c508b 100755 --- a/scripts/integration_tests.py +++ b/scripts/integration_tests.py @@ -62,6 +62,7 @@ def runTest(name): "resolution x = 640\n" "resolution y = 480\n" "framerate limit = 60\n" + "smooth animation transitions = true\n" ) stdout_lines = list() exit_ok = True