summaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 2d0d212af9..0e8cd955b5 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2289,6 +2289,16 @@ void EditorPropertyResource::_update_menu_items() {
E = E->next();
}
+ List<StringName> global_classes;
+ ScriptServer::get_global_class_list(&global_classes);
+ E = global_classes.front();
+ while (E) {
+ if (EditorNode::get_editor_data().script_class_is_parent(E->get(), base_type)) {
+ valid_inheritors.insert(E->get());
+ }
+ E = E->next();
+ }
+
for (Set<String>::Element *F = valid_inheritors.front(); F; F = F->next()) {
String t = F->get();
@@ -2305,7 +2315,7 @@ void EditorPropertyResource::_update_menu_items() {
}
}
- if (!is_custom_resource && !ClassDB::can_instance(t))
+ if (!is_custom_resource && !(ScriptServer::is_global_class(t) || ClassDB::can_instance(t)))
continue;
inheritors_array.push_back(t);
@@ -2542,6 +2552,7 @@ void EditorPropertyResource::update_property() {
sub_inspector->edit(res.ptr());
}
+ sub_inspector->refresh();
} else {
if (sub_inspector) {
set_bottom_editor(NULL);