summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/AABB.xml3
-rw-r--r--doc/classes/Basis.xml1
-rw-r--r--doc/classes/Color.xml1
-rw-r--r--doc/classes/EditorVCSInterface.xml14
-rw-r--r--doc/classes/Environment.xml6
-rw-r--r--doc/classes/HTTPClient.xml12
-rw-r--r--doc/classes/HTTPRequest.xml4
-rw-r--r--doc/classes/MeshLibrary.xml22
-rw-r--r--doc/classes/Node.xml4
-rw-r--r--doc/classes/Plane.xml1
-rw-r--r--doc/classes/Popup.xml2
-rw-r--r--doc/classes/Quat.xml1
-rw-r--r--doc/classes/Rect2.xml3
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/Transform.xml1
-rw-r--r--doc/classes/Transform2D.xml1
-rw-r--r--doc/classes/Vector2.xml1
-rw-r--r--doc/classes/Vector3.xml1
-rw-r--r--doc/classes/Viewport.xml1
-rw-r--r--doc/classes/ViewportContainer.xml3
-rwxr-xr-xdoc/tools/makerst.py67
21 files changed, 91 insertions, 60 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 61e1ea9b8d..44f1d9a921 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -182,6 +182,7 @@
<argument index="0" name="aabb" type="AABB">
</argument>
<description>
+ Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="merge">
@@ -190,7 +191,7 @@
<argument index="0" name="with" type="AABB">
</argument>
<description>
- Returns a larger AABB that contains this AABB and [code]with[/code].
+ Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index df9438e695..5a7fc0a41b 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -102,6 +102,7 @@
<argument index="1" name="epsilon" type="float" default="0.00001">
</argument>
<description>
+ Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="orthonormalized">
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index deba30712e..1d4225542a 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -157,6 +157,7 @@
<argument index="0" name="color" type="Color">
</argument>
<description>
+ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="lightened">
diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml
index 3ae19e5dce..23d608dea8 100644
--- a/doc/classes/EditorVCSInterface.xml
+++ b/doc/classes/EditorVCSInterface.xml
@@ -34,13 +34,6 @@
- [code]"offset"[/code] to store the offset of the line change since the first contextual line content.
</description>
</method>
- <method name="is_vcs_initialized">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
- </description>
- </method>
<method name="get_modified_files_data">
<return type="Dictionary">
</return>
@@ -84,6 +77,13 @@
Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code].
</description>
</method>
+ <method name="is_vcs_initialized">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code].
+ </description>
+ </method>
<method name="shut_down">
<return type="bool">
</return>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 2b44eb81b1..0d64f0ff64 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -96,13 +96,13 @@
[Sky] resource's custom field of view.
</member>
<member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )">
- [Sky] resource's rotation expressed as a [Basis]
+ [Sky] resource's rotation expressed as a [Basis].
</member>
<member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in radians
+ [Sky] resource's rotation expressed as Euler angles in radians.
</member>
<member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )">
- [Sky] resource's rotation expressed as euler angles in degrees
+ [Sky] resource's rotation expressed as Euler angles in degrees.
</member>
<member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1">
Amount of far blur.
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml
index 52e4b94051..3347eeafa7 100644
--- a/doc/classes/HTTPClient.xml
+++ b/doc/classes/HTTPClient.xml
@@ -170,15 +170,6 @@
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
- <method name="set_read_chunk_size">
- <return type="void">
- </return>
- <argument index="0" name="bytes" type="int">
- </argument>
- <description>
- Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
- </description>
- </method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">
@@ -187,6 +178,9 @@
<member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection">
The connection to use for this client.
</member>
+ <member name="read_chunk_size" type="int" setter="set_read_chunk_size" getter="get_read_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk].
+ </member>
</members>
<constants>
<constant name="METHOD_GET" value="0" enum="Method">
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index d0e8a5972f..98ba08e6a2 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -93,6 +93,10 @@
<member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1">
Maximum allowed size for response bodies.
</member>
+ <member name="download_chunk_size" type="int" setter="set_download_chunk_size" getter="get_download_chunk_size" default="4096">
+ The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size].
+ Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory.
+ </member>
<member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default="&quot;&quot;">
The file to download into. Will output any received file into it.
</member>
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index 44dc4f334f..49278be44e 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -4,7 +4,7 @@
Library of meshes.
</brief_description>
<description>
- A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap].
+ A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
</description>
<tutorials>
</tutorials>
@@ -22,7 +22,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Create a new item in the library, supplied as an ID.
+ Creates a new item in the library with the given ID.
+ You can get an unused ID from [method get_last_unused_item_id].
</description>
</method>
<method name="find_item_by_name" qualifiers="const">
@@ -31,13 +32,14 @@
<argument index="0" name="name" type="String">
</argument>
<description>
+ Returns the first item with the given name.
</description>
</method>
<method name="get_item_list" qualifiers="const">
<return type="PoolIntArray">
</return>
<description>
- Returns the list of items.
+ Returns the list of item IDs in use.
</description>
</method>
<method name="get_item_mesh" qualifiers="const">
@@ -46,7 +48,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the mesh of the item.
+ Returns the item's mesh.
</description>
</method>
<method name="get_item_name" qualifiers="const">
@@ -55,7 +57,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
- Returns the name of the item.
+ Returns the item's name.
</description>
</method>
<method name="get_item_navmesh" qualifiers="const">
@@ -64,6 +66,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the item's navigation mesh.
</description>
</method>
<method name="get_item_navmesh_transform" qualifiers="const">
@@ -72,6 +75,7 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns the transform applied to the item's navigation mesh.
</description>
</method>
<method name="get_item_preview" qualifiers="const">
@@ -90,6 +94,8 @@
<argument index="0" name="id" type="int">
</argument>
<description>
+ Returns an item's collision shapes.
+ The array consists of each [Shape] followed by its [Transform].
</description>
</method>
<method name="get_last_unused_item_id" qualifiers="const">
@@ -128,6 +134,7 @@
</argument>
<description>
Sets the item's name.
+ This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
</description>
</method>
<method name="set_item_navmesh">
@@ -138,6 +145,7 @@
<argument index="1" name="navmesh" type="NavigationMesh">
</argument>
<description>
+ Sets the item's navigation mesh.
</description>
</method>
<method name="set_item_navmesh_transform">
@@ -148,6 +156,7 @@
<argument index="1" name="navmesh" type="Transform">
</argument>
<description>
+ Sets the transform to apply to the item's navigation mesh.
</description>
</method>
<method name="set_item_preview">
@@ -158,6 +167,7 @@
<argument index="1" name="texture" type="Texture">
</argument>
<description>
+ Sets a texture to use as the item's preview icon in the editor.
</description>
</method>
<method name="set_item_shapes">
@@ -168,6 +178,8 @@
<argument index="1" name="shapes" type="Array">
</argument>
<description>
+ Sets an item's collision shapes.
+ The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY].
</description>
</method>
</methods>
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index cecbce90b3..e9fb47cbbd 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -251,7 +251,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and attempts to access it will result in an "Attempt to call &lt;method&gt; on a null instance." error.
+ Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call &lt;method&gt; on a null instance." error.
[b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]).
[b]Example:[/b] Assume your current node is Character and the following tree:
[codeblock]
@@ -295,7 +295,7 @@
<argument index="0" name="path" type="NodePath">
</argument>
<description>
- Similar to [method get_node], but does not raise an error if [code]path[/code] does not point to a valid [Node].
+ Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node].
</description>
</method>
<method name="get_parent" qualifiers="const">
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index bb72f2734e..f179041327 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -122,6 +122,7 @@
<argument index="0" name="plane" type="Plane">
</argument>
<description>
+ Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_point_over">
diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml
index 2357ee2469..6b15b5a1ea 100644
--- a/doc/classes/Popup.xml
+++ b/doc/classes/Popup.xml
@@ -4,7 +4,7 @@
Base container control for popups and dialogs.
</brief_description>
<description>
- Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
+ Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index f5ee99d30c..eeb633f480 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -100,6 +100,7 @@
<argument index="0" name="quat" type="Quat">
</argument>
<description>
+ Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 07fa7777fe..90dd996691 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -143,6 +143,7 @@
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
+ Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="merge">
@@ -151,7 +152,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns a larger Rect2 that contains this Rect2 and [code]b[/code].
+ Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index e8a88acdb5..91014580d3 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -4,7 +4,7 @@
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. A script exends the functionality of all objects that instance it.
+ A class stored as a resource. A script extends the functionality of all objects that instance it.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
<tutorials>
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 034a1b2f5b..4c4022b3b5 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -95,6 +95,7 @@
<argument index="0" name="transform" type="Transform">
</argument>
<description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="looking_at">
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 89ccffc2e9..6288bb074c 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -112,6 +112,7 @@
<argument index="0" name="transform" type="Transform2D">
</argument>
<description>
+ Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
<method name="orthonormalized">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 8ae5caf68c..b23c69de60 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -159,6 +159,7 @@
<argument index="0" name="v" type="Vector2">
</argument>
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 29c24709e2..d838e6d2f7 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -135,6 +135,7 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
+ Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 9bc46881f9..4effe9aad2 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -126,6 +126,7 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if the viewport is currently performing a drag operation.
</description>
</method>
<method name="input">
diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml
index e4c6091909..2f1bc5d799 100644
--- a/doc/classes/ViewportContainer.xml
+++ b/doc/classes/ViewportContainer.xml
@@ -15,6 +15,9 @@
If [code]true[/code], the viewport will be scaled to the control's size.
</member>
<member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1">
+ Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.
+ For example, a 1280×720 viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container.
+ [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work.
</member>
</members>
<constants>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index ef38299680..de53259827 100755
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -148,6 +148,8 @@ class State:
setter = property.get("setter") or None # Use or None so '' gets turned into None.
getter = property.get("getter") or None
default_value = property.get("default") or None
+ if default_value is not None:
+ default_value = escape_rst(default_value)
overridden = property.get("override") or False
property_def = PropertyDef(property_name, type_name, setter, getter, property.text, default_value, overridden)
@@ -622,6 +624,40 @@ def make_class_list(class_list, columns): # type: (List[str], int) -> None
f.close()
+def escape_rst(text, until_pos=-1): # type: (str) -> str
+ # Escape \ character, otherwise it ends up as an escape character in rst
+ pos = 0
+ while True:
+ pos = text.find('\\', pos, until_pos)
+ if pos == -1:
+ break
+ text = text[:pos] + "\\\\" + text[pos + 1:]
+ pos += 2
+
+ # Escape * character to avoid interpreting it as emphasis
+ pos = 0
+ while True:
+ pos = text.find('*', pos, until_pos)
+ if pos == -1:
+ break
+ text = text[:pos] + "\*" + text[pos + 1:]
+ pos += 2
+
+ # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink
+ pos = 0
+ while True:
+ pos = text.find('_', pos, until_pos)
+ if pos == -1:
+ break
+ if not text[pos + 1].isalnum(): # don't escape within a snake_case word
+ text = text[:pos] + "\_" + text[pos + 1:]
+ pos += 2
+ else:
+ pos += 1
+
+ return text
+
+
def rstize_text(text, state): # type: (str, State) -> str
# Linebreak + tabs in the XML should become two line breaks unless in a "codeblock"
pos = 0
@@ -677,36 +713,7 @@ def rstize_text(text, state): # type: (str, State) -> str
pos += 2
next_brac_pos = text.find('[')
-
- # Escape \ character, otherwise it ends up as an escape character in rst
- pos = 0
- while True:
- pos = text.find('\\', pos, next_brac_pos)
- if pos == -1:
- break
- text = text[:pos] + "\\\\" + text[pos + 1:]
- pos += 2
-
- # Escape * character to avoid interpreting it as emphasis
- pos = 0
- while True:
- pos = text.find('*', pos, next_brac_pos)
- if pos == -1:
- break
- text = text[:pos] + "\*" + text[pos + 1:]
- pos += 2
-
- # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink
- pos = 0
- while True:
- pos = text.find('_', pos, next_brac_pos)
- if pos == -1:
- break
- if not text[pos + 1].isalnum(): # don't escape within a snake_case word
- text = text[:pos] + "\_" + text[pos + 1:]
- pos += 2
- else:
- pos += 1
+ text = escape_rst(text, next_brac_pos)
# Handle [tags]
inside_code = False