summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorSaracenOne <SaracenOne@gmail.com>2022-04-29 07:06:48 +0100
committerSaracenOne <SaracenOne@gmail.com>2022-07-21 15:04:29 +0100
commitbd0819d4a056c1d9e643d943a5f3601c9f73d219 (patch)
tree5f8877ade2dc60b7271b414996d0c28c65822dc4 /editor
parent9b2ba9b8bb6b61487dbccec165d59f84e4e08fda (diff)
Disable plugin for conversion of foreign Sprite2D to different types
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 6a63875324..4528e34276 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -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!"));