summaryrefslogtreecommitdiffstats
path: root/editor/plugins/sprite_frames_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/sprite_frames_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index fc361ab264..e4e66b38e9 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -2317,15 +2317,15 @@ void SpriteFramesEditorPlugin::edit(Object *p_object) {
}
bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
- AnimatedSprite2D *animated_sprite = Object::cast_to<AnimatedSprite2D>(p_object);
- AnimatedSprite3D *animated_sprite_3d = Object::cast_to<AnimatedSprite3D>(p_object);
- if (animated_sprite && *animated_sprite->get_sprite_frames()) {
+ AnimatedSprite2D *animated_sprite_2d = Object::cast_to<AnimatedSprite2D>(p_object);
+ if (animated_sprite_2d && *animated_sprite_2d->get_sprite_frames()) {
return true;
- } else if (animated_sprite_3d && *animated_sprite_3d->get_sprite_frames()) {
+ }
+ AnimatedSprite3D *animated_sprite_3d = Object::cast_to<AnimatedSprite3D>(p_object);
+ if (animated_sprite_3d && *animated_sprite_3d->get_sprite_frames()) {
return true;
- } else {
- return p_object->is_class("SpriteFrames");
}
+ return p_object->is_class("SpriteFrames");
}
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {