mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 03:29:55 +00:00
Use normalize path in Animation::addAnimSource to change extension
This commit is contained in:
parent
7e7cf51ade
commit
a6e075499b
1 changed files with 7 additions and 6 deletions
|
@ -28,16 +28,17 @@
|
||||||
#include <components/esm3/loadnpc.hpp>
|
#include <components/esm3/loadnpc.hpp>
|
||||||
#include <components/esm3/loadrace.hpp>
|
#include <components/esm3/loadrace.hpp>
|
||||||
#include <components/esm4/loadligh.hpp>
|
#include <components/esm4/loadligh.hpp>
|
||||||
|
|
||||||
#include <components/misc/constants.hpp>
|
#include <components/misc/constants.hpp>
|
||||||
#include <components/misc/pathhelpers.hpp>
|
#include <components/misc/pathhelpers.hpp>
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
#include <components/sceneutil/lightcommon.hpp>
|
|
||||||
|
|
||||||
#include <components/sceneutil/keyframe.hpp>
|
|
||||||
|
|
||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
|
#include <components/vfs/pathutil.hpp>
|
||||||
#include <components/vfs/recursivedirectoryiterator.hpp>
|
#include <components/vfs/recursivedirectoryiterator.hpp>
|
||||||
|
|
||||||
|
#include <components/sceneutil/keyframe.hpp>
|
||||||
|
#include <components/sceneutil/lightcommon.hpp>
|
||||||
#include <components/sceneutil/lightmanager.hpp>
|
#include <components/sceneutil/lightmanager.hpp>
|
||||||
#include <components/sceneutil/lightutil.hpp>
|
#include <components/sceneutil/lightutil.hpp>
|
||||||
#include <components/sceneutil/positionattitudetransform.hpp>
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
||||||
|
@ -677,10 +678,10 @@ namespace MWRender
|
||||||
|
|
||||||
void Animation::addAnimSource(std::string_view model, const std::string& baseModel)
|
void Animation::addAnimSource(std::string_view model, const std::string& baseModel)
|
||||||
{
|
{
|
||||||
std::string kfname = Misc::StringUtils::lowerCase(model);
|
VFS::Path::Normalized kfname(model);
|
||||||
|
|
||||||
if (kfname.ends_with(".nif"))
|
if (Misc::getFileExtension(kfname) == "nif")
|
||||||
kfname.replace(kfname.size() - 4, 4, ".kf");
|
kfname.changeExtension("kf");
|
||||||
|
|
||||||
addSingleAnimSource(kfname, baseModel);
|
addSingleAnimSource(kfname, baseModel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue