diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-11-14 22:02:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 22:02:31 +0100 |
commit | 315e94ee2a3c8a5f3e68bba2a8ee82c1b4b31901 (patch) | |
tree | 8f9c0b8b1940d95beee00d31cd8e6a0688c6f04b | |
parent | ed300d7be536b1ec325ba77521eceee73dd0e5fb (diff) | |
parent | a9aba86943daef698c9197bc5f827418920b409c (diff) |
Merge pull request #53710 from CaptainProton42/fix-extension-class-inspector-properties
-rw-r--r-- | core/object/object.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp index 498f116997..8e96695f0d 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -628,7 +628,10 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons script_instance->get_property_list(p_list); } - _get_property_listv(p_list, p_reversed); + if (_extension) { + p_list->push_back(PropertyInfo(Variant::NIL, _extension->class_name, PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY)); + ClassDB::get_property_list(_extension->class_name, p_list, true, this); + } if (_extension && _extension->get_property_list) { uint32_t pcount; @@ -641,6 +644,8 @@ 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 user-friendliness p_list->push_back(PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script", PROPERTY_USAGE_DEFAULT)); } |