From 1fd54078958e5ef2ce8a8915b027ae8dd878c732 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Wed, 9 Aug 2023 16:43:04 -0700 Subject: [PATCH] Don't overwrite animation on export causing big diff --- art/Exporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/art/Exporter.py b/art/Exporter.py index fc985ad..5a9735a 100644 --- a/art/Exporter.py +++ b/art/Exporter.py @@ -189,6 +189,7 @@ for o in D.objects: for animation in anims: write_string(f, animation.name) + old_action = armature.animation_data.action armature.animation_data.action = animation startFrame = int(animation.frame_range.x) endFrame = int(animation.frame_range.y) @@ -228,7 +229,8 @@ for o in D.objects: write_v3(f, translation) write_quat(f, rotation) write_v3(f, scale) - + + armature.animation_data.action = old_action # write the mesh data for the armature bm = bmesh.new() mesh = mesh_object.to_mesh()