mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fix skeleton name serialization
This commit is contained in:
parent
01ddb0bfba
commit
d07c8e5234
2 changed files with 2 additions and 2 deletions
|
|
@ -151,7 +151,7 @@ void Entities::loadEntity(const dv::value& map, Entity entity) {
|
|||
return;
|
||||
}
|
||||
std::string skeletonName = skeleton->config->getName();
|
||||
map.at("skeleton").get(skeletonName);
|
||||
map.at("skeleton-name").get(skeletonName);
|
||||
if (skeletonName != skeleton->config->getName()) {
|
||||
skeleton->config = assets->get<rigging::SkeletonConfig>(skeletonName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ dv::value Entity::serialize() const {
|
|||
|
||||
if (skeleton != nullptr) {
|
||||
if (skeleton->config->getName() != def.skeletonName) {
|
||||
root["skeleton"] = skeleton->config->getName();
|
||||
root["skeleton-name"] = skeleton->config->getName();
|
||||
}
|
||||
if (def.save.skeleton.pose || def.save.skeleton.textures) {
|
||||
root[COMP_SKELETON] = skeleton->serialize(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue