mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-03 23:41:34 +00:00
Dont use NormalizedView for yamlpath, use changeExtension, add setting to tests script
This commit is contained in:
parent
a7a105dfdd
commit
b9a7bdc0c7
2 changed files with 5 additions and 6 deletions
|
@ -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…
Reference in a new issue