summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-05 19:57:14 +0200
committerGitHub <noreply@github.com>2022-05-05 19:57:14 +0200
commitefd6e4da0c506d0f6755f242484aba1bdc762b6e (patch)
tree143559607d9e6e702ced38de645256671695e70f /editor
parentc7419f108f7db397017aac32d6ccd0014647d4b7 (diff)
parente7da3ce96e5dec5231c6c19fcac984c4a0303dde (diff)
Merge pull request #60795 from KoBeWi/can't_export_this
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties_array_dict.cpp10
-rw-r--r--editor/project_settings_editor.cpp10
2 files changed, 15 insertions, 5 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 85f5ed848c..25016c7f82 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -478,6 +478,11 @@ void EditorPropertyArray::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
change_type->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
+ if (i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) {
+ // These types can't be constructed or serialized properly, so skip them.
+ continue;
+ }
+
String type = Variant::get_type_name(Variant::Type(i));
change_type->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
}
@@ -1127,6 +1132,11 @@ void EditorPropertyDictionary::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
change_type->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
+ if (i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) {
+ // These types can't be constructed or serialized properly, so skip them.
+ continue;
+ }
+
String type = Variant::get_type_name(Variant::Type(i));
change_type->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
}
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index fa83a58cff..f684c0e0c9 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -515,12 +515,12 @@ void ProjectSettingsEditor::_update_theme() {
type_box->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
- // There's no point in adding Nil types, and Object types
- // can't be serialized correctly in the project settings.
- if (i != Variant::NIL && i != Variant::OBJECT) {
- String type = Variant::get_type_name(Variant::Type(i));
- type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
+ if (i == Variant::NIL || i == Variant::OBJECT || i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) {
+ // These types can't be serialized properly, so skip them.
+ continue;
}
+ String type = Variant::get_type_name(Variant::Type(i));
+ type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
}
}