sugestions for animations names

Godot Version

4.3

Question

I was wondering if there is any good way to make godot editor sugest names of animations like its already doing with for example $AnimationPlayer.play() but for my custom function.

var allow_animations: bool = true
func play_anim(anim_name: String ,uninterruptible: bool = false):
	if not animation_player.is_playing(): allow_animations = true
	if not allow_animations: return
	
	animation_player.play(anim_name)
	if uninterruptible: allow_animations = false

I’m interested in whether there’s a better answer out there, but in lieu of that, you could use an enum for the anim_names instead of a string:

enum AnimationName {
RUN,
WALK,
IDLE,
etc
}

and then change the signature for play_anim to take anim_name: AnimationName.

Well , i guess it will work for most but im trying to create class with custom functions for playing animations and since some entitis will have diffrent animations static enums wouldnt be ideal