From 43dc050947753d201607d26717ca6fc3fe412c34 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 18 Jul 2018 19:37:17 -0300 Subject: Several improvements to editor inspector usability and style --- core/object.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/object.cpp') diff --git a/core/object.cpp b/core/object.cpp index 1d2aeb7ba5..d86c60a3b8 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -601,8 +601,12 @@ void Object::get_property_list(List *p_list, bool p_reversed) cons _get_property_listv(p_list, p_reversed); - if (!is_class("Script")) // can still be set, but this is for userfriendlyness + if (!is_class("Script")) { // can still be set, but this is for userfriendlyness +#ifdef TOOLS_ENABLED + p_list->push_back(PropertyInfo(Variant::NIL, "Script", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP)); +#endif p_list->push_back(PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_STORE_IF_NONZERO)); + } #ifdef TOOLS_ENABLED if (editor_section_folding.size()) { p_list->push_back(PropertyInfo(Variant::ARRAY, CoreStringNames::get_singleton()->_sections_unfolded, PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); -- cgit v1.2.3