mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fix skeletons behaviour in preload.json
This commit is contained in:
parent
ea64560b5d
commit
acff945492
2 changed files with 3 additions and 2 deletions
|
|
@ -287,7 +287,7 @@ void AssetsLoader::addDefaults(AssetsLoader& loader, const Content* content) {
|
|||
for (const auto& file : io::directory_iterator(skeletonsDir)) {
|
||||
loader.add(
|
||||
AssetType::SKELETON,
|
||||
file.string(),
|
||||
(file.parent() / file.stem()).string(),
|
||||
entry.first + ":" + file.stem()
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -455,7 +455,8 @@ assetload::postfunc assetload::skeleton(
|
|||
const std::shared_ptr<AssetCfg>& settings
|
||||
) {
|
||||
return [=](auto assets) {
|
||||
std::string text = io::read_string(file);
|
||||
auto path = paths.find(file + ".json");
|
||||
std::string text = io::read_string(path);
|
||||
auto skeleton = rigging::SkeletonConfig::parse(text, file, name);
|
||||
for (auto& bone : skeleton->getBones()) {
|
||||
std::string model = bone->model.name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue