Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Fix style inconsistencies for [b]Note:[/b] paragraphs + makerst.py fixes for 4.0 docs #53432

Merged
merged 4 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/classes/@GlobalScope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@
[codeblock]
sqrt(9) # Returns 3
[/codeblock]
[b]Note:[/b]Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
[b]Note:[/b] Negative values of [code]x[/code] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
</description>
</method>
<method name="step_decimals">
Expand Down Expand Up @@ -2340,7 +2340,7 @@
hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
[/codeblock]
[b]Note:[/b] the final colon is required to specify for properly detecting built-in types.
[b]Note:[/b] The final colon is required to specify for properly detecting built-in types.
</constant>
<constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="26" enum="PropertyHint">
</constant>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/AESContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<return type="PackedByteArray" />
<description>
Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function.
Note: This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
[b]Note:[/b] This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT].
</description>
</method>
<method name="start">
Expand All @@ -106,7 +106,7 @@
<argument index="0" name="src" type="PackedByteArray" />
<description>
Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation.
Note: The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed.
[b]Note:[/b] The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed.
</description>
</method>
</methods>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/AnimationPlayer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
[b]Note[/b]: while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
[b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
The length (in seconds) of the currently being played animation.
Expand Down
3 changes: 2 additions & 1 deletion doc/classes/AnimationTree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
A node to be used for advanced animation transitions in an [AnimationPlayer].
</brief_description>
<description>
Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
A node to be used for advanced animation transitions in an [AnimationPlayer].
[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
</description>
<tutorials>
<link title="Using AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
<argument index="0" name="func" type="Callable" />
<description>
Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
[codeblocks]
[gdscript]
class MyCustomSorter:
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/BaseMaterial3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
</member>
<member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5">
Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.
[b]Note:[/b] unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness].
[b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness].
</member>
<member name="metallic_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to specify metallic for an object. This is multiplied by [member metallic].
Expand Down Expand Up @@ -352,7 +352,7 @@
</member>
<member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], render point size can be changed.
[b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
[b]Note:[/b] This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size].
</member>
<member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3(0, 0, 0)">
How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] in the vertex function. This can be used to offset a texture.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ClassDB.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<argument index="1" name="no_inheritance" type="bool" default="false" />
<description>
Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].
[b]Note:[/code] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
[b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.
</description>
</method>
<method name="class_get_property" qualifiers="const">
Expand Down
6 changes: 3 additions & 3 deletions doc/classes/CodeEdit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
CodeEdit is a specialised [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
[b]Note[/b]: By default [CodeEdit] always use left-to-right text direction to correctly display source code.
[b]Note:[/b] By default [CodeEdit] always use left-to-right text direction to correctly display source code.
</description>
<tutorials>
</tutorials>
Expand Down Expand Up @@ -51,7 +51,7 @@
<argument index="5" name="value" type="Variant" default="0" />
<description>
Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.
[b]Note[/b]: This list will replace all current candidates.
[b]Note:[/b] This list will replace all current candidates.
</description>
</method>
<method name="add_comment_delimiter">
Expand Down Expand Up @@ -431,7 +431,7 @@
<argument index="0" name="force" type="bool" />
<description>
Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code].
[b]Note[/b]: This will replace all current candidates.
[b]Note:[/b] This will replace all current candidates.
</description>
</method>
</methods>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ColorPicker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<argument index="0" name="color" type="Color" />
<description>
Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.
[b]Note:[/b] the presets list is only for [i]this[/i] color picker.
[b]Note:[/b] The presets list is only for [i]this[/i] color picker.
</description>
</method>
<method name="erase_preset">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/ConcavePolygonShape3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody3D] or area. This shape is created by feeding a list of triangles.
Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static.
[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidDynamicBody3D] with a mode other than Static.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/Crypto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<argument index="1" name="ciphertext" type="PackedByteArray" />
<description>
Decrypt the given [code]ciphertext[/code] with the provided private [code]key[/code].
[b]Note[/b]: The maximum size of accepted ciphertext is limited by the key size.
[b]Note:[/b] The maximum size of accepted ciphertext is limited by the key size.
</description>
</method>
<method name="encrypt">
Expand All @@ -97,7 +97,7 @@
<argument index="1" name="plaintext" type="PackedByteArray" />
<description>
Encrypt the given [code]plaintext[/code] with the provided public [code]key[/code].
[b]Note[/b]: The maximum size of accepted plaintext is limited by the key size.
[b]Note:[/b] The maximum size of accepted plaintext is limited by the key size.
</description>
</method>
<method name="generate_random_bytes">
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/CryptoKey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<argument index="1" name="public_only" type="bool" default="false" />
<description>
Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded.
[b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
[b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="load_from_string">
Expand All @@ -40,7 +40,7 @@
<argument index="1" name="public_only" type="bool" default="false" />
<description>
Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved.
[b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
[b]Note:[/b] [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise.
</description>
</method>
<method name="save_to_string">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/DTLSServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<argument index="0" name="udp_peer" type="PacketPeerUDP" />
<description>
Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]).
[b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.
[b]Note:[/b] You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange.
</description>
</method>
</methods>
Expand Down
4 changes: 2 additions & 2 deletions doc/classes/EditorResourcePreview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<argument index="3" name="userdata" type="Variant" />
<description>
Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
[b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
[b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="queue_resource_preview">
Expand All @@ -43,7 +43,7 @@
<argument index="3" name="userdata" type="Variant" />
<description>
Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called.
[b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
[b]Note:[/b] If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null.
</description>
</method>
<method name="remove_preview_generator">
Expand Down
18 changes: 12 additions & 6 deletions doc/classes/FontData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="Vector2i" />
<description>
Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
Removes all rendered glyphs information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
<method name="clear_kerning_map">
Expand All @@ -46,7 +47,8 @@
<argument index="0" name="cache_index" type="int" />
<argument index="1" name="size" type="Vector2i" />
<description>
Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
Removes all textures from font cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually.
</description>
</method>
<method name="find_cache" qualifiers="const">
Expand Down Expand Up @@ -97,7 +99,8 @@
<argument index="1" name="size" type="int" />
<argument index="2" name="glyph" type="int" />
<description>
Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
Returns glyph advance (offset of the next glyph).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="get_glyph_index" qualifiers="const">
Expand Down Expand Up @@ -364,7 +367,8 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="glyph" type="int" />
<description>
Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
Removes specified rendered glyph information from the cache entry.
[b]Note:[/b] This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually.
</description>
</method>
<method name="remove_kerning">
Expand Down Expand Up @@ -404,7 +408,8 @@
<argument index="1" name="size" type="Vector2i" />
<argument index="2" name="texture_index" type="int" />
<description>
Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
Removes specified texture from font cache entry.
[b]Note:[/b] This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph].
</description>
</method>
<method name="render_glyph">
Expand Down Expand Up @@ -472,7 +477,8 @@
<argument index="2" name="glyph" type="int" />
<argument index="3" name="advance" type="Vector2" />
<description>
Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved.
Sets glyph advance (offset of the next glyph).
[b]Note:[/b] Advance for glyphs outlines is the same as the base glyph advance and is not saved.
</description>
</method>
<method name="set_glyph_offset">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/JavaScriptObject.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# [0, 9, [JavaScriptObject:1180]]
print(args)
[/codeblock]
Note: Only available in the "HTML5" platform.
[b]Note:[/b] Only available in the HTML5 platform.
</description>
<tutorials>
</tutorials>
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/LineEdit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
</member>
<member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false">
Allow moving caret, selecting and removing the individual composite character components.
Note: [kbd]Backspace[/kbd] is always removing individual composite character components.
[b]Note:[/b] [kbd]Backspace[/kbd] is always removing individual composite character components.
</member>
<member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false">
If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty, which can be used to clear the text quickly.
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/MultiplayerReplicator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<argument index="1" name="peer_id" type="int" default="0" />
<description>
Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config].
Note: The default implementation only allow syncing from server to clients.
[b]Note:[/b] The default implementation only allow syncing from server to clients.
</description>
</method>
<method name="sync_config">
Expand Down
Loading