I downloaded the Unarmed Equip Torch 01 animation (skeleton only) from Mixamo and wanted to mirror it so the torch was in the right hand (and then I noticed you can mirror it right in the web, but let's ignore that).
I imported the FBX in Blender 2.92 (same behavior in 2.91), everything was fine. After applying a -1 X scale (I set the xyz scale to 1 from 0.01 first, no problem there), the animation broke. In this question the accepted answer says I should scale the pose data's f-curves instead and points to this other question for a Python script to do so.
I tried this version:
import bpy
scale = -1
i = 0
try:
for fcu in bpy.context.object.animation_data.action.fcurves:
if fcu.data_path.endswith("location") or fcu.data_path.endswith("scale"):
# 3 means X coordinates.
if i % 3 == 0:
for kp in fcu.keyframe_points:
kp.co.y *= scale
kp.handle_left.y *= scale
kp.handle_right.y *= scale
i += 1
except TypeError:
pass
But it doesn't work. I'm pretty new to Blender, so I'm not sure what's going on. I tried running the script both before and after applying the scale, what am I missing?
Thanks!