doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphs

(cherry picked from commit 788b3aa27a)
This commit is contained in:
Rémi Verschelde 2021-10-05 14:24:34 +02:00
parent 487ca87e94
commit c7eb3d25e7
No known key found for this signature in database
GPG Key ID: C3336907360768E1
26 changed files with 41 additions and 37 deletions

View File

@ -50,7 +50,7 @@
<return type="PoolByteArray" />
<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">
@ -67,7 +67,7 @@
<argument index="0" name="src" type="PoolByteArray" />
<description>
Run the desired operation for this AES context. Will return a [PoolByteArray] 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>

View File

@ -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.

View File

@ -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/3.4/tutorials/animation/animation_tree.html</link>

View File

@ -345,7 +345,7 @@
<description>
Sorts the array using a custom method. The arguments are an object that holds the method and the name of such 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.
[codeblock]
class MyCustomSorter:
static func sort_ascending(a, b):

View File

@ -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">

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
Concave polygon shape resource, which can be set into a [PhysicsBody] or area. This shape is created by feeding a list of triangles.
Note: when used for collision, [ConcavePolygonShape] is intended to work with static [PhysicsBody] nodes like [StaticBody] and will not work with [KinematicBody] or [RigidBody] with a mode other than Static.
[b]Note:[/b] When used for collision, [ConcavePolygonShape] is intended to work with static [PhysicsBody] nodes like [StaticBody] and will not work with [KinematicBody] or [RigidBody] with a mode other than Static.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>

View File

@ -54,7 +54,7 @@
<argument index="1" name="ciphertext" type="PoolByteArray" />
<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">
@ -63,7 +63,7 @@
<argument index="1" name="plaintext" type="PoolByteArray" />
<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">

View File

@ -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 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">
@ -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 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">

View File

@ -75,7 +75,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>

View File

@ -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, [Texture] preview, [Texture] 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">
@ -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, [Texture] preview, [Texture] 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">

View File

@ -61,7 +61,7 @@
<argument index="0" name="path" type="String" />
<description>
Loads an image from a file path and creates a texture from it.
[b]Note:[/b] the method is deprecated and will be removed in Godot 4.0, use [method Image.load] and [method create_from_image] instead.
[b]Note:[/b] This method is deprecated and will be removed in Godot 4.0, use [method Image.load] and [method create_from_image] instead.
</description>
</method>
<method name="set_data">

View File

@ -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>

View File

@ -15,11 +15,11 @@
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass">
Sets the [Material] to be used for the next pass. This renders the object again using a different material.
[b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial".
[b]Note:[/b] This only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial".
</member>
<member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0">
Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
[b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
[b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
</member>
</members>
<constants>

View File

@ -55,7 +55,7 @@
<description>
Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code].
You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available.
Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work.
[b]Note:[/b] Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work.
</description>
</method>
<method name="leave_multicast_group">
@ -83,7 +83,7 @@
<argument index="0" name="enabled" type="bool" />
<description>
Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default.
Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too.
[b]Note:[/b] Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too.
</description>
</method>
<method name="set_dest_address">
@ -92,7 +92,7 @@
<argument index="1" name="port" type="int" />
<description>
Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed.
Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]).
[b]Note:[/b] [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]).
</description>
</method>
<method name="wait">

View File

@ -27,8 +27,8 @@
</member>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( 1, -1, 1, 1, -1, 1, -1, -1 )">
The points defining the shape of the [Portal] polygon (which should be convex).
These are defined in 2D, with [code]0,0[/code] being the origin of the [Portal] node's [code]global_transform[/code].
[code]Note:[/code] These raw points are sanitized for winding order internally.
These are defined in 2D, with [code]0,0[/code] being the origin of the [Portal] node's [member Spatial.global_transform].
[b]Note:[/b] These raw points are sanitized for winding order internally.
</member>
<member name="portal_active" type="bool" setter="set_portal_active" getter="get_portal_active" default="true">
Visibility through [Portal]s can be turned on and off at runtime - this is useful for having closable doors.
@ -41,7 +41,7 @@
</member>
<member name="use_default_margin" type="bool" setter="set_use_default_margin" getter="get_use_default_margin" default="true">
In most cases you will want to use the default [Portal] margin in your portals (this is set in the [RoomManager]).
If you want to override this default, set this value to [code]false[/code], and the local [code]portal_margin[/code] will take effect.
If you want to override this default, set this value to [code]false[/code], and the local [member portal_margin] will take effect.
</member>
</members>
<constants>

View File

@ -70,7 +70,7 @@
<return type="Vector2" />
<description>
Returns the collision point at which the ray intersects the closest object.
[b]Note:[/b] this point is in the [b]global[/b] coordinate system.
[b]Note:[/b] This point is in the [b]global[/b] coordinate system.
</description>
</method>
<method name="is_colliding" qualifiers="const">

View File

@ -6,7 +6,7 @@
<description>
Capture its surroundings as a dual paraboloid image, and stores versions of it with increasing levels of blur to simulate different material roughnesses.
The [ReflectionProbe] is used to create high-quality reflections at the cost of performance. It can be combined with [GIProbe]s and Screen Space Reflections to achieve high quality reflections. [ReflectionProbe]s render all objects within their [member cull_mask], so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them.
Note: By default Godot will only render 16 reflection probes. If you need more, increase the number of atlas subdivisions. This setting can be found in [member ProjectSettings.rendering/quality/reflections/atlas_subdiv].
[b]Note:[/b] By default Godot will only render 16 reflection probes. If you need more, increase the number of atlas subdivisions. This setting can be found in [member ProjectSettings.rendering/quality/reflections/atlas_subdiv].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/3.4/tutorials/3d/reflection_probes.html</link>

View File

@ -37,7 +37,8 @@
<argument index="0" name="param" type="String" />
<argument index="1" name="value" type="Variant" />
<description>
Changes the value set for this material of a uniform in the shader. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
Changes the value set for this material of a uniform in the shader.
[b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly.
</description>
</method>
</methods>

View File

@ -199,7 +199,7 @@
</member>
<member name="flags_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 params_point_size].
[b]Note:[/b] This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size].
</member>
<member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.
@ -215,7 +215,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="Texture" setter="set_texture" getter="get_texture">
Texture used to specify metallic for an object. This is multiplied by [member metallic].

View File

@ -172,7 +172,7 @@
<argument index="0" name="value" type="String" />
<description>
Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.
Note: To put an ASCII string without prepending its size, you can use [method put_data]:
[b]Note:[/b] To put an ASCII string without prepending its size, you can use [method put_data]:
[codeblock]
put_data("Hello world".to_ascii())
[/codeblock]
@ -211,7 +211,7 @@
<argument index="0" name="value" type="String" />
<description>
Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.
Note: To put an UTF-8 string without prepending its size, you can use [method put_data]:
[b]Note:[/b] To put an UTF-8 string without prepending its size, you can use [method put_data]:
[codeblock]
put_data("Hello world".to_utf8())
[/codeblock]

View File

@ -22,7 +22,7 @@
<argument index="0" name="time_sec" type="float" default="-1" />
<description>
Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec &gt; 0[/code]. This also resets the remaining time to [code]wait_time[/code].
[b]Note:[/b] this method will not resume a paused timer. See [member paused].
[b]Note:[/b] This method will not resume a paused timer. See [member paused].
</description>
</method>
<method name="stop">

View File

@ -30,7 +30,7 @@
</member>
<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false">
If [code]true[/code], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.
[b]Note:[/b] this is a "pass-by" (not "bypass") press mode.
[b]Note:[/b] This is a "pass-by" (not "bypass") press mode.
</member>
<member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed">
The button's texture for the pressed state.

View File

@ -2317,7 +2317,8 @@
<argument index="0" name="particles" type="RID" />
<argument index="1" name="material" type="RID" />
<description>
Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material].
Sets the material for processing the particles.
[b]Note:[/b] This is not the material used to draw the materials. Equivalent to [member Particles.process_material].
</description>
</method>
<method name="particles_set_randomness_ratio">

View File

@ -137,7 +137,7 @@
<member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" override="true" enum="NetworkedMultiplayerPeer.TransferMode" default="2" />
<member name="use_dtls" type="bool" setter="set_dtls_enabled" getter="is_dtls_enabled" default="false">
When enabled, the client or server created by this peer, will use [PacketPeerDTLS] instead of raw UDP sockets for communicating with the remote peer. This will make the communication encrypted with DTLS at the cost of higher resource usage and potentially larger packet size.
Note: When creating a DTLS server, make sure you setup the key/certificate pair via [method set_dtls_key] and [method set_dtls_certificate]. For DTLS clients, have a look at the [member dtls_verify] option, and configure the certificate accordingly via [method set_dtls_certificate].
[b]Note:[/b] When creating a DTLS server, make sure you setup the key/certificate pair via [method set_dtls_key] and [method set_dtls_certificate]. For DTLS clients, have a look at the [member dtls_verify] option, and configure the certificate accordingly via [method set_dtls_certificate].
</member>
</members>
<constants>

View File

@ -38,7 +38,7 @@
<return type="Variant" />
<description>
Constructs a new object of the base type with a script of this type already attached.
[i]Note[/i]: Any arguments passed to this function will be ignored and not passed to the native constructor function. This will change with in a future API extension.
[b]Note:[/b] Any arguments passed to this function will be ignored and not passed to the native constructor function. This will change with in a future API extension.
</description>
</method>
</methods>

View File

@ -26,7 +26,8 @@
<method name="close">
<return type="void" />
<description>
Close the peer connection and all data channels associated with it. Note, you cannot reuse this object for a new connection unless you call [method initialize].
Close the peer connection and all data channels associated with it.
[b]Note:[/b] You cannot reuse this object for a new connection unless you call [method initialize].
</description>
</method>
<method name="create_data_channel">