mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41: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)) {
|
for (const auto& file : io::directory_iterator(skeletonsDir)) {
|
||||||
loader.add(
|
loader.add(
|
||||||
AssetType::SKELETON,
|
AssetType::SKELETON,
|
||||||
file.string(),
|
(file.parent() / file.stem()).string(),
|
||||||
entry.first + ":" + file.stem()
|
entry.first + ":" + file.stem()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -455,7 +455,8 @@ assetload::postfunc assetload::skeleton(
|
||||||
const std::shared_ptr<AssetCfg>& settings
|
const std::shared_ptr<AssetCfg>& settings
|
||||||
) {
|
) {
|
||||||
return [=](auto assets) {
|
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);
|
auto skeleton = rigging::SkeletonConfig::parse(text, file, name);
|
||||||
for (auto& bone : skeleton->getBones()) {
|
for (auto& bone : skeleton->getBones()) {
|
||||||
std::string model = bone->model.name;
|
std::string model = bone->model.name;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue