Skip to content

Commit

Permalink
Merge pull request #63253 from V-Sekai/disable_sprite_conversion_on_f…
Browse files Browse the repository at this point in the history
…oreign_nodes
  • Loading branch information
akien-mga authored Aug 8, 2022
2 parents db523dd + bd0819d commit 660828e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/sprite_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ void Sprite2DEditor::_menu_option(int p_option) {
}

void Sprite2DEditor::_update_mesh_data() {
if (node->get_owner() != get_tree()->get_edited_scene_root()) {
err_dialog->set_text(TTR("Can't convert a Sprite2D from a foreign scene."));
err_dialog->popup_centered();
}

Ref<Texture2D> texture = node->get_texture();
if (texture.is_null()) {
err_dialog->set_text(TTR("Sprite2D is empty!"));
Expand Down

0 comments on commit 660828e

Please sign in to comment.