From 34cad0d020c58d87245befe10ad816fa73432437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 10 Nov 2020 14:13:16 +0100 Subject: [PATCH 1/2] doc: Fixups to #43419 which added operators in the docs - Escape the method names as e.g. `operator <` is invalid XML. - Add a hack to merge all String % operator definitions for each Variant type as a single one with `Variant` argument type. - Add support for the new qualifiers in makerst.py. - Drop unused `doc_merge.py`, seems to date back to when we had all the documentation in a single `classes.xml`. --- doc/tools/doc_merge.py | 237 ----------------------------------------- doc/tools/makerst.py | 2 + editor/doc_data.cpp | 28 ++++- 3 files changed, 25 insertions(+), 242 deletions(-) delete mode 100755 doc/tools/doc_merge.py diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py deleted file mode 100755 index f6f52f5d66d..00000000000 --- a/doc/tools/doc_merge.py +++ /dev/null @@ -1,237 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys -import xml.etree.ElementTree as ET - - -tree = ET.parse(sys.argv[1]) -old_doc = tree.getroot() - -tree = ET.parse(sys.argv[2]) -new_doc = tree.getroot() - -f = file(sys.argv[3], "wb") -tab = 0 - -old_classes = {} - - -def write_string(_f, text, newline=True): - for t in range(tab): - _f.write("\t") - _f.write(text) - if newline: - _f.write("\n") - - -def escape(ret): - ret = ret.replace("&", "&") - ret = ret.replace("<", ">") - ret = ret.replace(">", "<") - ret = ret.replace("'", "'") - ret = ret.replace('"', """) - return ret - - -def inc_tab(): - global tab - tab += 1 - - -def dec_tab(): - global tab - tab -= 1 - - -write_string(f, '') -write_string(f, '') - - -def get_tag(node, name): - tag = "" - if name in node.attrib: - tag = " " + name + '="' + escape(node.attrib[name]) + '" ' - return tag - - -def find_method_descr(old_class, name): - - methods = old_class.find("methods") - if methods != None and len(list(methods)) > 0: - for m in list(methods): - if m.attrib["name"] == name: - description = m.find("description") - if description != None and description.text.strip() != "": - return description.text - - return None - - -def find_signal_descr(old_class, name): - - signals = old_class.find("signals") - if signals != None and len(list(signals)) > 0: - for m in list(signals): - if m.attrib["name"] == name: - description = m.find("description") - if description != None and description.text.strip() != "": - return description.text - - return None - - -def find_constant_descr(old_class, name): - - if old_class is None: - return None - constants = old_class.find("constants") - if constants != None and len(list(constants)) > 0: - for m in list(constants): - if m.attrib["name"] == name: - if m.text.strip() != "": - return m.text - return None - - -def write_class(c): - class_name = c.attrib["name"] - print("Parsing Class: " + class_name) - if class_name in old_classes: - old_class = old_classes[class_name] - else: - old_class = None - - category = get_tag(c, "category") - inherits = get_tag(c, "inherits") - write_string(f, '") - inc_tab() - - write_string(f, "") - - if old_class != None: - old_brief_descr = old_class.find("brief_description") - if old_brief_descr != None: - write_string(f, escape(old_brief_descr.text.strip())) - - write_string(f, "") - - write_string(f, "") - if old_class != None: - old_descr = old_class.find("description") - if old_descr != None: - write_string(f, escape(old_descr.text.strip())) - - write_string(f, "") - - methods = c.find("methods") - if methods != None and len(list(methods)) > 0: - - write_string(f, "") - inc_tab() - - for m in list(methods): - qualifiers = get_tag(m, "qualifiers") - - write_string(f, '") - inc_tab() - - for a in list(m): - if a.tag == "return": - typ = get_tag(a, "type") - write_string(f, "") - write_string(f, "") - elif a.tag == "argument": - - default = get_tag(a, "default") - - write_string( - f, - '", - ) - write_string(f, "") - - write_string(f, "") - if old_class != None: - old_method_descr = find_method_descr(old_class, m.attrib["name"]) - if old_method_descr: - write_string(f, escape(escape(old_method_descr.strip()))) - - write_string(f, "") - dec_tab() - write_string(f, "") - dec_tab() - write_string(f, "") - - signals = c.find("signals") - if signals != None and len(list(signals)) > 0: - - write_string(f, "") - inc_tab() - - for m in list(signals): - - write_string(f, '') - inc_tab() - - for a in list(m): - if a.tag == "argument": - - write_string( - f, - '', - ) - write_string(f, "") - - write_string(f, "") - if old_class != None: - old_signal_descr = find_signal_descr(old_class, m.attrib["name"]) - if old_signal_descr: - write_string(f, escape(old_signal_descr.strip())) - write_string(f, "") - dec_tab() - write_string(f, "") - dec_tab() - write_string(f, "") - - constants = c.find("constants") - if constants != None and len(list(constants)) > 0: - - write_string(f, "") - inc_tab() - - for m in list(constants): - - write_string(f, '') - old_constant_descr = find_constant_descr(old_class, m.attrib["name"]) - if old_constant_descr: - write_string(f, escape(old_constant_descr.strip())) - write_string(f, "") - - dec_tab() - write_string(f, "") - - dec_tab() - write_string(f, "") - - -for c in list(old_doc): - old_classes[c.attrib["name"]] = c - -for c in list(new_doc): - write_class(c) -write_string(f, "\n") diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index ed147f31cd3..5335116c8a6 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -1042,6 +1042,8 @@ def make_footer(): # type: () -> str ".. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`\n" ".. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`\n" ".. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`\n" + ".. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`\n" + ".. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`\n" ) # fmt: on diff --git a/editor/doc_data.cpp b/editor/doc_data.cpp index 67671597217..ae31f685878 100644 --- a/editor/doc_data.cpp +++ b/editor/doc_data.cpp @@ -569,12 +569,15 @@ void DocData::generate(bool p_basic_types) { method_list.sort(); Variant::get_constructor_list(Variant::Type(i), &method_list); - for (int j = 0; j < Variant::OP_AND; j++) { //showing above 'and' is pretty confusing and there are a lot of variations - + for (int j = 0; j < Variant::OP_AND; j++) { // Showing above 'and' is pretty confusing and there are a lot of variations. for (int k = 0; k < Variant::VARIANT_MAX; k++) { Variant::Type rt = Variant::get_operator_return_type(Variant::Operator(j), Variant::Type(i), Variant::Type(k)); - if (rt != Variant::NIL) { - //has operator + if (rt != Variant::NIL) { // Has operator. + // Skip String % operator as it's registered separately for each Variant arg type, + // we'll add it manually below. + if (i == Variant::STRING && Variant::Operator(j) == Variant::OP_MODULE) { + continue; + } MethodInfo mi; mi.name = "operator " + Variant::get_operator_name(Variant::Operator(j)); mi.return_val.type = rt; @@ -589,6 +592,21 @@ void DocData::generate(bool p_basic_types) { } } + if (i == Variant::STRING) { + // We skipped % operator above, and we register it manually once for Variant arg type here. + MethodInfo mi; + mi.name = "operator %"; + mi.return_val.type = Variant::STRING; + + PropertyInfo arg; + arg.name = "right"; + arg.type = Variant::NIL; + arg.usage = PROPERTY_USAGE_NIL_IS_VARIANT; + mi.arguments.push_back(arg); + + method_list.push_back(mi); + } + if (Variant::is_keyed(Variant::Type(i))) { MethodInfo mi; mi.name = "operator []"; @@ -1147,7 +1165,7 @@ Error DocData::save_classes(const String &p_default_path, const Map"); + _write_string(f, 2, ""); if (m.return_type != "") { String enum_text; From 64e893deac24ef7c144ba7a6915c417bbd6a4816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 10 Nov 2020 14:16:20 +0100 Subject: [PATCH 2/2] doc: Sync classref to add operators after #43419 --- doc/classes/AABB.xml | 30 ++- doc/classes/Array.xml | 86 +++++++-- doc/classes/Basis.xml | 52 +++++- doc/classes/Callable.xml | 22 ++- doc/classes/Color.xml | 102 ++++++++++- doc/classes/Dictionary.xml | 28 ++- doc/classes/NodePath.xml | 22 ++- doc/classes/PackedByteArray.xml | 38 +++- doc/classes/PackedColorArray.xml | 38 +++- doc/classes/PackedFloat32Array.xml | 30 ++- doc/classes/PackedFloat64Array.xml | 38 +++- doc/classes/PackedInt32Array.xml | 38 +++- doc/classes/PackedInt64Array.xml | 38 +++- doc/classes/PackedStringArray.xml | 38 +++- doc/classes/PackedVector2Array.xml | 46 ++++- doc/classes/PackedVector3Array.xml | 46 ++++- doc/classes/Plane.xml | 40 +++- doc/classes/Quat.xml | 106 ++++++++++- doc/classes/RID.xml | 52 +++++- doc/classes/Rect2.xml | 34 +++- doc/classes/Rect2i.xml | 26 ++- doc/classes/Signal.xml | 22 ++- doc/classes/String.xml | 88 ++++++++- doc/classes/StringName.xml | 38 +++- doc/classes/Transform.xml | 56 +++++- doc/classes/Transform2D.xml | 64 ++++++- doc/classes/Vector2.xml | 148 ++++++++++++++- doc/classes/Vector2i.xml | 156 +++++++++++++++- doc/classes/Vector3.xml | 164 ++++++++++++++++- doc/classes/Vector3i.xml | 156 +++++++++++++++- doc/classes/bool.xml | 40 +++- doc/classes/float.xml | 228 ++++++++++++++++++++++- doc/classes/int.xml | 282 ++++++++++++++++++++++++++++- 33 files changed, 2261 insertions(+), 131 deletions(-) diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index a4972612d96..baea84df65d 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -14,14 +14,14 @@ https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html - + Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size]. - + @@ -30,7 +30,7 @@ Constructs an [AABB] as a copy of the given [AABB]. - + @@ -231,6 +231,30 @@ Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 86ef5bef4c1..adc4f40a838 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -43,14 +43,14 @@ - + Constructs an empty [Array]. - + @@ -59,7 +59,7 @@ Constructs an [Array] as a copy of the given [Array]. - + @@ -68,7 +68,7 @@ Constructs an array from a [PackedByteArray]. - + @@ -77,7 +77,7 @@ Constructs an array from a [PackedColorArray]. - + @@ -86,7 +86,7 @@ Constructs an array from a [PackedFloat32Array]. - + @@ -95,7 +95,7 @@ Constructs an array from a [PackedFloat64Array]. - + @@ -104,7 +104,7 @@ Constructs an array from a [PackedInt32Array]. - + @@ -113,7 +113,7 @@ Constructs an array from a [PackedInt64Array]. - + @@ -122,7 +122,7 @@ Constructs an array from a [PackedStringArray]. - + @@ -131,7 +131,7 @@ Constructs an array from a [PackedVector2Array]. - + @@ -336,6 +336,70 @@ Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 908f316e4e0..877d3ca85a3 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -19,14 +19,14 @@ https://godotengine.org/asset-library/asset/583 - + Constructs a default-initialized [Basis] set to [constant IDENTITY]. - + @@ -35,7 +35,7 @@ Constructs a [Basis] as a copy of the given [Basis]. - + @@ -46,7 +46,7 @@ Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. - + @@ -56,7 +56,7 @@ Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. - + @@ -65,7 +65,7 @@ Constructs a pure rotation basis matrix from the given quaternion. - + @@ -131,6 +131,46 @@ Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index c31efc2581d..f137ede90f8 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -36,14 +36,14 @@ - + Constructs a null [Callable] with no object nor method bound. - + @@ -52,7 +52,7 @@ Constructs a [Callable] as a copy of the given [Callable]. - + @@ -128,6 +128,22 @@ + + + + + + + + + + + + + + + + diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 721fea8a198..ae8703c8378 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -16,14 +16,14 @@ https://godotengine.org/asset-library/asset/133 - + Constructs a default-initialized [Color] with all components set to [code]0[/code]. - + @@ -32,7 +32,7 @@ Constructs a [Color] as a copy of the given [Color]. - + @@ -51,7 +51,7 @@ [/codeblocks] - + @@ -74,7 +74,7 @@ [/codeblocks] - + @@ -203,6 +203,98 @@ [/codeblocks] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index a7a3632fef9..dc38fdf0e87 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -171,14 +171,14 @@ https://godotengine.org/asset-library/asset/677 - + Constructs an empty [Dictionary]. - + @@ -294,6 +294,30 @@ Returns the list of keys in the [Dictionary]. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 980bea0d9fb..93ede047fdb 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -25,14 +25,14 @@ https://godotengine.org/asset-library/asset/520 - + Constructs an empty [NodePath]. - + @@ -41,7 +41,7 @@ Constructs a [NodePath] as a copy of the given [NodePath]. - + @@ -150,6 +150,22 @@ Returns [code]true[/code] if the node path is empty. + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 5ac5f15fb24..4a6893879db 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -10,14 +10,14 @@ - + Constructs an empty [PackedByteArray]. - + @@ -26,7 +26,7 @@ Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]. - + @@ -159,6 +159,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index e4b9e02be7f..3065d169459 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -10,14 +10,14 @@ - + Constructs an empty [PackedColorArray]. - + @@ -26,7 +26,7 @@ Constructs a [PackedColorArray] as a copy of the given [PackedColorArray]. - + @@ -87,6 +87,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index 1b2091f72b4..ab9594d2e38 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -11,14 +11,14 @@ - + Constructs an empty [PackedFloat32Array]. - + @@ -27,7 +27,7 @@ Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array]. - + @@ -88,6 +88,30 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index a55ac6bacc1..3088aee483b 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -11,14 +11,14 @@ - + Constructs an empty [PackedFloat64Array]. - + @@ -27,7 +27,7 @@ Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array]. - + @@ -88,6 +88,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index ecf8abd1ebb..eded545de89 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -11,14 +11,14 @@ - + Constructs an empty [PackedInt32Array]. - + @@ -27,7 +27,7 @@ Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array]. - + @@ -88,6 +88,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index a254a6ff5f3..83731b10230 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -11,14 +11,14 @@ - + Constructs an empty [PackedInt64Array]. - + @@ -27,7 +27,7 @@ Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array]. - + @@ -88,6 +88,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index c50ec38a93e..c71f5ffa7e8 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -11,14 +11,14 @@ https://godotengine.org/asset-library/asset/677 - + Constructs an empty [PackedStringArray]. - + @@ -27,7 +27,7 @@ Constructs a [PackedStringArray] as a copy of the given [PackedStringArray]. - + @@ -88,6 +88,38 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 0bd658c488f..5f68d9256d0 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -11,14 +11,14 @@ https://godotengine.org/asset-library/asset/519 - + Constructs an empty [PackedVector2Array]. - + @@ -27,7 +27,7 @@ Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array]. - + @@ -88,6 +88,46 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 5b835f2fbf6..e681e1deb74 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -10,14 +10,14 @@ - + Constructs an empty [PackedVector3Array]. - + @@ -26,7 +26,7 @@ Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array]. - + @@ -87,6 +87,46 @@ Reverses the order of the elements in the array. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index bb0b25a5526..e3242512c4d 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -10,14 +10,14 @@ https://docs.godotengine.org/en/latest/tutorials/math/index.html - + Constructs a default-initialized [Plane] with all components set to [code]0[/code]. - + @@ -26,7 +26,7 @@ Constructs a [Plane] as a copy of the given [Plane]. - + @@ -41,7 +41,7 @@ Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin. - + @@ -52,7 +52,7 @@ Creates a plane from the normal and the plane's distance to the origin. - + @@ -63,7 +63,7 @@ Creates a plane from the given position and a plane normal. - + @@ -161,6 +161,34 @@ Returns a copy of the plane, normalized. + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index edfe99a8b83..5932a624f28 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -13,14 +13,14 @@ https://godotengine.org/asset-library/asset/678 - + Constructs a default-initialized quaternion with all components set to [code]0[/code]. - + @@ -29,7 +29,7 @@ Constructs a [Quat] as a copy of the given [Quat]. - + @@ -39,7 +39,7 @@ - + @@ -50,7 +50,7 @@ Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. - + @@ -59,7 +59,7 @@ Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). - + @@ -68,7 +68,7 @@ Constructs a quaternion from the given [Basis]. - + @@ -158,6 +158,98 @@ Returns a copy of the quaternion, normalized to unit length. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index d944f7a86af..0ee34d4194a 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -9,14 +9,14 @@ - + Constructs an empty [RID] with the invalid ID [code]0[/code]. - + @@ -32,6 +32,54 @@ Returns the ID of the referenced resource. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index b970d0188ce..02a77a0e248 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -14,14 +14,14 @@ https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html - + Constructs a default-initialized [Rect2] with default (zero) values of [member position] and [member size]. - + @@ -30,7 +30,7 @@ Constructs a [Rect2] as a copy of the given [Rect2]. - + @@ -39,7 +39,7 @@ Constructs a [Rect2] from a [Rect2i]. - + @@ -50,7 +50,7 @@ Constructs a [Rect2] by position and size. - + @@ -187,6 +187,30 @@ Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index 5c9162baf4a..e8b75a6ac62 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -12,14 +12,14 @@ https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html - + Constructs a default-initialized [Rect2i] with default (zero) values of [member position] and [member size]. - + @@ -28,7 +28,7 @@ Constructs a [Rect2i] as a copy of the given [Rect2i]. - + @@ -37,7 +37,7 @@ Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. - + @@ -48,7 +48,7 @@ Constructs a [Rect2i] by position and size. - + @@ -174,6 +174,22 @@ Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code]. + + + + + + + + + + + + + + + + diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index bd091899acf..b7a2258fc1e 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -8,14 +8,14 @@ - + Constructs a null [Signal] with no object nor signal name bound. - + @@ -24,7 +24,7 @@ Constructs a [Signal] as a copy of the given [Signal]. - + @@ -107,6 +107,22 @@ + + + + + + + + + + + + + + + + diff --git a/doc/classes/String.xml b/doc/classes/String.xml index a600a575aa4..4ee9dbf1f95 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -10,14 +10,14 @@ https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html - + Constructs an empty [String] ([code]""[/code]). - + @@ -26,7 +26,7 @@ Constructs a [String] as a copy of the given [String]. - + @@ -35,7 +35,7 @@ Constructs a new String from the given [NodePath]. - + @@ -466,6 +466,86 @@ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index a847d441206..af0074f080c 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -9,14 +9,14 @@ - + Constructs an empty [StringName]. - + @@ -25,7 +25,7 @@ Constructs a [StringName] as a copy of the given [StringName]. - + @@ -34,6 +34,38 @@ Creates a new [StringName] from the given [String]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 920a6c704e0..cda69f6a644 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -16,14 +16,14 @@ https://godotengine.org/asset-library/asset/583 - + Constructs a default-initialized [Transform] set to [constant IDENTITY]. - + @@ -32,7 +32,7 @@ Constructs a [Transform] as a copy of the given [Transform]. - + @@ -43,7 +43,7 @@ Constructs a Transform from a [Basis] and [Vector3]. - + @@ -105,6 +105,54 @@ Operations take place in global space. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index af67ad2bd48..ff291663fa4 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -14,14 +14,14 @@ https://godotengine.org/asset-library/asset/583 - + Constructs a default-initialized [Transform] set to [constant IDENTITY]. - + @@ -30,7 +30,7 @@ Constructs a [Transform2D] as a copy of the given [Transform2D]. - + @@ -41,7 +41,7 @@ Constructs the transform from a given angle (in radians) and position. - + @@ -129,6 +129,62 @@ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index da1526df524..f99231de394 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -17,14 +17,14 @@ https://github.com/godotengine/godot-demo-projects/tree/master/2d - + Constructs a default-initialized [Vector2] with all components set to [code]0[/code]. - + @@ -33,7 +33,7 @@ Constructs a [Vector2] as a copy of the given [Vector2]. - + @@ -42,7 +42,7 @@ Constructs a new [Vector2] from [Vector2i]. - + @@ -250,6 +250,146 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index e5b85dff9e2..a4ea5c2742a 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -14,14 +14,14 @@ https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab - + Constructs a default-initialized [Vector2i] with all components set to [code]0[/code]. - + @@ -30,7 +30,7 @@ Constructs a [Vector2i] as a copy of the given [Vector2i]. - + @@ -39,7 +39,7 @@ Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. - + @@ -64,6 +64,154 @@ Returns the ratio of [member x] to [member y]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 356c9501e13..6ba0d6ab8d3 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -17,14 +17,14 @@ https://github.com/godotengine/godot-demo-projects/tree/master/3d - + Constructs a default-initialized [Vector3] with all components set to [code]0[/code]. - + @@ -33,7 +33,7 @@ Constructs a [Vector3] as a copy of the given [Vector3]. - + @@ -42,7 +42,7 @@ Constructs a new [Vector3] from [Vector3i]. - + @@ -239,6 +239,162 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 761bddaeefd..a1ae2aceab2 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -14,14 +14,14 @@ https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab - + Constructs a default-initialized [Vector3i] with all components set to [code]0[/code]. - + @@ -30,7 +30,7 @@ Constructs a [Vector3i] as a copy of the given [Vector3i]. - + @@ -39,7 +39,7 @@ Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. - + @@ -72,6 +72,154 @@ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index e9f4c2ecf4f..03e8bee7d57 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -91,14 +91,14 @@ - + Constructs a default-initialized [bool] set to [code]false[/code]. - + @@ -107,7 +107,7 @@ Constructs a [bool] as a copy of the given [bool]. - + @@ -116,7 +116,7 @@ Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats. - + @@ -125,6 +125,38 @@ Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 8153d62bc99..85fe31eec87 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -9,14 +9,14 @@ - + Constructs a default-initialized [float] set to [code]0.0[/code]. - + @@ -25,7 +25,7 @@ Constructs a [float] as a copy of the given [float]. - + @@ -34,7 +34,7 @@ Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. - + @@ -43,6 +43,226 @@ Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code]. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 27d873831bb..5ac9f8405a9 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -23,14 +23,14 @@ - + Constructs a default-initialized [int] set to [code]0[/code]. - + @@ -39,7 +39,7 @@ Constructs an [int] as a copy of the given [int]. - + @@ -48,7 +48,7 @@ Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. - + @@ -57,6 +57,280 @@ Cast a float value to an integer value, this method simply removes the number fractions, so for example [code]int(2.7)[/code] will be equals to 2, [code]int(.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +