Closed Theo-Cheynel closed 2 years ago
Perhaps a simple type cast would suffice:
bpy.ops.nla.bake(
frame_start=int(min(keyframes)),
frame_end=int(max(keyframes)),
step=s.bake_step,
visual_keying=True,
use_current_action=True,
bake_types={'POSE'},
only_selected=False
)
Met the same issue at 3.1 - keyframe id is float and we need to cast it to int to make it work. Not sure if it's actually float like "1.1" or just "1.0" and if it's important.
I did not have time to dig into this, but it appears there was some code change from blender 3.0 to 3.1 that made this bake method stricter. I pushed a small fix to this repo: https://github.com/Mwni/blender-animation-retargeting/commit/042d6332de8a1d1fc10e36cc2fe5c654375cbe3c
You missed one!
When I try on the 3.1.0, I get the following error :
However, on 3.0.0 it works fine...