Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #52 from dest1yo/blender_28
Browse files Browse the repository at this point in the history
Fixed incorrect bone position offset when anim type is relative
  • Loading branch information
dtzxporter authored Sep 24, 2023
2 parents 6964732 + 19be15f commit c946a8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
bl_info = {
"name": "SEAnim Support",
"author": "SE2Dev",
"version": (0, 4, 1),
"version": (0, 4, 3),
"blender": (2, 80, 0),
"location": "File > Import",
"description": "Import SEAnim",
Expand Down
6 changes: 5 additions & 1 deletion import_seanim.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ def load_seanim(self, context, progress, filepath=""):
if (animType == SEAnim.SEANIM_TYPE.SEANIM_TYPE_ABSOLUTE and
bone.parent is not None):
bone.matrix.translation = bone.parent.matrix @ offset
else: # Use DELTA / RELATIVE results (ADDITIVE is unknown)
# SEANIM_TYPE_RELATIVE
elif animType == SEAnim.SEANIM_TYPE.SEANIM_TYPE_RELATIVE:
bone.matrix_basis.translation = bone.bone.matrix.inverted() @ offset
# Use DELTA / RELATIVE results (ADDITIVE is unknown)
else:
bone.matrix_basis.translation = offset

# bone.keyframe_insert("location", index=-1, frame=key.frame, group=tag.name) # nopep8
Expand Down

0 comments on commit c946a8c

Please sign in to comment.