summaryrefslogtreecommitdiffstats
path: root/core/object.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-07-18 19:37:17 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-07-18 19:37:41 -0300
commit43dc050947753d201607d26717ca6fc3fe412c34 (patch)
treea7f0d3092f4f6569123b3c6cbc31ca94ef52ce30 /core/object.cpp
parenta731bd58643da57f3c3846102c9173651ef7478b (diff)
downloadredot-engine-43dc050947753d201607d26717ca6fc3fe412c34.tar.gz
Several improvements to editor inspector usability and style
Diffstat (limited to 'core/object.cpp')
-rw-r--r--core/object.cpp6
1 files changed, 5 insertions, 1 deletions
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<PropertyInfo> *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));