Skip to content

Commit

Permalink
Fixed animation export with non-zero starting frame
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycrow101 committed Aug 4, 2024
1 parent 5bc6c19 commit d22a2cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion io_scene_rw_anm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 2 additions & 0 deletions io_scene_rw_anm/export_rw_anm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d22a2cd

Please sign in to comment.