Need to save anm2 first before doing anything, should eliminate a few problems

This commit is contained in:
2025-08-28 10:27:47 -04:00
parent de034b9b29
commit 8f3c666922
4 changed files with 24 additions and 18 deletions

View File

@@ -123,7 +123,9 @@ bool anm2_serialize(Anm2* self, const std::string& path)
// Animations
animationsElement = document.NewElement(ANM2_ELEMENT_STRINGS[ANM2_ELEMENT_ANIMATIONS]);
animationsElement->SetAttribute(ANM2_ATTRIBUTE_STRINGS[ANM2_ATTRIBUTE_DEFAULT_ANIMATION], self->animations[self->defaultAnimationID].name.c_str()); // DefaultAnimation
if (self->defaultAnimationID != ID_NONE)
animationsElement->SetAttribute(ANM2_ATTRIBUTE_STRINGS[ANM2_ATTRIBUTE_DEFAULT_ANIMATION], self->animations[self->defaultAnimationID].name.c_str()); // DefaultAnimation
for (auto& [id, animation] : self->animations)
{