summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIng. Petr Jindra <el.mordo@gmail.com>2022-03-02 18:50:00 +0100
committerIng. Petr Jindra <el.mordo@gmail.com>2022-03-02 18:50:00 +0100
commitc4770e1605deba7a74bbe16ec8574883d0d5f185 (patch)
tree237754a8489bfbbae24eb2254fae24fc0718cf48
parente6f00a0f73a0332366741c2de31c0f5b9a1079dc (diff)
fix of reading property list from custom nodes imported from GDExtension when inheritance between custom nodes is used
-rw-r--r--core/object/object.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp
index a8a49bd22e..cddf117786 100644
--- a/core/object/object.cpp
+++ b/core/object/object.cpp
@@ -624,8 +624,12 @@ void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) cons
}
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);
+ const ObjectNativeExtension *current_extension = _extension;
+ while (current_extension) {
+ p_list->push_back(PropertyInfo(Variant::NIL, current_extension->class_name, PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_CATEGORY));
+ ClassDB::get_property_list(current_extension->class_name, p_list, true, this);
+ current_extension = current_extension->parent;
+ }
}
if (_extension && _extension->get_property_list) {