Skip to content

Commit

Permalink
It's as shrimple as that
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Jan 17, 2024
1 parent 37aacff commit dc80817
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fast64_internal/sm64/sm64_anim.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,10 @@ def convertAnimationData(anim, armatureObj, *, frame_start, frame_count):
currentFrame = bpy.context.scene.frame_current
for frame in range(frame_start, frame_start + frame_count):
bpy.context.scene.frame_set(frame)
rootBone = armatureObj.data.bones[animBones[0]]
rootPoseBone = armatureObj.pose.bones[animBones[0]]

# Hacky solution to handle Z-up to Y-up conversion
translation = (
rootBone.matrix.to_4x4().inverted()
@ mathutils.Matrix.Scale(bpy.context.scene.blenderToSM64Scale, 4)
@ rootPoseBone.matrix
mathutils.Matrix.Scale(bpy.context.scene.blenderToSM64Scale, 4) @ rootPoseBone.matrix_basis
).decompose()[0]
saveTranslationFrame(translationData, translation)

Expand Down

0 comments on commit dc80817

Please sign in to comment.