mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
change rigs role from assets to content units
This commit is contained in:
parent
7dfda981a8
commit
49aa64a033
16 changed files with 67 additions and 70 deletions
|
|
@ -228,27 +228,6 @@ assetload::postfunc assetload::model(
|
|||
}
|
||||
}
|
||||
|
||||
assetload::postfunc assetload::rig(
|
||||
AssetsLoader* loader,
|
||||
const ResPaths* paths,
|
||||
const std::string& file,
|
||||
const std::string& name,
|
||||
const std::shared_ptr<AssetCfg>&
|
||||
) {
|
||||
auto path = paths->find(file+".json");
|
||||
auto text = files::read_string(path);
|
||||
try {
|
||||
auto rig = rigging::RigConfig::parse(text, path.u8string(), name).release();
|
||||
return [=](Assets* assets) {
|
||||
// TODO: add models loading
|
||||
assets->store(std::unique_ptr<rigging::RigConfig>(rig), name);
|
||||
};
|
||||
} catch (const parsing_error& err) {
|
||||
std::cerr << err.errorLog() << std::endl;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
static void read_anim_file(
|
||||
const std::string& animFile,
|
||||
std::vector<std::pair<std::string, int>>& frameList
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue