Dont use NormalizedView for yamlpath, use changeExtension, add setting to tests script

pull/3236/head
Sam Hellawell 5 months ago
parent a7a105dfdd
commit b9a7bdc0c7

@ -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<const SceneUtil::AnimBlendRules> 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
{

@ -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

Loading…
Cancel
Save