diff options
79 files changed, 320 insertions, 317 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e622edb4..15eab180fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -338,7 +338,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). #### Rendering - Some Environment settings such as depth of field have been moved to a CameraEffects resource which is assigned to individual Camera nodes. -- [The ACES Fitted tonemapping algoirthm is now used in place of the old ACES algorithm.](https://github.com/godotengine/godot/pull/52476) +- [The ACES Fitted tonemapping algorithm is now used in place of the old ACES algorithm.](https://github.com/godotengine/godot/pull/52476) - The old non-fitted ACES tonemapping algorithm was removed. - Quality settings have been moved from individual nodes and resources to the Project Settings for better centralization. - Quality settings now have performance hints in their values' names, such as "Fast" or "Slow". diff --git a/core/core_bind.cpp b/core/core_bind.cpp index fe026ed38f..85df8249ff 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -2297,7 +2297,7 @@ void Engine::register_singleton(const StringName &p_name, Object *p_object) { ; } void Engine::unregister_singleton(const StringName &p_name) { - ERR_FAIL_COND_MSG(!has_singleton(p_name), "Attempt to remove unregisteres singleton: " + String(p_name)); + ERR_FAIL_COND_MSG(!has_singleton(p_name), "Attempt to remove unregistered singleton: " + String(p_name)); ERR_FAIL_COND_MSG(!::Engine::get_singleton()->is_singleton_user_created(p_name), "Attempt to remove non-user created singleton: " + String(p_name)); ::Engine::get_singleton()->remove_singleton(p_name); } diff --git a/core/multiplayer/multiplayer_replicator.cpp b/core/multiplayer/multiplayer_replicator.cpp index c57562552a..984d5eeb60 100644 --- a/core/multiplayer/multiplayer_replicator.cpp +++ b/core/multiplayer/multiplayer_replicator.cpp @@ -124,7 +124,7 @@ void MultiplayerReplicator::_process_default_sync(const ResourceUID::ID &p_id, c ERR_FAIL_COND_MSG(p_packet_len < SYNC_CMD_OFFSET + 5, "Invalid spawn packet received"); ERR_FAIL_COND_MSG(!replications.has(p_id), "Invalid spawn ID received " + itos(p_id)); SceneConfig &cfg = replications[p_id]; - ERR_FAIL_COND_MSG(cfg.mode != REPLICATION_MODE_SERVER || multiplayer->is_server(), "The defualt implementation only allows sync packets from the server"); + ERR_FAIL_COND_MSG(cfg.mode != REPLICATION_MODE_SERVER || multiplayer->is_server(), "The default implementation only allows sync packets from the server"); const bool same_size = p_packet[0] & BYTE_OR_ZERO_FLAG; int ofs = SYNC_CMD_OFFSET; int time = p_packet[ofs]; diff --git a/core/string/optimized_translation.h b/core/string/optimized_translation.h index bccf932383..bef7ca993d 100644 --- a/core/string/optimized_translation.h +++ b/core/string/optimized_translation.h @@ -38,7 +38,7 @@ class OptimizedTranslation : public Translation { //this translation uses a sort of modified perfect hash algorithm //it requires hashing strings twice and then does a binary search, - //so it's slower, but at the same time it has an extreemly high chance + //so it's slower, but at the same time it has an extremely high chance //of catching untranslated strings //load/store friendly types diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 161e6278a2..e874bcc0f3 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1256,13 +1256,13 @@ Aligns inline object (e.g. image, table) to the bottom of the text. </constant> <constant name="INLINE_ALIGNMENT_TOP" value="0" enum="InlineAlignment"> - Aligns top of the inline object (e.g. image, table) to the top of the text. Equvalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code]. + Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code]. </constant> <constant name="INLINE_ALIGNMENT_CENTER" value="5" enum="InlineAlignment"> - Aligns center of the inline object (e.g. image, table) to the center of the text. Equvalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code]. + Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code]. </constant> <constant name="INLINE_ALIGNMENT_BOTTOM" value="14" enum="InlineAlignment"> - Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]. + Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]. </constant> <constant name="KEY_SPECIAL" value="16777216" enum="Key"> Keycodes with this bit applied are non-printable. diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 1bcc9689aa..90663bfaa5 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -142,7 +142,7 @@ Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> - The camera's relative offset. Useful for looking around or camera shake animations. The offseted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right]. + The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right]. </member> <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1"> The camera's process callback. See [enum Camera2DProcessCallback]. diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 59da64314b..697b0443f1 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -234,7 +234,7 @@ <method name="get_folded_lines" qualifiers="const"> <return type="int[]" /> <description> - Return all lines that are current folded. + Returns all lines that are current folded. </description> </method> <method name="get_text_for_code_completion" qualifiers="const"> @@ -288,7 +288,7 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="column" type="int" default="-1" /> <description> - Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. + Returns delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. </description> </method> <method name="is_in_string" qualifiers="const"> @@ -296,7 +296,7 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="column" type="int" default="-1" /> <description> - Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. + Returns the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. </description> </method> <method name="is_line_bookmarked" qualifiers="const"> diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml index 064be0c29d..efd8f618e7 100644 --- a/doc/classes/CodeHighlighter.xml +++ b/doc/classes/CodeHighlighter.xml @@ -76,21 +76,21 @@ <return type="bool" /> <argument index="0" name="start_key" type="String" /> <description> - Return [code]true[/code] if the start key exists, else [code]false[/code]. + Returns [code]true[/code] if the start key exists, else [code]false[/code]. </description> </method> <method name="has_keyword_color" qualifiers="const"> <return type="bool" /> <argument index="0" name="keyword" type="String" /> <description> - Return [code]true[/code] if the keyword exists, else [code]false[/code]. + Returns [code]true[/code] if the keyword exists, else [code]false[/code]. </description> </method> <method name="has_member_keyword_color" qualifiers="const"> <return type="bool" /> <argument index="0" name="member_keyword" type="String" /> <description> - Return [code]true[/code] if the member keyword exists, else [code]false[/code]. + Returns [code]true[/code] if the member keyword exists, else [code]false[/code]. </description> </method> <method name="remove_color_region"> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 21d17969e2..f3fcd90f51 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -4,7 +4,7 @@ Color in RGBA format using floats on the range of 0 to 1. </brief_description> <description> - A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). + A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. @@ -30,10 +30,10 @@ Constructs a [Color] from an existing color, but with a custom alpha value. [codeblocks] [gdscript] - var red = Color(Color.red, 0.5) # 50% transparent red. + var red = Color(Color.red, 0.2) # 20% opaque red. [/gdscript] [csharp] - var red = new Color(Colors.Red, 0.5f); // 50% transparent red. + var red = new Color(Colors.Red, 0.2f); // 20% opaque red. [/csharp] [/codeblocks] </description> @@ -405,7 +405,7 @@ </methods> <members> <member name="a" type="float" setter="" getter="" default="1.0"> - The color's alpha (transparency) component, typically on the range of 0 to 1. + The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque. </member> <member name="a8" type="int" setter="" getter="" default="255"> Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 22439f6ca5..cb543afaba 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -41,7 +41,7 @@ If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true"> - If [code]true[/code], shows an alpha channel slider (transparency). + If [code]true[/code], shows an alpha channel slider (opacity). </member> <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false"> If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders. diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 39f8980b2c..3d8199831d 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -201,7 +201,7 @@ <argument index="1" name="text" type="String" /> <description> User defined BiDi algorithm override function. - Return [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately. + Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="accept_event"> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index ec7583e68b..62f8f00a82 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -20,7 +20,7 @@ </methods> <members> <member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()"> - The polygon's list of vertices. Can be in either clockwise or counterclockwise order. + The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points. </member> </members> </class> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 111da858ea..9e56a41fee 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -14,7 +14,7 @@ <method name="is_public_only" qualifiers="const"> <return type="bool" /> <description> - Return [code]true[/code] if this CryptoKey only has the public part, and not the private one. + Returns [code]true[/code] if this CryptoKey only has the public part, and not the private one. </description> </method> <method name="load"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 1ca69057b4..a41875385c 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -392,7 +392,7 @@ <method name="screen_get_max_scale" qualifiers="const"> <return type="float" /> <description> - Return the greatest scale factor of all screens. + Returns the greatest scale factor of all screens. [b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases. [b]Note:[/b] This method is implemented on macOS. </description> @@ -413,7 +413,7 @@ <return type="float" /> <argument index="0" name="screen" type="int" default="-1" /> <description> - Return the scale factor of the specified screen by index. + Returns the scale factor of the specified screen by index. [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases. [b]Note:[/b] This method is implemented on macOS. </description> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index 1f98781bbd..50c227dc0a 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -163,7 +163,7 @@ } [/csharp] [/codeblocks] - Return [code]true[/code] to make all options always visible. + Returns [code]true[/code] to make all options always visible. </description> </method> <method name="_get_preset_count" qualifiers="virtual const"> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 275d6b6577..3537fc0b66 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -222,7 +222,7 @@ <return type="float" /> <argument index="0" name="size" type="int" default="16" /> <description> - Return average pixel offset of the underline below the baseline. + Returns average pixel offset of the underline below the baseline. [b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. </description> </method> @@ -230,7 +230,7 @@ <return type="float" /> <argument index="0" name="size" type="int" default="16" /> <description> - Return average thickness of the underline. + Returns average thickness of the underline. [b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. </description> </method> @@ -238,7 +238,7 @@ <return type="bool" /> <argument index="0" name="char" type="int" /> <description> - Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. + Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> <method name="remove_data"> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index c403d238c5..0c8386784e 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -259,7 +259,7 @@ <return type="Array" /> <argument index="0" name="cache_index" type="int" /> <description> - Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. + Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. </description> </method> <method name="get_spacing" qualifiers="const"> @@ -343,7 +343,7 @@ <return type="bool" /> <argument index="0" name="char" type="int" /> <description> - Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. + Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> <method name="is_antialiased" qualifiers="const"> @@ -355,7 +355,7 @@ <method name="is_force_autohinter" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. + Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="is_language_supported" qualifiers="const"> @@ -519,7 +519,7 @@ <return type="void" /> <argument index="0" name="force_autohinter" type="bool" /> <description> - If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + If set to [code]true[/code] auto-hinting is preferred over font built-in hinting. </description> </method> <method name="set_glyph_advance"> diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml index 0f97cc1d0a..7bf40f860b 100644 --- a/doc/classes/MultiplayerReplicator.xml +++ b/doc/classes/MultiplayerReplicator.xml @@ -106,8 +106,8 @@ <argument index="3" name="custom_send" type="Callable" /> <argument index="4" name="custom_receive" type="Callable" /> <description> - Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess. - Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances). + Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the synchronization proecess. + Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is highly recommended when dealing with many instances). </description> </method> <method name="track"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index ffc02f09a9..1ed4b335ad 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -348,7 +348,7 @@ <method name="get_static_memory_usage" qualifiers="const"> <return type="int" /> <description> - Returns the amount of static memory being used by the program in bytes. + Returns the amount of static memory being used by the program in bytes (only works in debug). </description> </method> <method name="get_system_dir" qualifiers="const"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 860e252805..e796cb2298 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -30,6 +30,7 @@ </description> <tutorials> <link title="When and how to avoid using nodes for everything">$DOCS_URL/tutorials/best_practices/node_alternatives.html</link> + <link title="Object notifications">$DOCS_URL/tutorials/best_practices/godot_notifications.html</link> </tutorials> <methods> <method name="_get" qualifiers="virtual"> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index d2261ed4cc..6cf0ea2a93 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -15,14 +15,14 @@ <return type="float" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Return the maximum value range for the given prameter. + Returns the maximum value range for the given parameter. </description> </method> <method name="get_param_min" qualifiers="const"> <return type="float" /> <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Return the minimum value range for the given parameter. + Returns the minimum value range for the given parameter. </description> </method> <method name="get_param_texture" qualifiers="const"> @@ -199,7 +199,7 @@ Minimum initial velocity. </member> <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> - Particle lifetime randomness ratio. The lifetime will be multipled by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value. + Particle lifetime randomness ratio. The lifetime will be multiplied by a value interpolated between [code]1.0[/code] and a random number less than one. For example a random ratio of [code]0.4[/code] would scale the original lifetime between [code]0.4-1.0[/code] of its original value. </member> <member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml index 355365cf25..060641caff 100644 --- a/doc/classes/PhysicsTestMotionResult2D.xml +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -12,55 +12,55 @@ <method name="get_collider" qualifiers="const"> <return type="Object" /> <description> - Returns the colliding body's attached [Object], if a collision occured. + Returns the colliding body's attached [Object], if a collision occurred. </description> </method> <method name="get_collider_id" qualifiers="const"> <return type="int" /> <description> - Returns the unique instance ID of the colliding body's attached [Object], if a collision occured. See [method Object.get_instance_id]. + Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id]. </description> </method> <method name="get_collider_rid" qualifiers="const"> <return type="RID" /> <description> - Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occured. + Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred. </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <description> - Returns the colliding body's shape index, if a collision occured. See [CollisionObject2D]. + Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D]. </description> </method> <method name="get_collider_velocity" qualifiers="const"> <return type="Vector2" /> <description> - Returns the colliding body's velocity, if a collision occured. + Returns the colliding body's velocity, if a collision occurred. </description> </method> <method name="get_collision_depth" qualifiers="const"> <return type="float" /> <description> - Returns the length of overlap along the collision normal, if a collision occured. + Returns the length of overlap along the collision normal, if a collision occurred. </description> </method> <method name="get_collision_local_shape" qualifiers="const"> <return type="int" /> <description> - Returns the moving object's colliding shape, if a collision occured. + Returns the moving object's colliding shape, if a collision occurred. </description> </method> <method name="get_collision_normal" qualifiers="const"> <return type="Vector2" /> <description> - Returns the colliding body's shape's normal at the point of collision, if a collision occured. + Returns the colliding body's shape's normal at the point of collision, if a collision occurred. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector2" /> <description> - Returns the point of collision in global coordinates, if a collision occured. + Returns the point of collision in global coordinates, if a collision occurred. </description> </method> <method name="get_collision_safe_fraction" qualifiers="const"> @@ -72,7 +72,7 @@ <method name="get_collision_unsafe_fraction" qualifiers="const"> <return type="float" /> <description> - Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code]. + Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code]. </description> </method> <method name="get_remainder" qualifiers="const"> diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml index 282c140568..96029937da 100644 --- a/doc/classes/PhysicsTestMotionResult3D.xml +++ b/doc/classes/PhysicsTestMotionResult3D.xml @@ -13,35 +13,35 @@ <return type="Object" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured. + Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collider_id" qualifiers="const"> <return type="int" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occured. See [method Object.get_instance_id]. + Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id]. </description> </method> <method name="get_collider_rid" qualifiers="const"> <return type="RID" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occured. + Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occured. See [CollisionObject3D]. + Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D]. </description> </method> <method name="get_collider_velocity" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occured. + Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collision_count" qualifiers="const"> @@ -54,28 +54,28 @@ <return type="float" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occured. + Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collision_local_shape" qualifiers="const"> <return type="int" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occured. + Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collision_normal" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occured. + Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector3" /> <argument index="0" name="collision_index" type="int" default="0" /> <description> - Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occured. + Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. </description> </method> <method name="get_collision_safe_fraction" qualifiers="const"> @@ -87,7 +87,7 @@ <method name="get_collision_unsafe_fraction" qualifiers="const"> <return type="float" /> <description> - Returns the minimum fraction of the motion needed to collide, if a collision occured, between [code]0[/code] and [code]1[/code]. + Returns the minimum fraction of the motion needed to collide, if a collision occurred, between [code]0[/code] and [code]1[/code]. </description> </method> <method name="get_remainder" qualifiers="const"> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index e804e7bf24..aa56f852a7 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -297,7 +297,7 @@ <argument index="3" name="persistent" type="bool" default="false" /> <description> Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose. </description> </method> @@ -309,7 +309,7 @@ <argument index="3" name="persistent" type="bool" default="false" /> <description> Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose. </description> </method> diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml index c544473163..90ccd8f42e 100644 --- a/doc/classes/SkeletonModification3D.xml +++ b/doc/classes/SkeletonModification3D.xml @@ -60,7 +60,7 @@ When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D]. </member> <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0"> - The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes. + The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes. </member> </members> </class> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml index 55777ab0f4..606dce4961 100644 --- a/doc/classes/SkeletonModification3DCCDIK.xml +++ b/doc/classes/SkeletonModification3DCCDIK.xml @@ -4,7 +4,7 @@ A modification that uses CCDIK to manipulate a series of bones to reach a target. </brief_description> <description> - This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to maniuplate a chain of bones in a Skeleton so it reaches a defined target. + This [SkeletonModification3D] uses an algorithm called Cyclic Coordinate Descent Inverse Kinematics, or CCDIK, to manipulate a chain of bones in a Skeleton so it reaches a defined target. CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml index 1c69ad7b3f..7c1a021c44 100644 --- a/doc/classes/SkeletonModification3DFABRIK.xml +++ b/doc/classes/SkeletonModification3DFABRIK.xml @@ -24,7 +24,7 @@ <return type="bool" /> <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indiciates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + Returns a boolean that indicates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. </description> </method> <method name="get_fabrik_joint_bone_index" qualifiers="const"> @@ -66,7 +66,7 @@ <return type="bool" /> <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean indiciating whether the FABRIK joint uses the target's [Basis] for its rotation. + Returns a boolean indicating whether the FABRIK joint uses the target's [Basis] for its rotation. [b]Note:[/b] This option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. </description> </method> diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml index 3c724229bd..605b28363b 100644 --- a/doc/classes/SkeletonModification3DJiggle.xml +++ b/doc/classes/SkeletonModification3DJiggle.xml @@ -56,7 +56,7 @@ <return type="bool" /> <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification. + Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification. </description> </method> <method name="get_jiggle_joint_roll" qualifiers="const"> @@ -77,7 +77,7 @@ <return type="bool" /> <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not. + Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not. </description> </method> <method name="get_use_colliders" qualifiers="const"> diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml index 0e83cd0b28..2edcda6bfd 100644 --- a/doc/classes/SkeletonModification3DTwoBoneIK.xml +++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml @@ -4,7 +4,7 @@ A modification that moves two bones to reach the target. </brief_description> <description> - This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones. + This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results. A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach. </description> diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml index 4035e39410..032fe6e032 100644 --- a/doc/classes/SkeletonModificationStack3D.xml +++ b/doc/classes/SkeletonModificationStack3D.xml @@ -43,7 +43,7 @@ <method name="get_is_setup" qualifiers="const"> <return type="bool" /> <description> - Returns a boolean that indiciates whether the modification stack is setup and can execute. + Returns a boolean that indicates whether the modification stack is setup and can execute. </description> </method> <method name="get_modification" qualifiers="const"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index cd6fc10931..d86c577e5e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -340,7 +340,7 @@ <return type="String" /> <argument index="0" name="parts" type="PackedStringArray" /> <description> - Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method. + Returns a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method. Example: [codeblocks] [gdscript] diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index d6738bfb89..26ad20e85b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -201,7 +201,7 @@ <method name="get_last_full_visible_line" qualifiers="const"> <return type="int" /> <description> - Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. + Returns the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. </description> </method> <method name="get_last_full_visible_line_wrap_index" qualifiers="const"> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index 6a510e4a74..ff193a0e4b 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -113,7 +113,7 @@ <method name="get_dropcap_rid" qualifiers="const"> <return type="RID" /> <description> - Return drop cap text buffer RID. + Returns drop cap text buffer RID. </description> </method> <method name="get_dropcap_size" qualifiers="const"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 6da45fdd4a..443716435a 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -244,7 +244,7 @@ <return type="int" /> <argument index="0" name="font_rid" type="RID" /> <description> - Return the width of the range around the shape between the minimum and maximum representable signed distance. + Returns the width of the range around the shape between the minimum and maximum representable signed distance. </description> </method> <method name="font_get_msdf_size" qualifiers="const"> @@ -295,7 +295,7 @@ <return type="Array" /> <argument index="0" name="font_rid" type="RID" /> <description> - Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. + Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. </description> </method> <method name="font_get_spacing" qualifiers="const"> @@ -382,7 +382,7 @@ <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="char" type="int" /> <description> - Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. + Returns [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> <method name="font_is_antialiased" qualifiers="const"> @@ -396,7 +396,7 @@ <return type="bool" /> <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. + Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="font_is_language_supported" qualifiers="const"> @@ -541,7 +541,7 @@ <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="force_autohinter" type="bool" /> <description> - If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + If set to [code]true[/code] auto-hinting is preferred over font built-in hinting. </description> </method> <method name="font_set_global_oversampling"> @@ -549,7 +549,7 @@ <argument index="0" name="oversampling" type="float" /> <description> Sets oversampling factor, shared by all font in the TextServer. - [b]Note:[/b] This value can be automaticaly changed by display server. + [b]Note:[/b] This value can be automatically changed by display server. </description> </method> <method name="font_set_glyph_advance"> @@ -1384,7 +1384,7 @@ <constant name="OVERRUN_JUSTIFICATION_AWARE" value="16" enum="TextOverrunFlag"> </constant> <constant name="GRAPHEME_IS_VALID" value="1" enum="GraphemeFlag"> - Grapheme is supprted by the font, and can be drawn. + Grapheme is supported by the font, and can be drawn. </constant> <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag"> Grapheme is part of right-to-left or bottom-to-top run. diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index af558150e2..fb4ac630ba 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -396,7 +396,7 @@ <return type="bool" /> <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. + Returns [code]true[/code] if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="_font_is_language_supported" qualifiers="virtual const"> @@ -542,7 +542,7 @@ <argument index="0" name="font_rid" type="RID" /> <argument index="1" name="fixed_size" type="int" /> <description> - If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + If set to [code]true[/code] auto-hinting is preferred over font built-in hinting. </description> </method> <method name="_font_set_force_autohinter" qualifiers="virtual"> @@ -557,7 +557,7 @@ <argument index="0" name="oversampling" type="float" /> <description> Sets oversampling factor, shared by all font in the TextServer. - [b]Note:[/b] This value can be automaticaly changed by display server. + [b]Note:[/b] This value can be automatically changed by display server. </description> </method> <method name="_font_set_glyph_advance" qualifiers="virtual"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 6e552e3649..e37031f3fd 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -69,7 +69,7 @@ <description> Triggers an update of the TileMap. If [code]layer[/code] is provided, only updates the given layer. [b]Note:[/b] The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in [method _tile_data_runtime_update]) need to be applied. - [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example). + [b]Warning:[/b] Updating the TileMap is a performance demanding task. Limit occurrences of those updates to the minimum and limit the amount tiles they impact (by segregating tiles updated often to a dedicated layer for example). </description> </method> <method name="get_cell_alternative_tile" qualifiers="const"> @@ -103,7 +103,7 @@ <return type="Vector2i" /> <argument index="0" name="body" type="RID" /> <description> - Returns the coodinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile. + Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile. </description> </method> <method name="get_layer_modulate" qualifiers="const"> @@ -144,7 +144,7 @@ <argument index="0" name="coords" type="Vector2i" /> <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" /> <description> - Returns the neighboring cell to the one at coordinates [code]coords[/code], indentified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take. + Returns the neighboring cell to the one at coordinates [code]coords[/code], identified by the [code]neighbor[/code] direction. This method takes into account the different layouts a TileMap can take. </description> </method> <method name="get_pattern"> @@ -195,7 +195,7 @@ <argument index="1" name="coords_in_pattern" type="Vector2i" /> <argument index="2" name="pattern" type="TileMapPattern" /> <description> - Returns for the given coodinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code] + Returns for the given coordinate [code]coords_in_pattern[/code] in a [TileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [code]position_in_tilemap[/code] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code] </description> </method> <method name="map_to_world" qualifiers="const"> @@ -229,7 +229,7 @@ <argument index="4" name="alternative_tile" type="int" default="-1" /> <description> Sets the tile indentifiers for the cell on layer [code]layer[/code] at coordinates [code]coords[/code]. Each tile of the [TileSet] is identified using three parts: - - The source indentifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], + - The source identifier [code]source_id[/code] identifies a [TileSetSource] identifier. See [method TileSet.set_source_id], - The atlas coordinates identifier [code]atlas_coords[/code] identifies a tile coordinates in the atlas (if the source is a [TileSetAtlasSource]. For [TileSetScenesCollectionSource] it should be 0), - The alternative tile identifier [code]alternative_tile[/code] identifies a tile alternative the source is a [TileSetAtlasSource], and the scene for a [TileSetScenesCollectionSource]. </description> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 5d9065f823..6fc92f6a31 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -51,7 +51,7 @@ <argument index="0" name="pattern" type="TileMapPattern" /> <argument index="1" name="index" type="int" default="-1" /> <description> - Adds a [TileMapPattern] to be stored in the TileSet resouce. If provided, insert it at the given [code]index[/code]. + Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [code]index[/code]. </description> </method> <method name="add_physics_layer"> @@ -582,7 +582,7 @@ Diamond tile shape (for isometric look). </constant> <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape"> - Rectangular tile shape with one row/colum out of two offset by half a tile. + Rectangular tile shape with one row/column out of two offset by half a tile. </constant> <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape"> Hexagonal tile shape. diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml index 3451519ff6..f62ba7a337 100644 --- a/doc/classes/TileSetScenesCollectionSource.xml +++ b/doc/classes/TileSetScenesCollectionSource.xml @@ -4,8 +4,8 @@ Exposes a set of scenes as tiles for a [TileSet] resource. </brief_description> <description> - When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instanciate an assiciated scene at the cell's position in the TileMap. - Scenes are instanciated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instanciate/free the scene accordingly. + When placed on a [TileMap], tiles from [TileSetScenesCollectionSource] will automatically instantiate an associated scene at the cell's position in the TileMap. + Scenes are instantiated as children of the [TileMap] when it enters the tree. If you add/remove a scene tile in the [TileMap] that is already inside the tree, the [TileMap] will automatically instantiate/free the scene accordingly. </description> <tutorials> </tutorials> @@ -87,7 +87,7 @@ <argument index="0" name="id" type="int" /> <argument index="1" name="packed_scene" type="PackedScene" /> <description> - Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positionning properties are needed to place the scene on the TileMap. + Assigns a [PackedScene] resource to the scene tile with id [code]id[/code]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap. </description> </method> </methods> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 044460f569..0bb64fb845 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -162,7 +162,7 @@ <method name="get_history_count"> <return type="int" /> <description> - Return how many elements are in the history. + Returns how many elements are in the history. </description> </method> <method name="get_version" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index f3c2d743b6..7e773a0249 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -271,7 +271,7 @@ <return type="Vector2" /> <argument index="0" name="n" type="Vector2" /> <description> - Returns the vector reflected from a plane defined by the given normal. + Returns the vector reflected (ie mirrored, or symmetric) over a line defined by the given direction vector [code]n[/code]. </description> </method> <method name="rotated" qualifiers="const"> diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 2dd90f52af..9686a8d9a8 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -10279,7 +10279,7 @@ msgstr "" #: doc/classes/BakedLightmap.xml msgid "" -"Determines the amount of samples per texel used in indrect light baking. The " +"Determines the amount of samples per texel used in indirect light baking. The " "amount of samples for each quality level can be configured in the project " "settings." msgstr "" @@ -22770,7 +22770,7 @@ msgstr "" #: doc/classes/Environment.xml msgid "" -"Academy Color Encoding System tonemapper operator. Performs an aproximation " +"Academy Color Encoding System tonemapper operator. Performs an approximation " "of the ACES tonemapping curve." msgstr "" @@ -42154,14 +42154,14 @@ msgid "" "This method is potentially slower than [code]decompress[/code], as it may " "have to re-allocate it's output buffer multiple times while decompressing, " "where as [code]decompress[/code] knows it's output buffer size from the " -"begining.\n" +"beginning.\n" "\n" "GZIP has a maximal compression ratio of 1032:1, meaning it's very possible " "for a small compressed payload to decompress to a potentially very large " "output. To guard against this, you may provide a maximum size this function " "is allowed to allocate in bytes via [code]max_output_size[/code]. Passing -1 " "will allow for unbounded output. If any positive value is passed, and the " -"decompression exceeds that ammount in bytes, then an error will be returned." +"decompression exceeds that amount in bytes, then an error will be returned." msgstr "" #: doc/classes/PoolByteArray.xml @@ -45759,7 +45759,7 @@ msgid "" "If you accidentally build your level with portals facing the wrong way, this " "setting can fix the problem.\n" "It will flip named portal meshes (i.e. [code]-portal[/code]) on the initial " -"convertion to [Portal] nodes." +"conversion to [Portal] nodes." msgstr "" #: doc/classes/ProjectSettings.xml @@ -46450,7 +46450,7 @@ msgid "" "result, it should not be depended upon for reproducible random streams " "across Godot versions.\n" "To generate a random float number (within a given range) based on a time-" -"dependant seed:\n" +"dependent seed:\n" "[codeblock]\n" "var rng = RandomNumberGenerator.new()\n" "func _ready():\n" @@ -69589,7 +69589,7 @@ msgid "" "signals is the same id as used in [member ARVRController.controller_id].\n" "You can use one or all of these methods to allow your game or app to support " "a wider or narrower set of devices and input methods, or to allow more " -"advanced interations with more advanced devices." +"advanced interactions with more advanced devices." msgstr "" #: modules/webxr/doc_classes/WebXRInterface.xml diff --git a/drivers/gles3/rasterizer_canvas_batcher.h b/drivers/gles3/rasterizer_canvas_batcher.h index c7345824ab..530965dd9d 100644 --- a/drivers/gles3/rasterizer_canvas_batcher.h +++ b/drivers/gles3/rasterizer_canvas_batcher.h @@ -465,7 +465,7 @@ public: TransformMode orig_transform_mode; // support for extra matrices - bool extra_matrix_sent; // whether sent on this item (in which case sofware transform can't be used untl end of item) + bool extra_matrix_sent; // whether sent on this item (in which case software transform can't be used untl end of item) int transform_extra_command_number_p1; // plus one to allow fast checking against zero Transform2D transform_combined; // final * extra }; diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index de2aa0fc48..c2f3908395 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -1610,7 +1610,7 @@ FRAGMENT_SHADER_CODE specular_light *= specular * metallic * albedo * 2.0; #else - // scales the specular reflections, needs to be be computed before lighting happens, + // scales the specular reflections, needs to be computed before lighting happens, // but after environment and reflection probes are added //TODO: this curve is not really designed for gammaspace, should be adjusted const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); diff --git a/editor/debugger/debug_adapter/debug_adapter_parser.cpp b/editor/debugger/debug_adapter/debug_adapter_parser.cpp index 485d58f4a3..cfe30581d2 100644 --- a/editor/debugger/debug_adapter/debug_adapter_parser.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_parser.cpp @@ -109,7 +109,7 @@ Dictionary DebugAdapterParser::prepare_error_response(const Dictionary &p_params case DAP::ErrorType::UNKNOWN: default: error = "unknown"; - error_desc = "An unknown error has ocurred when processing the request."; + error_desc = "An unknown error has occurred when processing the request."; break; } @@ -412,7 +412,7 @@ Dictionary DebugAdapterParser::req_scopes(const Dictionary &p_params) const { } Dictionary DebugAdapterParser::req_variables(const Dictionary &p_params) const { - // If _remaining_vars > 0, the debugee is still sending a stack dump to the editor. + // If _remaining_vars > 0, the debuggee is still sending a stack dump to the editor. if (DebugAdapterProtocol::get_singleton()->_remaining_vars > 0) { return Dictionary(); } diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index a53938e3f1..2643f6e31c 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1799,7 +1799,7 @@ Array EditorInspectorArray::_extract_properties_as_array(const List<PropertyInfo dict[format_string] = object->get(pi.name); output[array_index] = dict; } else { - WARN_PRINT(vformat("Array element %s has an index too high. Array allocaiton failed.", pi.name)); + WARN_PRINT(vformat("Array element %s has an index too high. Array allocation failed.", pi.name)); } } } @@ -2766,7 +2766,7 @@ void EditorInspector::update_tree() { doc_hint = descr; } - // Seach for the inspector plugin that will handle the properties. Then add the correct property editor to it. + // Search for the inspector plugin that will handle the properties. Then add the correct property editor to it. for (Ref<EditorInspectorPlugin> &ped : valid_plugins) { bool exclusive = ped->parse_property(object, p.type, p.name, p.hint, p.hint_string, p.usage, wide_editors); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 1ac1d6f048..402df52784 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -142,7 +142,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { if (builtin_list.has(shortcut_definition.key)) { // This shortcut was auto-generated from built in actions: don't save. - // If the builtin is overriden, it will be saved in the "builtin_action_overrides" section below. + // If the builtin is overridden, it will be saved in the "builtin_action_overrides" section below. continue; } diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 89c62ab5cb..f0a5895401 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -392,7 +392,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const bool can_s3tc = ProjectSettings::get_singleton()->get("rendering/textures/vram_compression/import_s3tc"); if (can_bptc) { - formats_imported.push_back("bptc"); //needs to be aded anyway + formats_imported.push_back("bptc"); // Needs to be added anyway. } bool can_compress_hdr = hdr_compression > 0; diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index bb5ef0f6eb..9c1f600eaa 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -1110,7 +1110,7 @@ void fragment() { )"); selected_mat->set_shader(selected_sh); - // Regist properties in editor settings. + // Register properties in editor settings. EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4)); EDITOR_DEF("editors/3d_gizmos/gizmo_colors/selected_bone", Color(0.8, 0.3, 0.0)); EDITOR_DEF("editors/3d_gizmos/gizmo_settings/bone_axis_length", (float)0.1); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index abe1bcf9e5..7891c6f440 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -810,7 +810,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: //late init for performance color_picker = memnew(ColorPicker); color_picker->set_deferred_mode(true); - add_child(color_picker); + value_vbox->add_child(color_picker); color_picker->hide(); color_picker->connect("color_changed", callable_mp(this, &CustomPropertyEditor::_color_changed)); diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index b9be7535dc..e4356c89c2 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1760,7 +1760,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { } int face_count = extrusions * extrusion_face_count + end_count * shape_face_count; - // Intialize variables used to create the mesh. + // Initialize variables used to create the mesh. Ref<Material> material = get_material(); Vector<Vector3> faces; diff --git a/modules/enet/doc_classes/ENetConnection.xml b/modules/enet/doc_classes/ENetConnection.xml index fcdf282a7d..d6b0553eba 100644 --- a/modules/enet/doc_classes/ENetConnection.xml +++ b/modules/enet/doc_classes/ENetConnection.xml @@ -50,7 +50,7 @@ <argument index="2" name="channels" type="int" default="0" /> <argument index="3" name="data" type="int" default="0" /> <description> - Initiates a connection to a foreign [code]address[/code] using the specified [code]port[/code] and allocting the requested [code]channels[/code]. Optional [code]data[/code] can be passed during connection in the form of a 32 bit integer. + Initiates a connection to a foreign [code]address[/code] using the specified [code]port[/code] and allocating the requested [code]channels[/code]. Optional [code]data[/code] can be passed during connection in the form of a 32 bit integer. [b]Note:[/b] You must call either [method create_host] or [method create_host_bound] before calling this method. </description> </method> @@ -61,7 +61,7 @@ <argument index="2" name="in_bandwidth" type="int" default="0" /> <argument index="3" name="out_bandwidth" type="int" default="0" /> <description> - Create an ENetHost that will allow up to [code]max_peers[/code] connected peers, each allocating up to [code]max_channels[/code] channels, optionally limiting bandwith to [code]in_bandwidth[/code] and [code]out_bandwidth[/code]. + Create an ENetHost that will allow up to [code]max_peers[/code] connected peers, each allocating up to [code]max_channels[/code] channels, optionally limiting bandwidth to [code]in_bandwidth[/code] and [code]out_bandwidth[/code]. </description> </method> <method name="create_host_bound"> @@ -174,7 +174,7 @@ A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected. </constant> <constant name="EVENT_DISCONNECT" value="2" enum="EventType"> - A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by [method ENetPacketPeer.peer_disconnect], if a peer has timed out, or if a connection request intialized by [method connect_to_host] has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. + A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by [method ENetPacketPeer.peer_disconnect], if a peer has timed out, or if a connection request initialized by [method connect_to_host] has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. </constant> <constant name="EVENT_RECEIVE" value="3" enum="EventType"> A packet has been received from a peer. The array will contain the peer which sent the packet, the channel number upon which the packet was received, and the received packet. diff --git a/modules/enet/doc_classes/ENetMultiplayerPeer.xml b/modules/enet/doc_classes/ENetMultiplayerPeer.xml index d2456d3360..723149843a 100644 --- a/modules/enet/doc_classes/ENetMultiplayerPeer.xml +++ b/modules/enet/doc_classes/ENetMultiplayerPeer.xml @@ -62,7 +62,7 @@ <return type="ENetPacketPeer" /> <argument index="0" name="id" type="int" /> <description> - Return the [ENetPacketPeer] associated to the given [code]id[/code]. + Returns the [ENetPacketPeer] associated to the given [code]id[/code]. </description> </method> <method name="set_bind_ip"> diff --git a/modules/enet/enet_multiplayer_peer.cpp b/modules/enet/enet_multiplayer_peer.cpp index cb22d349f8..da42e81ebe 100644 --- a/modules/enet/enet_multiplayer_peer.cpp +++ b/modules/enet/enet_multiplayer_peer.cpp @@ -107,7 +107,7 @@ Error ENetMultiplayerPeer::add_mesh_peer(int p_id, Ref<ENetConnection> p_host) { ERR_FAIL_COND_V_MSG(active_mode != MODE_MESH, ERR_UNCONFIGURED, "The multiplayer instance is not configured as a mesh. Call 'create_mesh' first."); List<Ref<ENetPacketPeer>> host_peers; p_host->get_peers(host_peers); - ERR_FAIL_COND_V_MSG(host_peers.size() != 1 || host_peers[0]->get_state() != ENetPacketPeer::STATE_CONNECTED, ERR_INVALID_PARAMETER, "The provided host must have excatly one peer in the connected state."); + ERR_FAIL_COND_V_MSG(host_peers.size() != 1 || host_peers[0]->get_state() != ENetPacketPeer::STATE_CONNECTED, ERR_INVALID_PARAMETER, "The provided host must have exactly one peer in the connected state."); hosts[p_id] = p_host; peers[p_id] = host_peers[0]; emit_signal(SNAME("peer_connected"), p_id); diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h index abec1e432e..775f02bf2c 100644 --- a/modules/enet/enet_multiplayer_peer.h +++ b/modules/enet/enet_multiplayer_peer.h @@ -103,7 +103,7 @@ public: virtual void poll() override; virtual bool is_server() const override; - // Overriden so we can instrument the DTLSServer when needed. + // Overridden so we can instrument the DTLSServer when needed. virtual void set_refuse_new_connections(bool p_enabled) override; virtual ConnectionStatus get_connection_status() const override; diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp index e1eacc68b3..54b41e65f8 100644 --- a/modules/fbx/data/fbx_mesh_data.cpp +++ b/modules/fbx/data/fbx_mesh_data.cpp @@ -167,7 +167,7 @@ ImporterMeshInstance3D *FBXMeshData::create_fbx_mesh(const ImportState &state, c sanitize_vertex_weights(state); - // Re organize polygon vertices to to correctly take into account strange + // Reorganize polygon vertices to correctly take into account strange // UVs. reorganize_vertices( polygon_indices, diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h index bc53a4001d..fb8bf15a8f 100644 --- a/modules/gdnative/include/nativescript/godot_nativescript.h +++ b/modules/gdnative/include/nativescript/godot_nativescript.h @@ -146,7 +146,7 @@ typedef struct { } godot_nativescript_method_argument; typedef struct { - // instance pointer, method data, user data, num args, args - return result as varaint + // instance pointer, method data, user data, num args, args - return result as variant GDCALLINGCONV godot_variant (*method)(godot_object *, void *, void *, int, godot_variant **); void *method_data; GDCALLINGCONV void (*free_func)(void *); diff --git a/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd b/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd index 9ad98b78a8..e4d6a72f90 100644 --- a/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd +++ b/modules/gdscript/tests/scripts/parser/features/signal_declaration.gd @@ -6,7 +6,7 @@ signal a # No parameters. signal b() -# With paramters. +# With parameters. signal c(a, b, c) # With parameters multiline. diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs index c664463e86..74aa38386f 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs @@ -400,7 +400,7 @@ namespace Godot /// </summary> /// <param name="seed"> /// Seed to use to generate the random number. - /// If a different seed is used, its value will be modfied. + /// If a different seed is used, its value will be modified. /// </param> /// <returns>A random <see langword="uint"/> number.</returns> public static uint RandFromSeed(ref ulong seed) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs index 68e6422c19..a89dca6c34 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs @@ -694,7 +694,7 @@ namespace Godot /// <summary> /// Returns <see langword="true"/> if the string is a path to a file or - /// directory and its startign point is explicitly defined. This includes + /// directory and its starting point is explicitly defined. This includes /// <c>res://</c>, <c>user://</c>, <c>C:\</c>, <c>/</c>, etc. /// </summary> /// <seealso cref="IsRelativePath(string)"/> diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml index b3fd678379..1ac5768755 100644 --- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml +++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml @@ -16,85 +16,85 @@ </members> <constants> <constant name="MATH_SIN" value="0" enum="BuiltinFunc"> - Return the sine of the input. + Returns the sine of the input. </constant> <constant name="MATH_COS" value="1" enum="BuiltinFunc"> - Return the cosine of the input. + Returns the cosine of the input. </constant> <constant name="MATH_TAN" value="2" enum="BuiltinFunc"> - Return the tangent of the input. + Returns the tangent of the input. </constant> <constant name="MATH_SINH" value="3" enum="BuiltinFunc"> - Return the hyperbolic sine of the input. + Returns the hyperbolic sine of the input. </constant> <constant name="MATH_COSH" value="4" enum="BuiltinFunc"> - Return the hyperbolic cosine of the input. + Returns the hyperbolic cosine of the input. </constant> <constant name="MATH_TANH" value="5" enum="BuiltinFunc"> - Return the hyperbolic tangent of the input. + Returns the hyperbolic tangent of the input. </constant> <constant name="MATH_ASIN" value="6" enum="BuiltinFunc"> - Return the arc sine of the input. + Returns the arc sine of the input. </constant> <constant name="MATH_ACOS" value="7" enum="BuiltinFunc"> - Return the arc cosine of the input. + Returns the arc cosine of the input. </constant> <constant name="MATH_ATAN" value="8" enum="BuiltinFunc"> - Return the arc tangent of the input. + Returns the arc tangent of the input. </constant> <constant name="MATH_ATAN2" value="9" enum="BuiltinFunc"> - Return the arc tangent of the input, using the signs of both parameters to determine the exact angle. + Returns the arc tangent of the input, using the signs of both parameters to determine the exact angle. </constant> <constant name="MATH_SQRT" value="10" enum="BuiltinFunc"> - Return the square root of the input. + Returns the square root of the input. </constant> <constant name="MATH_FMOD" value="11" enum="BuiltinFunc"> - Return the remainder of one input divided by the other, using floating-point numbers. + Returns the remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FPOSMOD" value="12" enum="BuiltinFunc"> - Return the positive remainder of one input divided by the other, using floating-point numbers. + Returns the positive remainder of one input divided by the other, using floating-point numbers. </constant> <constant name="MATH_FLOOR" value="13" enum="BuiltinFunc"> - Return the input rounded down. + Returns the input rounded down. </constant> <constant name="MATH_CEIL" value="14" enum="BuiltinFunc"> - Return the input rounded up. + Returns the input rounded up. </constant> <constant name="MATH_ROUND" value="15" enum="BuiltinFunc"> - Return the input rounded to the nearest integer. + Returns the input rounded to the nearest integer. </constant> <constant name="MATH_ABS" value="16" enum="BuiltinFunc"> - Return the absolute value of the input. + Returns the absolute value of the input. </constant> <constant name="MATH_SIGN" value="17" enum="BuiltinFunc"> - Return the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. + Returns the sign of the input, turning it into 1, -1, or 0. Useful to determine if the input is positive or negative. </constant> <constant name="MATH_POW" value="18" enum="BuiltinFunc"> - Return the input raised to a given power. + Returns the input raised to a given power. </constant> <constant name="MATH_LOG" value="19" enum="BuiltinFunc"> - Return the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. + Returns the natural logarithm of the input. Note that this is not the typical base-10 logarithm function calculators use. </constant> <constant name="MATH_EXP" value="20" enum="BuiltinFunc"> - Return the mathematical constant [b]e[/b] raised to the specified power of the input. [b]e[/b] has an approximate value of 2.71828. + Returns the mathematical constant [b]e[/b] raised to the specified power of the input. [b]e[/b] has an approximate value of 2.71828. </constant> <constant name="MATH_ISNAN" value="21" enum="BuiltinFunc"> - Return whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. + Returns whether the input is NaN (Not a Number) or not. NaN is usually produced by dividing 0 by 0, though other ways exist. </constant> <constant name="MATH_ISINF" value="22" enum="BuiltinFunc"> - Return whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. + Returns whether the input is an infinite floating-point number or not. Infinity is usually produced by dividing a number by 0, though other ways exist. </constant> <constant name="MATH_EASE" value="23" enum="BuiltinFunc"> Easing function, based on exponent. 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </constant> <constant name="MATH_STEP_DECIMALS" value="24" enum="BuiltinFunc"> - Return the number of digit places after the decimal that the first non-zero digit occurs. + Returns the number of digit places after the decimal that the first non-zero digit occurs. </constant> <constant name="MATH_SNAPPED" value="25" enum="BuiltinFunc"> - Return the input snapped to a given step. + Returns the input snapped to a given step. </constant> <constant name="MATH_LERP" value="26" enum="BuiltinFunc"> - Return a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code]. + Returns a number linearly interpolated between the first two inputs, based on the third input. Uses the formula [code]a + (a - b) * t[/code]. </constant> <constant name="MATH_INVERSE_LERP" value="27" enum="BuiltinFunc"> </constant> @@ -107,16 +107,16 @@ Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. </constant> <constant name="MATH_RANDI" value="31" enum="BuiltinFunc"> - Return a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. + Returns a random 32 bits integer value. To obtain a random value between 0 to N (where N is smaller than 2^32 - 1), you can use it with the remainder function. </constant> <constant name="MATH_RANDF" value="32" enum="BuiltinFunc"> - Return a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. + Returns a random floating-point value between 0 and 1. To obtain a random value between 0 to N, you can use it with multiplication. </constant> <constant name="MATH_RANDI_RANGE" value="33" enum="BuiltinFunc"> - Return a random 32-bit integer value between the two inputs. + Returns a random 32-bit integer value between the two inputs. </constant> <constant name="MATH_RANDF_RANGE" value="34" enum="BuiltinFunc"> - Return a random floating-point value between the two inputs. + Returns a random floating-point value between the two inputs. </constant> <constant name="MATH_RANDFN" value="35" enum="BuiltinFunc"> Returns a normally-distributed pseudo-random number, using Box-Muller transform with the specified mean and a standard deviation. This is also called Gaussian distribution. @@ -125,7 +125,7 @@ Set the seed for the random number generator. </constant> <constant name="MATH_RANDSEED" value="37" enum="BuiltinFunc"> - Return a random value from the given seed, along with the new seed. + Returns a random value from the given seed, along with the new seed. </constant> <constant name="MATH_DEG2RAD" value="38" enum="BuiltinFunc"> Convert the input from degrees to radians. @@ -144,19 +144,19 @@ <constant name="MATH_WRAPF" value="43" enum="BuiltinFunc"> </constant> <constant name="MATH_PINGPONG" value="44" enum="BuiltinFunc"> - Return the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive. + Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave). If [code]length[/code] is less than zero, it becomes positive. </constant> <constant name="LOGIC_MAX" value="45" enum="BuiltinFunc"> - Return the greater of the two numbers, also known as their maximum. + Returns the greater of the two numbers, also known as their maximum. </constant> <constant name="LOGIC_MIN" value="46" enum="BuiltinFunc"> - Return the lesser of the two numbers, also known as their minimum. + Returns the lesser of the two numbers, also known as their minimum. </constant> <constant name="LOGIC_CLAMP" value="47" enum="BuiltinFunc"> - Return the input clamped inside the given range, ensuring the result is never outside it. Equivalent to [code]min(max(input, range_low), range_high)[/code]. + Returns the input clamped inside the given range, ensuring the result is never outside it. Equivalent to [code]min(max(input, range_low), range_high)[/code]. </constant> <constant name="LOGIC_NEAREST_PO2" value="48" enum="BuiltinFunc"> - Return the nearest power of 2 to the input. + Returns the nearest power of 2 to the input. </constant> <constant name="OBJ_WEAKREF" value="49" enum="BuiltinFunc"> Create a [WeakRef] from the input. @@ -165,13 +165,13 @@ Convert between types. </constant> <constant name="TYPE_OF" value="51" enum="BuiltinFunc"> - Return the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned. + Returns the type of the input as an integer. Check [enum Variant.Type] for the integers that might be returned. </constant> <constant name="TYPE_EXISTS" value="52" enum="BuiltinFunc"> Checks if a type is registered in the [ClassDB]. </constant> <constant name="TEXT_CHAR" value="53" enum="BuiltinFunc"> - Return a character with the given ascii value. + Returns a character with the given ascii value. </constant> <constant name="TEXT_STR" value="54" enum="BuiltinFunc"> Convert the input to a string. @@ -200,7 +200,7 @@ Deserialize a [Variant] from a [PackedByteArray] serialized using [constant VAR_TO_BYTES]. </constant> <constant name="MATH_SMOOTHSTEP" value="63" enum="BuiltinFunc"> - Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: + Returns a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: [codeblock] var t = clamp((weight - from) / (to - from), 0.0, 1.0) return t * t * (3.0 - 2.0 * t) diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml index 2c6313c80a..486f60400a 100644 --- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml +++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml @@ -12,112 +12,112 @@ <method name="_get_caption" qualifiers="virtual const"> <return type="String" /> <description> - Return the node's title. + Returns the node's title. </description> </method> <method name="_get_category" qualifiers="virtual const"> <return type="String" /> <description> - Return the node's category. + Returns the node's category. </description> </method> <method name="_get_input_value_port_count" qualifiers="virtual const"> <return type="int" /> <description> - Return the count of input value ports. + Returns the count of input value ports. </description> </method> <method name="_get_input_value_port_hint" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="input_idx" type="int" /> <description> - Return the specified input port's hint. See the [enum @GlobalScope.PropertyHint] hints. + Returns the specified input port's hint. See the [enum @GlobalScope.PropertyHint] hints. </description> </method> <method name="_get_input_value_port_hint_string" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="input_idx" type="int" /> <description> - Return the specified input port's hint string. + Returns the specified input port's hint string. </description> </method> <method name="_get_input_value_port_name" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="input_idx" type="int" /> <description> - Return the specified input port's name. + Returns the specified input port's name. </description> </method> <method name="_get_input_value_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="input_idx" type="int" /> <description> - Return the specified input port's type. See the [enum Variant.Type] values. + Returns the specified input port's type. See the [enum Variant.Type] values. </description> </method> <method name="_get_output_sequence_port_count" qualifiers="virtual const"> <return type="int" /> <description> - Return the amount of output [b]sequence[/b] ports. + Returns the amount of output [b]sequence[/b] ports. </description> </method> <method name="_get_output_sequence_port_text" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="seq_idx" type="int" /> <description> - Return the specified [b]sequence[/b] output's name. + Returns the specified [b]sequence[/b] output's name. </description> </method> <method name="_get_output_value_port_count" qualifiers="virtual const"> <return type="int" /> <description> - Return the amount of output value ports. + Returns the amount of output value ports. </description> </method> <method name="_get_output_value_port_hint" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="output_idx" type="int" /> <description> - Return the specified output port's hint. See the [enum @GlobalScope.PropertyHint] hints. + Returns the specified output port's hint. See the [enum @GlobalScope.PropertyHint] hints. </description> </method> <method name="_get_output_value_port_hint_string" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="output_idx" type="int" /> <description> - Return the specified output port's hint string. + Returns the specified output port's hint string. </description> </method> <method name="_get_output_value_port_name" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="output_idx" type="int" /> <description> - Return the specified output port's name. + Returns the specified output port's name. </description> </method> <method name="_get_output_value_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="output_idx" type="int" /> <description> - Return the specified output port's type. See the [enum Variant.Type] values. + Returns the specified output port's type. See the [enum Variant.Type] values. </description> </method> <method name="_get_text" qualifiers="virtual const"> <return type="String" /> <description> - Return the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it). + Returns the custom node's text, which is shown right next to the input [b]sequence[/b] port (if there is none, on the place that is usually taken by it). </description> </method> <method name="_get_working_memory_size" qualifiers="virtual const"> <return type="int" /> <description> - Return the size of the custom node's working memory. See [method _step] for more details. + Returns the size of the custom node's working memory. See [method _step] for more details. </description> </method> <method name="_has_input_sequence_port" qualifiers="virtual const"> <return type="bool" /> <description> - Return whether the custom node has an input [b]sequence[/b] port. + Returns whether the custom node has an input [b]sequence[/b] port. </description> </method> <method name="_step" qualifiers="virtual const"> diff --git a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml index a8360a4d45..780791c0d9 100644 --- a/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml +++ b/modules/webrtc/doc_classes/WebRTCMultiplayerPeer.xml @@ -32,7 +32,7 @@ <return type="Dictionary" /> <argument index="0" name="peer_id" type="int" /> <description> - Return a dictionary representation of the peer with given [code]peer_id[/code] with three keys. [code]connection[/code] containing the [WebRTCPeerConnection] to this peer, [code]channels[/code] an array of three [WebRTCDataChannel], and [code]connected[/code] a boolean representing if the peer connection is currently connected (all three channels are open). + Returns a dictionary representation of the peer with given [code]peer_id[/code] with three keys. [code]connection[/code] containing the [WebRTCPeerConnection] to this peer, [code]channels[/code] an array of three [WebRTCDataChannel], and [code]connected[/code] a boolean representing if the peer connection is currently connected (all three channels are open). </description> </method> <method name="get_peers"> diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml index 4b515c12a1..5fcf51293d 100644 --- a/modules/websocket/doc_classes/WebSocketClient.xml +++ b/modules/websocket/doc_classes/WebSocketClient.xml @@ -39,13 +39,13 @@ <method name="get_connected_host" qualifiers="const"> <return type="String" /> <description> - Return the IP address of the currently connected host. + Returns the IP address of the currently connected host. </description> </method> <method name="get_connected_port" qualifiers="const"> <return type="int" /> <description> - Return the IP port of the currently connected host. + Returns the IP port of the currently connected host. </description> </method> </methods> diff --git a/platform/javascript/api/javascript_tools_editor_plugin.cpp b/platform/javascript/api/javascript_tools_editor_plugin.cpp index df4c790755..7c82177ff4 100644 --- a/platform/javascript/api/javascript_tools_editor_plugin.cpp +++ b/platform/javascript/api/javascript_tools_editor_plugin.cpp @@ -67,7 +67,7 @@ void JavaScriptToolsEditorPlugin::_download_zip(Variant p_v) { FileAccess *src_f; zlib_filefunc_def io = zipio_create_io_from_file(&src_f); - // Name the downloded ZIP file to contain the project name and download date for easier organization. + // Name the downloaded ZIP file to contain the project name and download date for easier organization. // Replace characters not allowed (or risky) in Windows file names with safe characters. // In the project name, all invalid characters become an empty string so that a name // like "Platformer 2: Godette's Revenge" becomes "platformer_2-_godette-s_revenge". diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 899cf5dfad..fc100719cb 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -59,6 +59,15 @@ static String format_error_message(DWORD id) { return msg; } +static void track_mouse_leave_event(HWND hWnd) { + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof(TRACKMOUSEEVENT); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hWnd; + tme.dwHoverTime = HOVER_DEFAULT; + TrackMouseEvent(&tme); +} + bool DisplayServerWindows::has_feature(Feature p_feature) const { switch (p_feature) { case FEATURE_SUBWINDOWS: @@ -1976,6 +1985,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA // Run a timer to prevent event catching warning if the focused window is closing. windows[window_id].focus_timer_id = SetTimer(windows[window_id].hWnd, 2, USER_TIMER_MINIMUM, (TIMERPROC) nullptr); } + if (wParam != WA_INACTIVE) { + track_mouse_leave_event(hWnd); + } return 0; // Return to the message loop. } break; case WM_GETMINMAXINFO: { @@ -2260,12 +2272,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA outside = false; // Once-off notification, must call again. - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(TRACKMOUSEEVENT); - tme.dwFlags = TME_LEAVE; - tme.hwndTrack = hWnd; - tme.dwHoverTime = HOVER_DEFAULT; - TrackMouseEvent(&tme); + track_mouse_leave_event(hWnd); } // Don't calculate relative mouse movement if we don't have focus in CAPTURED mode. @@ -2366,12 +2373,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA outside = false; // Once-off notification, must call again. - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(TRACKMOUSEEVENT); - tme.dwFlags = TME_LEAVE; - tme.hwndTrack = hWnd; - tme.dwHoverTime = HOVER_DEFAULT; - TrackMouseEvent(&tme); + track_mouse_leave_event(hWnd); } // Don't calculate relative mouse movement if we don't have focus in CAPTURED mode. @@ -3126,14 +3128,6 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode, #endif RegisterTouchWindow(wd.hWnd, 0); - - TRACKMOUSEEVENT tme; - tme.cbSize = sizeof(TRACKMOUSEEVENT); - tme.dwFlags = TME_LEAVE; - tme.hwndTrack = wd.hWnd; - tme.dwHoverTime = HOVER_DEFAULT; - TrackMouseEvent(&tme); - DragAcceptFiles(wd.hWnd, true); if ((tablet_get_current_driver() == "wintab") && wintab_available) { diff --git a/scene/2d/shape_cast_2d.cpp b/scene/2d/shape_cast_2d.cpp index 50b44eb4ef..5772948c0d 100644 --- a/scene/2d/shape_cast_2d.cpp +++ b/scene/2d/shape_cast_2d.cpp @@ -223,7 +223,7 @@ void ShapeCast2D::_notification(int p_what) { draw_col.g = g; draw_col.b = g; } - // Draw continuos chain of shapes along the cast. + // Draw continuous chain of shapes along the cast. const int steps = MAX(2, target_position.length() / shape->get_rect().get_size().length() * 4); for (int i = 0; i <= steps; ++i) { Vector2 t = (real_t(i) / steps) * target_position; diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 2ad6476812..18704f3a2f 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -866,7 +866,7 @@ void TileMap::_recreate_layer_internals(int p_layer) { return; } - // Upadate the layer internals. + // Update the layer internals. _rendering_update_layer(p_layer); // Recreate the quadrants. @@ -1375,7 +1375,7 @@ void TileMap::_physics_notification(int p_what) { in_editor = Engine::get_singleton()->is_editor_hint(); #endif if (is_inside_tree() && collision_animatable && !in_editor) { - // Update tranform on the physics tick when in animatable mode. + // Update transform on the physics tick when in animatable mode. last_valid_transform = new_transform; set_notify_local_transform(false); set_global_transform(new_transform); @@ -2296,7 +2296,7 @@ Map<Vector2i, TileSet::TerrainsPattern> TileMap::terrain_wave_function_collapse( // Randomly a cell to fill out of the most constrained. Vector2i selected_cell_to_replace = to_choose_from[Math::random(0, to_choose_from.size() - 1)]; - // Get the list of acceptable pattens for the given cell. + // Get the list of acceptable patterns for the given cell. Set<TileSet::TerrainsPattern> valid_tiles = per_cell_acceptable_tiles[selected_cell_to_replace]; if (valid_tiles.is_empty()) { break; // No possibilities :/ diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index ba37d51e24..a1254c1e30 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -2990,7 +2990,7 @@ CodeEdit::CodeEdit() { add_auto_brace_completion_pair("\"", "\""); add_auto_brace_completion_pair("\'", "\'"); - /* Delimiter traking */ + /* Delimiter tracking */ add_string_delimiter("\"", "\"", false); add_string_delimiter("\'", "\'", false); diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index a008ed7180..ac1cf02376 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -2107,7 +2107,7 @@ void GraphEdit::arrange_nodes() { } while (u != E->get()); } - //Compute horizontal co-ordinates individually for layers to get uniform gap + // Compute horizontal coordinates individually for layers to get uniform gap. float start_from = origin.x; float largest_node_size = 0.0f; diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index f258575f3e..19d165ef54 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -4052,7 +4052,7 @@ int RichTextLabel::get_content_height() const { #ifndef DISABLE_DEPRECATED // People will be very angry, if their texts get erased, because of #39148. (3.x -> 4.0) -// Altough some people may not used bbcode_text, so we only overwrite, if bbcode_text is not empty +// Although some people may not used bbcode_text, so we only overwrite, if bbcode_text is not empty. bool RichTextLabel::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "bbcode_text" && !((String)p_value).is_empty()) { set_text(p_value); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 63e3740a97..dcb709529b 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -5048,7 +5048,7 @@ void TextEdit::_bind_methods() { ClassDB::bind_method(D_METHOD("get_line_wrapped_text", "line"), &TextEdit::get_line_wrapped_text); /* Viewport. */ - // Scolling. + // Scrolling. ClassDB::bind_method(D_METHOD("set_smooth_scroll_enable", "enable"), &TextEdit::set_smooth_scroll_enabled); ClassDB::bind_method(D_METHOD("is_smooth_scroll_enabled"), &TextEdit::is_smooth_scroll_enabled); @@ -5410,7 +5410,7 @@ void TextEdit::_cut_internal() { set_caret_line(get_caret_line() + 1); } - // Correct the visualy perceived caret column taking care of identation level of the lines. + // Correct the visually perceived caret column taking care of indentation level of the lines. int diff_indent = indent_level - get_indent_level(get_caret_line()); cc += diff_indent; if (diff_indent != 0) { diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index df3edca943..a0de1de3c5 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -70,7 +70,7 @@ public: GUTTER_TYPE_CUSTOM }; - /* Contex Menu. */ + /* Context Menu. */ enum MenuItems { MENU_CUT, MENU_COPY, diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 255d0ececd..8e379e76e3 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -4197,7 +4197,7 @@ struct AnimationCompressionDataState { }; uint32_t components = 3; - LocalVector<uint8_t> data; //commited packets + LocalVector<uint8_t> data; // Committed packets. struct PacketData { int32_t data[3] = { 0, 0, 0 }; uint32_t frame = 0; @@ -4576,7 +4576,7 @@ void Animation::compress(uint32_t p_page_size, uint32_t p_fps, float p_split_tol } } for (int j = 0; j < 3; j++) { - //cant have zero + // Can't have zero. if (aabb.size[j] < CMP_EPSILON) { aabb.size[j] = CMP_EPSILON; } @@ -4596,7 +4596,7 @@ void Animation::compress(uint32_t p_page_size, uint32_t p_fps, float p_split_tol } } for (int j = 0; j < 3; j++) { - //cant have zero + // Can't have zero. if (aabb.size[j] < CMP_EPSILON) { aabb.size[j] = CMP_EPSILON; } diff --git a/scene/resources/skeleton_modification_3d_jiggle.cpp b/scene/resources/skeleton_modification_3d_jiggle.cpp index 2535f2b987..14ce0415da 100644 --- a/scene/resources/skeleton_modification_3d_jiggle.cpp +++ b/scene/resources/skeleton_modification_3d_jiggle.cpp @@ -168,7 +168,7 @@ void SkeletonModification3DJiggle::_execute_jiggle_joint(int p_joint_idx, Node3D } if (_print_execution_error( jiggle_data_chain[p_joint_idx].bone_idx < 0 || jiggle_data_chain[p_joint_idx].bone_idx > stack->skeleton->get_bone_count(), - "Jiggle joint " + itos(p_joint_idx) + " bone index is invald. Cannot execute modification!")) { + "Jiggle joint " + itos(p_joint_idx) + " bone index is invalid. Cannot execute modification!")) { return; } diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 321d86ffda..cca2917728 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -2818,12 +2818,15 @@ void RendererStorageRD::MaterialData::update_textures(const Map<StringName, Vari case ShaderLanguage::ShaderNode::Uniform::HINT_BLACK_ALBEDO: { rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_BLACK); } break; - case ShaderLanguage::ShaderNode::Uniform::HINT_NONE: { - rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_NORMAL); - } break; case ShaderLanguage::ShaderNode::Uniform::HINT_ANISOTROPY: { rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_ANISO); } break; + case ShaderLanguage::ShaderNode::Uniform::HINT_NORMAL: { + rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_NORMAL); + } break; + case ShaderLanguage::ShaderNode::Uniform::HINT_ROUGHNESS_NORMAL: { + rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_NORMAL); + } break; default: { rd_texture = singleton->texture_rd_get_default(DEFAULT_RD_TEXTURE_WHITE); } break; @@ -9234,7 +9237,7 @@ void RendererStorageRD::_update_global_variables() { for (uint32_t i = 0; i < total_regions; i++) { if (global_variables.buffer_dirty_regions[i]) { - RD::get_singleton()->buffer_update(global_variables.buffer, i * region_byte_size, region_byte_size, global_variables.buffer_values); + RD::get_singleton()->buffer_update(global_variables.buffer, i * region_byte_size, region_byte_size, &global_variables.buffer_values[i * GlobalVariables::BUFFER_DIRTY_REGION_SIZE]); global_variables.buffer_dirty_regions[i] = false; } diff --git a/servers/rendering/shader_language.cpp b/servers/rendering/shader_language.cpp index 33f4999cdf..7b0873d2e5 100644 --- a/servers/rendering/shader_language.cpp +++ b/servers/rendering/shader_language.cpp @@ -690,7 +690,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() { } if (!str.is_valid_int()) { if (uint_suffix_found) { - return _make_token(TK_ERROR, "Invalid (usigned integer) numeric constant"); + return _make_token(TK_ERROR, "Invalid (unsigned integer) numeric constant"); } else { return _make_token(TK_ERROR, "Invalid (integer) numeric constant"); } @@ -977,8 +977,6 @@ void ShaderLanguage::clear() { completion_base = TYPE_VOID; completion_base_array = false; - unknown_varying_usages.clear(); - #ifdef DEBUG_ENABLED used_constants.clear(); used_varyings.clear(); @@ -4122,43 +4120,6 @@ bool ShaderLanguage::_validate_varying_assign(ShaderNode::Varying &p_varying, St return true; } -bool ShaderLanguage::_validate_varying_using(ShaderNode::Varying &p_varying, String *r_message) { - switch (p_varying.stage) { - case ShaderNode::Varying::STAGE_UNKNOWN: - VaryingUsage usage; - usage.var = &p_varying; - usage.line = tk_line; - unknown_varying_usages.push_back(usage); - break; - case ShaderNode::Varying::STAGE_VERTEX: - if (current_function == varying_function_names.fragment || current_function == varying_function_names.light) { - p_varying.stage = ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT; - } - break; - case ShaderNode::Varying::STAGE_FRAGMENT: - if (current_function == varying_function_names.light) { - p_varying.stage = ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT; - } - break; - default: - break; - } - return true; -} - -bool ShaderLanguage::_check_varying_usages(int *r_error_line, String *r_error_message) const { - for (const List<ShaderLanguage::VaryingUsage>::Element *E = unknown_varying_usages.front(); E; E = E->next()) { - ShaderNode::Varying::Stage stage = E->get().var->stage; - if (stage != ShaderNode::Varying::STAGE_UNKNOWN && stage != ShaderNode::Varying::STAGE_VERTEX && stage != ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT) { - *r_error_line = E->get().line; - *r_error_message = RTR("Fragment-stage varying could not been accessed in custom function!"); - return false; - } - } - - return true; -} - bool ShaderLanguage::_check_node_constness(const Node *p_node) const { switch (p_node->type) { case Node::TYPE_OPERATOR: { @@ -4991,55 +4952,104 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons for (int i = 0; i < call_function->arguments.size(); i++) { int argidx = i + 1; if (argidx < func->arguments.size()) { - if (call_function->arguments[i].is_const || call_function->arguments[i].qualifier == ArgumentQualifier::ARGUMENT_QUALIFIER_OUT || call_function->arguments[i].qualifier == ArgumentQualifier::ARGUMENT_QUALIFIER_INOUT) { - bool error = false; - Node *n = func->arguments[argidx]; - if (n->type == Node::TYPE_CONSTANT || n->type == Node::TYPE_OPERATOR) { - if (!call_function->arguments[i].is_const) { + bool error = false; + Node *n = func->arguments[argidx]; + ArgumentQualifier arg_qual = call_function->arguments[i].qualifier; + bool is_out_arg = arg_qual != ArgumentQualifier::ARGUMENT_QUALIFIER_IN; + + if (n->type == Node::TYPE_VARIABLE || n->type == Node::TYPE_ARRAY) { + StringName varname; + + if (n->type == Node::TYPE_VARIABLE) { + VariableNode *vn = static_cast<VariableNode *>(n); + varname = vn->name; + } else { // TYPE_ARRAY + ArrayNode *an = static_cast<ArrayNode *>(n); + varname = an->name; + } + + if (shader->varyings.has(varname)) { + switch (shader->varyings[varname].stage) { + case ShaderNode::Varying::STAGE_UNKNOWN: { + _set_error(vformat("Varying '%s' must be assigned in the vertex or fragment function first!", varname)); + return nullptr; + } + case ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT: + [[fallthrough]]; + case ShaderNode::Varying::STAGE_VERTEX: + if (is_out_arg && current_function != varying_function_names.vertex) { // inout/out + error = true; + } + break; + case ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT: + [[fallthrough]]; + case ShaderNode::Varying::STAGE_FRAGMENT: + if (!is_out_arg) { + if (current_function != varying_function_names.fragment && current_function != varying_function_names.light) { + error = true; + } + } else if (current_function != varying_function_names.fragment) { // inout/out + error = true; + } + break; + default: + break; + } + + if (error) { + _set_error(vformat("Varying '%s' cannot be passed for the '%s' parameter in that context!", varname, _get_qualifier_str(arg_qual))); + return nullptr; + } + } + } + + bool is_const_arg = call_function->arguments[i].is_const; + + if (is_const_arg || is_out_arg) { + StringName varname; + + if (n->type == Node::TYPE_CONSTANT || n->type == Node::TYPE_OPERATOR || n->type == Node::TYPE_ARRAY_CONSTRUCT) { + if (!is_const_arg) { error = true; } } else if (n->type == Node::TYPE_ARRAY) { ArrayNode *an = static_cast<ArrayNode *>(n); - if (an->call_expression != nullptr || an->is_const) { + if (!is_const_arg && (an->call_expression != nullptr || an->is_const)) { error = true; } + varname = an->name; } else if (n->type == Node::TYPE_VARIABLE) { VariableNode *vn = static_cast<VariableNode *>(n); - if (vn->is_const) { + if (vn->is_const && !is_const_arg) { error = true; - } else { - StringName varname = vn->name; - if (shader->constants.has(varname)) { - error = true; - } else if (shader->uniforms.has(varname)) { - error = true; - } else { - if (shader->varyings.has(varname)) { - _set_error(vformat("Varyings cannot be passed for '%s' parameter!", _get_qualifier_str(call_function->arguments[i].qualifier))); - return nullptr; - } - if (p_function_info.built_ins.has(varname)) { - BuiltInInfo info = p_function_info.built_ins[varname]; - if (info.constant) { - error = true; - } - } - } } + varname = vn->name; } else if (n->type == Node::TYPE_MEMBER) { MemberNode *mn = static_cast<MemberNode *>(n); - if (mn->basetype_const) { + if (mn->basetype_const && is_out_arg) { error = true; } } + if (!error && varname != StringName()) { + if (shader->constants.has(varname)) { + error = true; + } else if (shader->uniforms.has(varname)) { + error = true; + } else if (p_function_info.built_ins.has(varname)) { + BuiltInInfo info = p_function_info.built_ins[varname]; + if (info.constant) { + error = true; + } + } + } + if (error) { - _set_error(vformat("Constant value cannot be passed for '%s' parameter!", _get_qualifier_str(call_function->arguments[i].qualifier))); + _set_error(vformat("Constant value cannot be passed for '%s' parameter!", _get_qualifier_str(arg_qual))); return nullptr; } } if (is_sampler_type(call_function->arguments[i].type)) { //let's see where our argument comes from - Node *n = func->arguments[argidx]; ERR_CONTINUE(n->type != Node::TYPE_VARIABLE); //bug? this should always be a variable VariableNode *vn = static_cast<VariableNode *>(n); StringName varname = vn->name; @@ -5143,9 +5153,21 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons return nullptr; } } else { - if (!_validate_varying_using(shader->varyings[identifier], &error)) { - _set_error(error); - return nullptr; + ShaderNode::Varying &var = shader->varyings[identifier]; + + switch (var.stage) { + case ShaderNode::Varying::STAGE_VERTEX: + if (current_function == varying_function_names.fragment || current_function == varying_function_names.light) { + var.stage = ShaderNode::Varying::STAGE_VERTEX_TO_FRAGMENT_LIGHT; + } + break; + case ShaderNode::Varying::STAGE_FRAGMENT: + if (current_function == varying_function_names.light) { + var.stage = ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT; + } + break; + default: + break; } } } @@ -8958,14 +8980,6 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct tk = _get_token(); } - int error_line; - String error_message; - if (!_check_varying_usages(&error_line, &error_message)) { - _set_tkpos({ 0, error_line }); - _set_error(error_message); - return ERR_PARSE_ERROR; - } - return OK; } diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index 0ed3d9fabf..72d4951a35 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -938,14 +938,6 @@ private: VaryingFunctionNames varying_function_names; - struct VaryingUsage { - ShaderNode::Varying *var; - int line; - }; - List<VaryingUsage> unknown_varying_usages; - - bool _check_varying_usages(int *r_error_line, String *r_error_message) const; - TkPos _get_tkpos() { TkPos tkp; tkp.char_idx = char_idx; @@ -1047,7 +1039,6 @@ private: bool _propagate_function_call_sampler_uniform_settings(StringName p_name, int p_argument, TextureFilter p_filter, TextureRepeat p_repeat); bool _propagate_function_call_sampler_builtin_reference(StringName p_name, int p_argument, const StringName &p_builtin); bool _validate_varying_assign(ShaderNode::Varying &p_varying, String *r_message); - bool _validate_varying_using(ShaderNode::Varying &p_varying, String *r_message); bool _check_node_constness(const Node *p_node) const; Node *_parse_array_size(BlockNode *p_block, const FunctionInfo &p_function_info, int &r_array_size); diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h index 4b5a049a07..ffe7fead50 100644 --- a/tests/scene/test_code_edit.h +++ b/tests/scene/test_code_edit.h @@ -1104,7 +1104,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_key(idx) == "#"); CHECK(code_edit->get_delimiter_end_key(idx) == ""); - /* Check nested strings are handeled correctly. */ + /* Check nested strings are handled correctly. */ code_edit->set_text(" \n# # \n "); /* Check line above is not in string. */ @@ -1132,7 +1132,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER); CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER); - /* Check is in string with no column retruns true if entire line is comment excluding whitespace. */ + /* Check is in string with no column returns true if entire line is comment excluding whitespace. */ code_edit->set_text(" \n # # \n "); CHECK(code_edit->is_in_string(1) != -1); @@ -1195,7 +1195,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_key(idx) == "#"); CHECK(code_edit->get_delimiter_end_key(idx) == ""); - /* Check nested comments are handeled correctly. */ + /* Check nested comments are handled correctly. */ code_edit->set_text(" \n# # \n "); /* Check line above is not in comment. */ @@ -1223,7 +1223,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_position(2, 1) == OUTSIDE_DELIMETER); CHECK(code_edit->get_delimiter_end_position(2, 1) == OUTSIDE_DELIMETER); - /* Check is in comment with no column retruns true if entire line is comment excluding whitespace. */ + /* Check is in comment with no column returns true if entire line is comment excluding whitespace. */ code_edit->set_text(" \n # # \n "); CHECK(code_edit->is_in_comment(1) != -1); @@ -1491,7 +1491,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_key(idx) == "#"); CHECK(code_edit->get_delimiter_end_key(idx) == "#"); - /* Check is in string with no column retruns true if entire line is string excluding whitespace. */ + /* Check is in string with no column returns true if entire line is string excluding whitespace. */ code_edit->set_text(" \n # \n\n #\n "); CHECK(code_edit->is_in_string(1) != -1); CHECK(code_edit->is_in_string(2) != -1); @@ -1680,7 +1680,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_key(idx) == "#"); CHECK(code_edit->get_delimiter_end_key(idx) == "#"); - /* Check is in comment with no column retruns true if entire line is comment excluding whitespace. */ + /* Check is in comment with no column returns true if entire line is comment excluding whitespace. */ code_edit->set_text(" \n # \n\n #\n "); CHECK(code_edit->is_in_comment(1) != -1); CHECK(code_edit->is_in_comment(2) != -1); @@ -1746,7 +1746,7 @@ TEST_CASE("[SceneTree][CodeEdit] delimiters") { CHECK(code_edit->get_delimiter_start_key(idx) == "#"); CHECK(code_edit->get_delimiter_end_key(idx) == "#"); - /* Check is in comment with no column retruns true as inner delimiter should not be counted. */ + /* Check is in comment with no column returns true as inner delimiter should not be counted. */ CHECK(code_edit->is_in_comment(1) != -1); CHECK(code_edit->is_in_comment(2) != -1); CHECK(code_edit->is_in_comment(3) != -1); diff --git a/tests/test_macros.h b/tests/test_macros.h index b04c2117b7..32db675ef5 100644 --- a/tests/test_macros.h +++ b/tests/test_macros.h @@ -135,7 +135,7 @@ int register_test_command(String p_command, TestFunc p_function); // SEND_GUI_ACTION - takes an object and a input map key. e.g SEND_GUI_ACTION(code_edit, "ui_text_newline"). // SEND_GUI_KEY_EVENT - takes an object and a keycode set. e.g SEND_GUI_KEY_EVENT(code_edit, Key::A | KeyModifierMask::CMD). // SEND_GUI_MOUSE_EVENT - takes an object, position, mouse button and mouse mask e.g SEND_GUI_MOUSE_EVENT(code_edit, Vector2(50, 50), MOUSE_BUTTON_NONE, MOUSE_BUTTON_NONE); -// SEND_GUI_DOUBLE_CLICK - takes an object and a postion. e.g SEND_GUI_DOUBLE_CLICK(code_edit, Vector2(50, 50)); +// SEND_GUI_DOUBLE_CLICK - takes an object and a position. e.g SEND_GUI_DOUBLE_CLICK(code_edit, Vector2(50, 50)); #define SEND_GUI_ACTION(m_object, m_action) \ { \ @@ -192,7 +192,7 @@ int register_test_command(String p_command, TestFunc p_function); // // Use SIGNAL_DISCARD("signal_name") to discard records all of the given signal, use only in placed you don't need to check. // -// All signals are automaticaly discared between test/sub test cases. +// All signals are automatically discarded between test/sub test cases. class SignalWatcher : public Object { private: |