summaryrefslogtreecommitdiffstats
path: root/editor/plugins/sprite_frames_editor_plugin.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-10-01 16:02:46 -0500
committerAaron Franke <arnfranke@yahoo.com>2024-04-13 02:56:50 -0700
commit6dd4a687972fbb53e53aba008cc4fbea2c87d6af (patch)
tree8a4f313b1e31bf7a1c1fcf2f83f62082c67da24a /editor/plugins/sprite_frames_editor_plugin.cpp
parent2886511c181402f77d28e286efd25124354eb258 (diff)
downloadredot-engine-6dd4a687972fbb53e53aba008cc4fbea2c87d6af.tar.gz
Reorganize some code to have 2D things grouped together
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) {