summaryrefslogtreecommitdiffstats
path: root/scene/3d/sprite_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/sprite_3d.cpp')
-rw-r--r--scene/3d/sprite_3d.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index b8b0d31d45..8e76e75d0e 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -1439,14 +1439,16 @@ PackedStringArray AnimatedSprite3D::get_configuration_warnings() const {
}
void AnimatedSprite3D::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);
+ SpriteBase3D::get_argument_options(p_function, p_idx, r_options);
}
#ifndef DISABLE_DEPRECATED