feat: add model / texture cooking
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#include <destrum/Util/ModelDoc.h>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
class ModelCooker
|
||||
{
|
||||
public:
|
||||
struct Options
|
||||
{
|
||||
fs::path inputRoot;
|
||||
};
|
||||
|
||||
explicit ModelCooker(Options opt);
|
||||
|
||||
bool CookFileIfNeeded(const fs::path& source, const fs::path& output) const;
|
||||
|
||||
static fs::path MakeOutputPath(const fs::path& dstLikeSrc);
|
||||
|
||||
private:
|
||||
Options m_opt;
|
||||
|
||||
static bool NeedsRebuild(const fs::path& source, const fs::path& output);
|
||||
void MakePathsPortable(ModelDoc::ModelAsset& model, const fs::path& source) const;
|
||||
};
|
||||
Reference in New Issue
Block a user