Animation serialization progress

This commit is contained in:
Antoine Pilote
2023-09-06 20:05:10 -04:00
parent 10c92feaa3
commit 1628214370
10 changed files with 170 additions and 26 deletions

View File

@@ -78,7 +78,19 @@ namespace Nuake
{
j["Meshes"][i] = m_Meshes[i]->Serialize();
}
j["m_CurrentAnimation"] = m_CurrentAnimation;
j["m_NumAnimation"] = m_NumAnimation;
uint32_t a = 0;
for (auto& animation : m_Animations)
{
j["m_Animations"][a] = animation->Serialize();
}
}
END_SERIALIZE();
}
@@ -91,6 +103,10 @@ namespace Nuake
ModelLoader loader;
auto otherModel = loader.LoadSkinnedModel(j["Path"], false);
m_Meshes = otherModel->GetMeshes();
m_Animations = otherModel->GetAnimations();
m_SkeletonRoot = otherModel->GetSkeletonRootNode();
m_NumAnimation = m_Animations.size();
m_CurrentAnimation = 0;
this->Path = j["Path"];
}