mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Reorganize some code to have 2D things grouped together
This commit is contained in:
parent
2886511c18
commit
6dd4a68797
6 changed files with 94 additions and 91 deletions
|
@ -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()) {
|
||||
return true;
|
||||
} else {
|
||||
return p_object->is_class("SpriteFrames");
|
||||
}
|
||||
AnimatedSprite3D *animated_sprite_3d = Object::cast_to<AnimatedSprite3D>(p_object);
|
||||
if (animated_sprite_3d && *animated_sprite_3d->get_sprite_frames()) {
|
||||
return true;
|
||||
}
|
||||
return p_object->is_class("SpriteFrames");
|
||||
}
|
||||
|
||||
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue