Try to resolve image paths by replacing backslashes or forward slashes in EmbedTexturesProcess (#5844)

* Try to resolve image paths by replacing backslashes.

* Some changes suggested by CI

* Removed usage of <filesystem>.

* Removing usage of C++20/C++23 features

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
David Campos Rodríguez
2024-11-14 21:10:03 +01:00
committed by GitHub
co-authored by Kim Kulling
parent 9723b3554b
commit e7a6d33365
2 changed files with 40 additions and 15 deletions
@@ -77,6 +77,8 @@ public:
virtual void Execute(aiScene* pScene) override;
private:
// Try several ways to attempt to resolve the image path
std::string tryToFindValidPath(const std::string &imagePath) const;
// Resolve the path and add the file content to the scene as a texture.
bool addTexture(aiScene *pScene, const std::string &path) const;