How to show the time in frames instead of seconds in AnimationPlayer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joel Gomes da Silva
:warning: Old Version Published before Godot 3 was released.

The question is self explanatory.
I’ve searched in the AnimationPlayer’s inspector and panel, the editor settings, the project settings and I didn’t find nothing to change this option. This is quite needed for me, since I make the animations in Blender using the frames as reference.
Using the last release (2.1 stable).
Thanks. :wink:

:bust_in_silhouette: Reply From: Matt_UV

You can cheat a bit to get what you want :wink:

You just have to convert frames into seconds : time = frame/FPS
However, the frame duration are not fixed by default. You have to set the “Process Mode” of the animation to “Fixed” (from the inspector or via set_animation_process_mode(ANIMATION_PROCESS_FIXED) )

It means that the animation will play at the same FPS than the Physics of the game. You can find this value in the project settings/Physics/fixed_fps or Globals.get("physics/fixed_fps")