From f6139c2cfc52b5027cf0b426b32effada64fee62 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 24 Nov 2017 12:32:59 -0300 Subject: [PATCH] Attempt to remove setters/getters from doc data --- editor/doc/doc_data.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 1f9884aa701..3c89e5d321b 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -214,6 +214,9 @@ void DocData::generate(bool p_basic_types) { ClassDB::get_class_list(&classes); classes.sort_custom(); + Set setters_getters; + bool skip_setter_getter_methods = true; + while (classes.size()) { String name = classes.front()->get(); @@ -266,6 +269,13 @@ void DocData::generate(bool p_basic_types) { prop.type = Variant::get_type_name(retinfo.type); } } + + setters_getters.insert(getter); + } + + if (setter != StringName()) { + + setters_getters.insert(setter); } if (!found_type) { @@ -288,6 +298,9 @@ void DocData::generate(bool p_basic_types) { if (E->get().name == "" || (E->get().name[0] == '_' && !(E->get().flags & METHOD_FLAG_VIRTUAL))) continue; //hidden, don't count + if (skip_setter_getter_methods && setters_getters.has(E->get().name) && E->get().name.find("/") == -1) + continue; + MethodDoc method; method.name = E->get().name;