summaryrefslogtreecommitdiffstats
path: root/scene/2d/animated_sprite_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/animated_sprite_2d.cpp')
-rw-r--r--scene/2d/animated_sprite_2d.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 08b315fa6c..b3a20edea8 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -577,14 +577,16 @@ PackedStringArray AnimatedSprite2D::get_configuration_warnings() const {
}
void AnimatedSprite2D::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
- if (p_idx == 0 && p_function == "play" && frames.is_valid()) {
- List<StringName> al;
- frames->get_animation_list(&al);
- for (const StringName &name : al) {
- r_options->push_back(String(name).quote());
+ if (p_idx == 0 && frames.is_valid()) {
+ if (p_function == "play" || p_function == "play_backwards" || p_function == "set_animation" || p_function == "set_autoplay") {
+ List<StringName> al;
+ frames->get_animation_list(&al);
+ for (const StringName &name : al) {
+ r_options->push_back(String(name).quote());
+ }
}
}
- Node::get_argument_options(p_function, p_idx, r_options);
+ Node2D::get_argument_options(p_function, p_idx, r_options);
}
#ifndef DISABLE_DEPRECATED