From d22a2cd6b54c5289248e399bd0e0857ab20b3c33 Mon Sep 17 00:00:00 2001 From: Psycrow Date: Sun, 4 Aug 2024 12:23:47 +0300 Subject: [PATCH] Fixed animation export with non-zero starting frame --- io_scene_rw_anm/__init__.py | 2 +- io_scene_rw_anm/export_rw_anm.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/io_scene_rw_anm/__init__.py b/io_scene_rw_anm/__init__.py index 7e680d1..dbca6e8 100644 --- a/io_scene_rw_anm/__init__.py +++ b/io_scene_rw_anm/__init__.py @@ -14,7 +14,7 @@ bl_info = { "name": "RenderWare Animation", "author": "Psycrow", - "version": (0, 2, 0), + "version": (0, 2, 1), "blender": (2, 81, 0), "location": "File > Import-Export", "description": "Import / Export RenderWare Animation (.anm)", diff --git a/io_scene_rw_anm/export_rw_anm.py b/io_scene_rw_anm/export_rw_anm.py index adb44d8..a4e6959 100644 --- a/io_scene_rw_anm/export_rw_anm.py +++ b/io_scene_rw_anm/export_rw_anm.py @@ -107,9 +107,11 @@ def create_anm_action(context, arm_obj, act, fps): keyframes = [] sorted_pose_transforms = sort_pose_transforms(get_pose_transforms(context, arm_obj, act)) duration = 0.0 + frame_start = context.scene.frame_start for bone_id, time, pose_transform in sorted_pose_transforms: bone = arm_obj.data.bones[bone_id] + time = time - frame_start loc_mat = bone.matrix_local.copy() if bone.parent: