diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-19 14:39:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 14:39:23 +0200 |
commit | 2ca3e47d66fe3f3d849e2084d516949c84011f4b (patch) | |
tree | 626cc7cece53e4664eb63290d6fd043b48dd2640 /core | |
parent | b79303d39a0ec9eea5fb4c267a8db313b52b57a2 (diff) | |
parent | e425f2d4984f6122ff4a8b20d69b79f89538687b (diff) |
Merge pull request #22642 from YeldhamDev/inspector_metadata
Expose "meta" to the Inspector
Diffstat (limited to 'core')
-rw-r--r-- | core/object.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/object.cpp b/core/object.cpp index 3367d6b6c3..67ab27c190 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -635,9 +635,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); |