summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-10-02 05:18:37 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-12-08 02:27:20 -0200
commite425f2d4984f6122ff4a8b20d69b79f89538687b (patch)
tree9d5d9de6ed4c7cf3eae14fdf386f88e523260727 /core
parent41d1dba35fc851258d5aabad819d09f6a43e324c (diff)
Expose "meta" to the Inspector
Diffstat (limited to 'core')
-rw-r--r--core/object.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/object.cpp b/core/object.cpp
index 3a14c7c0b5..4a3c568bd9 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -638,9 +638,12 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons
#endif
p_list->push_back(PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script", PROPERTY_USAGE_DEFAULT));
}
- if (!metadata.empty()) {
- p_list->push_back(PropertyInfo(Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL));
- }
+
+#ifdef TOOLS_ENABLED
+ p_list->push_back(PropertyInfo(Variant::NIL, "Metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_GROUP));
+#endif
+ p_list->push_back(PropertyInfo(Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT));
+
if (script_instance && !p_reversed) {
p_list->push_back(PropertyInfo(Variant::NIL, "Script Variables", PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
script_instance->get_property_list(p_list);