diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp index 7683a9702..55b6e287a 100644 --- a/scene/2d/animated_sprite.cpp +++ b/scene/2d/animated_sprite.cpp @@ -366,6 +366,11 @@ void AnimatedSprite::_validate_property(PropertyInfo &property) const { } if (property.name == "frame") { + if (playing) { + property.usage = PROPERTY_USAGE_EDITOR; + return; + } + property.hint = PROPERTY_HINT_RANGE; if (frames->has_animation(animation) && frames->get_frame_count(animation) > 1) { property.hint_string = "0," + itos(frames->get_frame_count(animation) - 1) + ",1"; @@ -609,6 +614,7 @@ void AnimatedSprite::set_playing(bool p_playing) { playing = p_playing; _reset_timeout(); set_process_internal(playing); + property_list_changed_notify(); } bool AnimatedSprite::is_playing() const { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index ec99ec40d..80e8eee76 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -900,6 +900,11 @@ void AnimatedSprite3D::_validate_property(PropertyInfo &property) const { } if (property.name == "frame") { + if (playing) { + property.usage = PROPERTY_USAGE_EDITOR; + return; + } + property.hint = PROPERTY_HINT_RANGE; if (frames->has_animation(animation) && frames->get_frame_count(animation) > 1) { property.hint_string = "0," + itos(frames->get_frame_count(animation) - 1) + ",1"; @@ -1052,6 +1057,7 @@ void AnimatedSprite3D::_set_playing(bool p_playing) { playing = p_playing; _reset_timeout(); set_process_internal(playing); + property_list_changed_notify(); } bool AnimatedSprite3D::_is_playing() const {