fbx export from UE4 bug and Blender Animation Import 25 fps work around
I possibly found a bug in unreal engine 4 fbx animation export, namely that it exports it's animation with 1 frame extra and then scales the animation to that range. For example, when exporting "ThirdPersonWalk" animation sequence from 3rdPerson Template it should export frames 0 to 29 but it exports frames 0 to 30.
To work around this bug, for importing ue4 animation fbx exports into blender correctly you have to do the following things:
1) change file "import_fbx.py" in folder "\scripts\addons\io_scene_fbx" line 2337 from
2) Set blender's frame rate to 30 fps in Properties Editor in the Render Tab.
3) import exported fbx animation
4) Scale the animation to one frame less, for example if animation is from frame 0 to 30 scale the animation so it becomes frame 0 to 29. you can do this manually in Dope Sheet Editor by setting current frame to 0 in Dope Sheet Editor and than press shortcut "S" to scale and type "0.9666" ((last frame - 1)/ last frame in this case 29/30 which is 0.9666). This will be a hassle if you have to do it for a lot of imported animations or someone could make a python script to do this automatically.
Edit: here's a simple python script to automatically scale the time correctly of an armature. Select the armature, copy-paste this script in the Text Editor and run it
Hopefully the bug will be fixed soon and you just have to set fps to 30.
This bug of ue4 exporting one extra frame and scaling the whole animation to the new range probably also is in 3ds max and maya.
Follow this question
Once you sign in you will be able to subscribe for any updates here