feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -35,12 +35,11 @@
|
|||
#include "core/core_constants.h"
|
||||
#include "core/io/compression.h"
|
||||
#include "core/io/dir_access.h"
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/io/resource_importer.h"
|
||||
#include "core/object/script_language.h"
|
||||
#include "core/string/translation.h"
|
||||
#include "core/string/translation_server.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/export/editor_export.h"
|
||||
#include "editor/export/editor_export_platform.h"
|
||||
#include "scene/resources/theme.h"
|
||||
#include "scene/theme/theme_db.h"
|
||||
|
||||
|
|
@ -76,7 +75,7 @@ static String _translate_doc_string(const String &p_text) {
|
|||
return translated.indent(indent);
|
||||
}
|
||||
|
||||
// Comparator for constructors, based on `MetodDoc` operator.
|
||||
// Comparator for constructors, based on `MethodDoc` operator.
|
||||
struct ConstructorCompare {
|
||||
_FORCE_INLINE_ bool operator()(const DocData::MethodDoc &p_lhs, const DocData::MethodDoc &p_rhs) const {
|
||||
// Must be a constructor (i.e. assume named for the class)
|
||||
|
|
@ -277,6 +276,10 @@ static void merge_theme_properties(Vector<DocData::ThemeItemDoc> &p_to, const Ve
|
|||
// Check found entry on name and data type.
|
||||
if (to.name == from.name && to.data_type == from.data_type) {
|
||||
to.description = from.description;
|
||||
to.is_deprecated = from.is_deprecated;
|
||||
to.deprecated_message = from.deprecated_message;
|
||||
to.is_experimental = from.is_experimental;
|
||||
to.experimental_message = from.experimental_message;
|
||||
to.keywords = from.keywords;
|
||||
}
|
||||
}
|
||||
|
|
@ -571,6 +574,8 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
prop.type = retinfo.class_name;
|
||||
} else if (retinfo.type == Variant::ARRAY && retinfo.hint == PROPERTY_HINT_ARRAY_TYPE) {
|
||||
prop.type = retinfo.hint_string + "[]";
|
||||
} else if (retinfo.type == Variant::DICTIONARY && retinfo.hint == PROPERTY_HINT_DICTIONARY_TYPE) {
|
||||
prop.type = "Dictionary[" + retinfo.hint_string.replace(";", ", ") + "]";
|
||||
} else if (retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
|
||||
prop.type = retinfo.hint_string;
|
||||
} else if (retinfo.type == Variant::NIL && retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
|
||||
|
|
@ -668,6 +673,7 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
constant.name = E;
|
||||
constant.value = itos(ClassDB::get_integer_constant(name, E));
|
||||
constant.is_value_valid = true;
|
||||
constant.type = "int";
|
||||
constant.enumeration = ClassDB::get_integer_constant_enum(name, E);
|
||||
constant.is_bitfield = ClassDB::is_enum_bitfield(name, constant.enumeration);
|
||||
c.constants.push_back(constant);
|
||||
|
|
@ -902,6 +908,24 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
|
||||
c.properties.sort();
|
||||
|
||||
List<StringName> enums;
|
||||
Variant::get_enums_for_type(Variant::Type(i), &enums);
|
||||
|
||||
for (const StringName &E : enums) {
|
||||
List<StringName> enumerations;
|
||||
Variant::get_enumerations_for_enum(Variant::Type(i), E, &enumerations);
|
||||
|
||||
for (const StringName &F : enumerations) {
|
||||
DocData::ConstantDoc constant;
|
||||
constant.name = F;
|
||||
constant.value = itos(Variant::get_enum_value(Variant::Type(i), E, F));
|
||||
constant.is_value_valid = true;
|
||||
constant.type = "int";
|
||||
constant.enumeration = E;
|
||||
c.constants.push_back(constant);
|
||||
}
|
||||
}
|
||||
|
||||
List<StringName> constants;
|
||||
Variant::get_constants_for_type(Variant::Type(i), &constants);
|
||||
|
||||
|
|
@ -911,6 +935,7 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
Variant value = Variant::get_constant_value(Variant::Type(i), E);
|
||||
constant.value = value.get_type() == Variant::INT ? itos(value) : value.get_construct_string().replace("\n", " ");
|
||||
constant.is_value_valid = true;
|
||||
constant.type = Variant::get_type_name(value.get_type());
|
||||
c.constants.push_back(constant);
|
||||
}
|
||||
}
|
||||
|
|
@ -928,6 +953,8 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) {
|
||||
DocData::ConstantDoc cd;
|
||||
cd.name = CoreConstants::get_global_constant_name(i);
|
||||
cd.type = "int";
|
||||
cd.enumeration = CoreConstants::get_global_constant_enum(i);
|
||||
cd.is_bitfield = CoreConstants::is_global_constant_bitfield(i);
|
||||
if (!CoreConstants::get_ignore_value_in_docs(i)) {
|
||||
cd.value = itos(CoreConstants::get_global_constant_value(i));
|
||||
|
|
@ -935,7 +962,6 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
} else {
|
||||
cd.is_value_valid = false;
|
||||
}
|
||||
cd.enumeration = CoreConstants::get_global_constant_enum(i);
|
||||
c.constants.push_back(cd);
|
||||
}
|
||||
|
||||
|
|
@ -975,6 +1001,8 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
DocData::ArgumentDoc ad;
|
||||
DocData::argument_doc_from_arginfo(ad, pi);
|
||||
md.return_type = ad.type;
|
||||
} else {
|
||||
md.return_type = "void";
|
||||
}
|
||||
|
||||
// Utility function's arguments.
|
||||
|
|
@ -1054,6 +1082,7 @@ void DocTools::generate(BitField<GenerateFlags> p_flags) {
|
|||
cd.name = E.first;
|
||||
cd.value = E.second;
|
||||
cd.is_value_valid = true;
|
||||
cd.type = Variant::get_type_name(E.second.get_type());
|
||||
c.constants.push_back(cd);
|
||||
}
|
||||
|
||||
|
|
@ -1420,6 +1449,14 @@ Error DocTools::_load(Ref<XMLParser> parser) {
|
|||
prop2.type = parser->get_named_attribute_value("type");
|
||||
ERR_FAIL_COND_V(!parser->has_attribute("data_type"), ERR_FILE_CORRUPT);
|
||||
prop2.data_type = parser->get_named_attribute_value("data_type");
|
||||
if (parser->has_attribute("deprecated")) {
|
||||
prop2.is_deprecated = true;
|
||||
prop2.deprecated_message = parser->get_named_attribute_value("deprecated");
|
||||
}
|
||||
if (parser->has_attribute("experimental")) {
|
||||
prop2.is_experimental = true;
|
||||
prop2.experimental_message = parser->get_named_attribute_value("experimental");
|
||||
}
|
||||
if (parser->has_attribute("keywords")) {
|
||||
prop2.keywords = parser->get_named_attribute_value("keywords");
|
||||
}
|
||||
|
|
@ -1738,6 +1775,12 @@ Error DocTools::save_classes(const String &p_default_path, const HashMap<String,
|
|||
if (!ti.default_value.is_empty()) {
|
||||
additional_attributes += String(" default=\"") + ti.default_value.xml_escape(true) + "\"";
|
||||
}
|
||||
if (ti.is_deprecated) {
|
||||
additional_attributes += " deprecated=\"" + ti.deprecated_message.xml_escape(true) + "\"";
|
||||
}
|
||||
if (ti.is_experimental) {
|
||||
additional_attributes += " experimental=\"" + ti.experimental_message.xml_escape(true) + "\"";
|
||||
}
|
||||
if (!ti.keywords.is_empty()) {
|
||||
additional_attributes += String(" keywords=\"") + ti.keywords.xml_escape(true) + "\"";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue