1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add back AnimationPlayer.get_argument_options

This commit is contained in:
HolonProduction
2024-11-15 13:06:59 +01:00
parent 98ddec4b8b
commit a389eb4608
9 changed files with 64 additions and 0 deletions

View File

@@ -876,6 +876,20 @@ Tween::EaseType AnimationPlayer::get_auto_capture_ease_type() const {
return auto_capture_ease_type;
}
#ifdef TOOLS_ENABLED
void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
const String pf = p_function;
if (p_idx == 0 && (pf == "play" || pf == "play_backwards" || pf == "has_animation" || pf == "queue")) {
List<StringName> al;
get_animation_list(&al);
for (const StringName &name : al) {
r_options->push_back(String(name).quote());
}
}
AnimationMixer::get_argument_options(p_function, p_idx, r_options);
}
#endif
void AnimationPlayer::_animation_removed(const StringName &p_name, const StringName &p_library) {
AnimationMixer::_animation_removed(p_name, p_library);