diff --git a/CHANGELOG.md b/CHANGELOG.md index 088ea5e4773..4ae09441cc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea - Remember directory when installing templates file ([GH-74735](https://github.com/godotengine/godot/pull/74735)). - Improve editor state initialization ([GH-75563](https://github.com/godotengine/godot/pull/75563)). +#### GUI + +- Allow entering named colors in ColorPicker's hex field ([GH-75905](https://github.com/godotengine/godot/pull/75905)). + #### Navigation - Navigation: Expose NavigationAgent path postprocessing and pathfinding algorithm options ([GH-75326](https://github.com/godotengine/godot/pull/75326)). @@ -40,21 +44,49 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea - Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion ([GH-75477](https://github.com/godotengine/godot/pull/75477)). +#### Core + +- Lift restriction that resource load thread requester has to be the initiator ([GH-73862](https://github.com/godotengine/godot/pull/73862)). +- Use HashMap instead of RBMap for ids in Windows TTS ([GH-75933](https://github.com/godotengine/godot/pull/75933)). +- Rename internal root canvas group to start with underscore ([GH-76149](https://github.com/godotengine/godot/pull/76149)). + #### Editor +- Make EditorToaster's handler thread-safe ([GH-71670](https://github.com/godotengine/godot/pull/71670)). - Prevent off-screen controls in editor ([GH-73646](https://github.com/godotengine/godot/pull/73646)). - Re-enable script editor File menu shortcuts when the menu is hidden ([GH-74319](https://github.com/godotengine/godot/pull/74319)). - Prevent color conversion of the big Godot logo ([GH-75653](https://github.com/godotengine/godot/pull/75653)). +- Set font sizes for various styles in editor output panel ([GH-75780](https://github.com/godotengine/godot/pull/75780)). +- Remove unnecessary zero multiplications ([GH-75822](https://github.com/godotengine/godot/pull/75822)). +- Adjust size of some dialogs ([GH-75895](https://github.com/godotengine/godot/pull/75895)). +- Change cursor consistently when panning in the 2D Editor ([GH-75997](https://github.com/godotengine/godot/pull/75997)). #### GUI - Ignore invisible children of GraphNode for minimum size ([GH-72240](https://github.com/godotengine/godot/pull/72240)). - Update `TextureProgressBar` upon texture changes ([GH-75532](https://github.com/godotengine/godot/pull/75532)). - Keep a copy of UTF-8 XML source string during the SVG font processing ([GH-75675](https://github.com/godotengine/godot/pull/75675)). +- Always cache parent visibility in `CanvasItem` ([GH-75890](https://github.com/godotengine/godot/pull/75890)). +- Improve BiDi error handling in TextServer ([GH-75922](https://github.com/godotengine/godot/pull/75922)). +- Use dedicated flag for object replacement characters in TextServer ([GH-75974](https://github.com/godotengine/godot/pull/75974)). +- Improve line BiDi handling, prevent crash on recursive log updates ([GH-75975](https://github.com/godotengine/godot/pull/75975)). +- Don't apply scale to autohide theme property ([GH-75993](https://github.com/godotengine/godot/pull/75993)). +- Use Point2 consistently in Control methods ([GH-76029](https://github.com/godotengine/godot/pull/76029)). #### Import - gltf: Remove obsolete hack to embed gltf textures in advanced import ([GH-75636](https://github.com/godotengine/godot/pull/75636)). +- Expose more compression formats in Image and fix compress check ([GH-76014](https://github.com/godotengine/godot/pull/76014)). + +#### Network + +- Poll LSP/DAP clients for connection status updates ([GH-75850](https://github.com/godotengine/godot/pull/75850)). + +#### Particles + +- Translate inactive GPUParticles3D particles to -INF ([GH-75162](https://github.com/godotengine/godot/pull/75162)). +- Use angle_rand to calculate base_angle in particles process material ([GH-75999](https://github.com/godotengine/godot/pull/75999)). +- Don't store instance transform origin in RD 3D renderer unless requested ([GH-76003](https://github.com/godotengine/godot/pull/76003)). #### Physics @@ -63,6 +95,12 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea #### Rendering - Recreate swap chain when suboptimal to avoid error spam ([GH-72859](https://github.com/godotengine/godot/pull/72859)). +- Use MODELVIEW_MATRIX when on double precision ([GH-75462](https://github.com/godotengine/godot/pull/75462)). +- Check for instancing without relying on instance_count when drawing 2D meshes ([GH-75954](https://github.com/godotengine/godot/pull/75954)). + +#### Shaders + +- Write out render_mode even when mode is set to default in VisualShaders ([GH-75957](https://github.com/godotengine/godot/pull/75957)). #### Thirdparty @@ -74,6 +112,10 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea - Fix RemoteTransform2D could fail to update AnimatableBody2D's position or rotation ([GH-75487](https://github.com/godotengine/godot/pull/75487)). +#### Animation + +- Fix blend_shape (shapekey) empty name import ([GH-75990](https://github.com/godotengine/godot/pull/75990)). + #### Audio - Fix AudioStreamPlayer2D crash when PhysicsServer2D runs on thread ([GH-75728](https://github.com/godotengine/godot/pull/75728)). @@ -81,6 +123,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea #### Buildsystem - Fix the Python type error when creating the .sln file ([GH-75309](https://github.com/godotengine/godot/pull/75309)). +- Fix forced optimization in dev_build ([GH-75909](https://github.com/godotengine/godot/pull/75909)). #### Core @@ -89,36 +132,72 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea #### Editor - Fix off-by-one issue where "Go to Line" dialog shows the incorrect line number ([GH-75523](https://github.com/godotengine/godot/pull/75523)). +- Fix deserializing resource usage debug data ([GH-75782](https://github.com/godotengine/godot/pull/75782)). +- Initialize editor values on first launch ([GH-75799](https://github.com/godotengine/godot/pull/75799)). +- Fix connect signal dialog not allowing Unicode method name ([GH-75814](https://github.com/godotengine/godot/pull/75814)). +- Fix method dialog label ([GH-75844](https://github.com/godotengine/godot/pull/75844)). + +#### Export + +- Fix validation of codesigning certificate password on macOS ([GH-74326](https://github.com/godotengine/godot/pull/74326)). + +#### GDScript + +- Add missing member type check when resolving `extends` ([GH-75879](https://github.com/godotengine/godot/pull/75879)). +- Fix typo in LSP parse function parameters ([GH-76090](https://github.com/godotengine/godot/pull/76090)). #### GUI +- Fixed RichTextLabel wrong selection offset in padded table cell ([GH-71742](https://github.com/godotengine/godot/pull/71742)). - Fix commenting collapsed function issue ([GH-75070](https://github.com/godotengine/godot/pull/75070)). - Fix fill align and trim with enabled dropcap in `RichTextLabel` ([GH-75504](https://github.com/godotengine/godot/pull/75504)). - Fix descriptions not showing for theme properties ([GH-75559](https://github.com/godotengine/godot/pull/75559)). - Fix some theme values affect the editor by setting a default value for them ([GH-75566](https://github.com/godotengine/godot/pull/75566)). - Fix several GraphEdit operations at zoom levels other than 100% ([GH-75595](https://github.com/godotengine/godot/pull/75595)). +- Fix uninitialized member in CodeEdit ([GH-75829](https://github.com/godotengine/godot/pull/75829)). +- Fix offset calculation in Tree when there are hidden items ([GH-75977](https://github.com/godotengine/godot/pull/75977)). +- Add missing LineEdit constants in editor theme ([GH-76123](https://github.com/godotengine/godot/pull/76123)). +- Fix blurry borders on antialiased StyleBoxFlat ([GH-76132](https://github.com/godotengine/godot/pull/76132)). #### Import - SVG: fix tvg::Picture->size() and scale based errors. ([GH-75034](https://github.com/godotengine/godot/pull/75034)). +- Fix OBJ mesh importer smoothing handling ([GH-75315](https://github.com/godotengine/godot/pull/75315)). #### Input - Fix guide button detection with XInput and Xbox Series controllers ([GH-73200](https://github.com/godotengine/godot/pull/73200)). - Fix the issue preventing dragging in the 2D editor ([GH-75113](https://github.com/godotengine/godot/pull/75113)). - Fix keycode/physical keycode mix up on web ([GH-75738](https://github.com/godotengine/godot/pull/75738)). +- Fix potential null in android text entry system ([GH-75991](https://github.com/godotengine/godot/pull/75991)). #### Navigation - Navigation: Fix NavigationObstacles not being added to avoidance simulation ([GH-75756](https://github.com/godotengine/godot/pull/75756)). +#### Particles + +- Properly calculate lifetime_split for particles ([GH-73313](https://github.com/godotengine/godot/pull/73313)). +- Fix "error X3708: continue cannot be used in a switch" in HTML export ([GH-75795](https://github.com/godotengine/godot/pull/75795)). + +#### Physics + +- Fix typo bug in convex-convex separating axis test ([GH-75835](https://github.com/godotengine/godot/pull/75835)). + #### Porting - Windows: Fix clipboard relying on focused window ([GH-73878](https://github.com/godotengine/godot/pull/73878)). +- Windows: Fix StringFileInfo structure ([GH-76001](https://github.com/godotengine/godot/pull/76001)). #### Rendering - Fix interpolation of R0 for metallic and calculation of the Fresnel Shlick term in SSR ([GH-75368](https://github.com/godotengine/godot/pull/75368)). +- Fix `get_test_texture()` returning an almost fully white texture ([GH-75632](https://github.com/godotengine/godot/pull/75632)). +- Ensure that depth write state is updated before transparent pass in OpenGL3 renderer ([GH-75968](https://github.com/godotengine/godot/pull/75968)). + +#### Shaders + +- Fix crashes caused due to missing type specifier on visual shader editor ([GH-75809](https://github.com/godotengine/godot/pull/75809)). ## [4.0.2] - 2023-04-04 diff --git a/core/io/image.cpp b/core/io/image.cpp index 736a3ec82ee..8111ca447ce 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -2649,7 +2649,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels _image_compress_bptc_func(this, p_channels); } break; case COMPRESS_ASTC: { - ERR_FAIL_COND_V(!_image_compress_bptc_func, ERR_UNAVAILABLE); + ERR_FAIL_COND_V(!_image_compress_astc_func, ERR_UNAVAILABLE); _image_compress_astc_func(this, p_astc_format); } break; case COMPRESS_MAX: { @@ -3535,6 +3535,8 @@ void Image::_bind_methods() { BIND_ENUM_CONSTANT(COMPRESS_ETC); BIND_ENUM_CONSTANT(COMPRESS_ETC2); BIND_ENUM_CONSTANT(COMPRESS_BPTC); + BIND_ENUM_CONSTANT(COMPRESS_ASTC); + BIND_ENUM_CONSTANT(COMPRESS_MAX); BIND_ENUM_CONSTANT(USED_CHANNELS_L); BIND_ENUM_CONSTANT(USED_CHANNELS_LA); diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index d0448e86fca..a46fac4e7a4 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -310,12 +310,6 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String & thread_load_mutex->unlock(); ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "There is no thread loading source resource '" + p_source_resource + "'."); } - //must be loading from this thread - if (thread_load_tasks[p_source_resource].loader_id != Thread::get_caller_id()) { - thread_load_mutex->unlock(); - ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Threading loading resource'" + local_path + " failed: Source specified: '" + p_source_resource + "' but was not called by it."); - } - //must not be already added as s sub tasks if (thread_load_tasks[p_source_resource].sub_tasks.has(local_path)) { thread_load_mutex->unlock(); diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 0c0c8f657a2..c3617d4598c 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1906,7 +1906,7 @@ static void _register_variant_builtin_methods() { bind_method(Vector4, distance_squared_to, sarray("to"), varray()); bind_method(Vector4, dot, sarray("with"), varray()); bind_method(Vector4, inverse, sarray(), varray()); - bind_method(Vector4, is_equal_approx, sarray("with"), varray()); + bind_method(Vector4, is_equal_approx, sarray("to"), varray()); bind_method(Vector4, is_zero_approx, sarray(), varray()); bind_method(Vector4, is_finite, sarray(), varray()); diff --git a/core/version.h b/core/version.h index 8ed7fe4af36..5ddb09284e4 100644 --- a/core/version.h +++ b/core/version.h @@ -40,13 +40,13 @@ // Defines the main "branch" version. Patch versions in this branch should be // forward-compatible. // Example: "3.1" -#define VERSION_BRANCH "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) +#define VERSION_BRANCH _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR) #if VERSION_PATCH // Example: "3.1.4" -#define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH) +#define VERSION_NUMBER VERSION_BRANCH "." _MKSTR(VERSION_PATCH) #else // patch is 0, we don't include it in the "pretty" version number. // Example: "3.1" instead of "3.1.0" -#define VERSION_NUMBER "" VERSION_BRANCH +#define VERSION_NUMBER VERSION_BRANCH #endif // VERSION_PATCH // Version number encoded as hexadecimal int with one byte for each number, @@ -57,16 +57,16 @@ // Describes the full configuration of that Godot version, including the version number, // the status (beta, stable, etc.) and potential module-specific features (e.g. mono). // Example: "3.1.4.stable.mono" -#define VERSION_FULL_CONFIG "" VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG +#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG // Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD // description (e.g. official, custom_build, etc.). // Example: "3.1.4.stable.mono.official" -#define VERSION_FULL_BUILD "" VERSION_FULL_CONFIG "." VERSION_BUILD +#define VERSION_FULL_BUILD VERSION_FULL_CONFIG "." VERSION_BUILD // Same as above, but prepended with Godot's name and a cosmetic "v" for "version". // Example: "Godot v3.1.4.stable.official.mono" -#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_FULL_BUILD +#define VERSION_FULL_NAME VERSION_NAME " v" VERSION_FULL_BUILD // Git commit hash, generated at build time in `core/version_hash.gen.cpp`. extern const char *const VERSION_HASH; diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 12b5493589a..73f1fe9ad6d 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -826,17 +826,21 @@ </method> <method name="print_rich" qualifiers="vararg"> <description> - Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as [code]red[/code], [i]not[/i] hexadecimal color codes. Unsupported tags will be left as-is in standard output. - When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough. + Converts one or more arguments of any type to string in the best way possible and prints them to the console. + The following BBCode tags are supported: [code]b[/code], [code]i[/code], [code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], [code]url[/code], [code]center[/code], [code]right[/code], [code]color[/code], [code]bgcolor[/code], [code]fgcolor[/code]. + Color tags only support the following named colors: [code]black[/code], [code]red[/code], [code]green[/code], [code]yellow[/code], [code]blue[/code], [code]magenta[/code], [code]pink[/code], [code]purple[/code], [code]cyan[/code], [code]white[/code], [code]orange[/code], [code]gray[/code]. Hexadecimal color codes are not supported. + URL tags only support URLs wrapped by an URL tag, not URLs with a different title. + When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output. [codeblocks] [gdscript] - print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b] + print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font [/gdscript] [csharp] - GD.PrintRich("[code][b]Hello world![/b][/code]"); // Prints out: [b]Hello world![/b] + GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font [/csharp] [/codeblocks] [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. + [b]Note:[/b] On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. </description> </method> <method name="print_verbose" qualifiers="vararg"> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index 747968ea91a..bbea8535bbc 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -15,27 +15,27 @@ var key = "My secret key!!!" # Key must be either 16 or 32 bytes. var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. # Encrypt ECB - aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8()) - var encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer()) + var encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt ECB - aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8()) + aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer()) var decrypted = aes.update(encrypted) aes.finish() # Check ECB - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. # Encrypt CBC - aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8()) - encrypted = aes.update(data.to_utf8()) + aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) + encrypted = aes.update(data.to_utf8_buffer()) aes.finish() # Decrypt CBC - aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8()) + aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) decrypted = aes.update(encrypted) aes.finish() # Check CBC - assert(decrypted == data.to_utf8()) + assert(decrypted == data.to_utf8_buffer()) [/gdscript] [csharp] using Godot; @@ -50,27 +50,27 @@ string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed. // Encrypt ECB - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8()); - byte[] encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer()); + byte[] encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt ECB - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer()); byte[] decrypted = _aes.Update(encrypted); _aes.Finish(); // Check ECB - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. // Encrypt CBC - _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8(), iv.ToUtf8()); - encrypted = _aes.Update(data.ToUtf8()); + _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); + encrypted = _aes.Update(data.ToUtf8Buffer()); _aes.Finish(); // Decrypt CBC - _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8(), iv.ToUtf8()); + _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); decrypted = _aes.Update(encrypted); _aes.Finish(); // Check CBC - Debug.Assert(decrypted == data.ToUtf8()); + Debug.Assert(decrypted == data.ToUtf8Buffer()); } } [/csharp] diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 25e4a4549d4..daf25834d98 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -230,7 +230,7 @@ </methods> <members> <member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation"> - If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation]. + If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation]. </member> <member name="audio_max_polyphony" type="int" setter="set_audio_max_polyphony" getter="get_audio_max_polyphony" default="32"> The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index cf9e8650643..69c7ce48eb9 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -128,7 +128,7 @@ The magnitude of area-specific wind force. </member> <member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath("")"> - The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform. + The [Node3D] which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform. </member> </members> <signals> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 86f8f357f86..fb35fc7a98e 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -441,12 +441,23 @@ <return type="Variant" /> <description> Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. + To find the maximum value using a custom comparator, you can use [method reduce]. In this example every array element is checked and the first maximum value is returned: + [codeblock] + func _ready(): + var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)] + # In this example we compare the lengths. + print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max)) + + func is_length_greater(a, b): + return a.length() > b.length() + [/codeblock] </description> </method> <method name="min" qualifiers="const"> <return type="Variant" /> <description> Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. + See also [method max] for an example of using a custom comparator. </description> </method> <method name="pick_random" qualifiers="const"> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 50be9b86bf1..1268205537c 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -76,14 +76,16 @@ <method name="bind" qualifiers="vararg const"> <return type="Callable" /> <description> - Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. + Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind]. + [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. </description> </method> <method name="bindv"> <return type="Callable" /> <param index="0" name="arguments" type="Array" /> <description> - Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. + Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind]. + [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. </description> </method> <method name="call" qualifiers="vararg const"> @@ -187,7 +189,13 @@ <return type="Callable" /> <param index="0" name="argcount" type="int" /> <description> - Returns a copy of this [Callable] with the arguments unbound, as defined by [param argcount]. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method. + Returns a copy of this [Callable] with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to [param argcount]. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also [method bind]. + [b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. + [codeblock] + func _ready(): + foo.unbind(1).call(1, 2) # Calls foo(1). + foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind. + [/codeblock] </description> </method> </methods> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 83797f793b5..a4b5764c3b8 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -937,10 +937,10 @@ Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one. </member> <member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the right of this one. </member> <member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the top of this one. </member> <member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath("")"> Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action. diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index a7e7e756c6a..7fbb89423da 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -24,7 +24,7 @@ cert.save("user://generated.crt") # Encryption var data = "Some data" - var encrypted = crypto.encrypt(key, data.to_utf8()) + var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) # Decryption var decrypted = crypto.decrypt(key, encrypted) # Signing @@ -33,7 +33,7 @@ var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) # Checks assert(verified) - assert(data.to_utf8() == decrypted) + assert(data.to_utf8_buffer() == decrypted) [/gdscript] [csharp] using Godot; @@ -56,7 +56,7 @@ _cert.Save("user://generated.crt"); // Encryption string data = "Some data"; - byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8()); + byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer()); // Decryption byte[] decrypted = _crypto.Decrypt(_key, encrypted); // Signing @@ -65,7 +65,7 @@ bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key); // Checks Debug.Assert(verified); - Debug.Assert(data.ToUtf8() == decrypted); + Debug.Assert(data.ToUtf8Buffer() == decrypted); } } [/csharp] diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 72ac95a700b..c4b64c5982e 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -138,7 +138,7 @@ <param index="1" name="cubic" type="bool" default="false" /> <param index="2" name="apply_tilt" type="bool" default="false" /> <description> - Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. + Similar with [code]interpolate_baked()[/code]. The return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. </description> </method> <method name="samplef" qualifiers="const"> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 3e917800954..8e85c12ad1c 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -35,7 +35,7 @@ if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: while p.get_available_packet_count() > 0: print("Received message from client: %s" % p.get_packet().get_string_from_utf8()) - p.put_packet("Hello DTLS client".to_utf8()) + p.put_packet("Hello DTLS client".to_utf8_buffer()) [/gdscript] [csharp] // ServerNode.cs @@ -77,7 +77,7 @@ while (p.GetAvailablePacketCount() > 0) { GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}"); - p.PutPacket("Hello DTLS Client".ToUtf8()); + p.PutPacket("Hello DTLS Client".ToUtf8Buffer()); } } } @@ -103,7 +103,7 @@ if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: if !connected: # Try to contact server - dtls.put_packet("The answer is... 42!".to_utf8()) + dtls.put_packet("The answer is... 42!".to_utf8_buffer()) while dtls.get_available_packet_count() > 0: print("Connected: %s" % dtls.get_packet().get_string_from_utf8()) connected = true @@ -133,7 +133,7 @@ if (!_connected) { // Try to contact server - _dtls.PutPacket("The Answer Is..42!".ToUtf8()); + _dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } while (_dtls.GetAvailablePacketCount() > 0) { diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 7872c53af6e..5e898de976a 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1575,7 +1575,7 @@ Default landscape orientation. </constant> <constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation"> - Default portrait orienstation. + Default portrait orientation. </constant> <constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation"> Reverse landscape orientation (upside down). @@ -1711,7 +1711,7 @@ The window can't be focused. No-focus window will ignore all input, except mouse clicks. </constant> <constant name="WINDOW_FLAG_POPUP" value="5" enum="WindowFlags"> - Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [method window_set_transient]). + Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [method window_set_transient]). </constant> <constant name="WINDOW_FLAG_EXTEND_TO_TITLE" value="6" enum="WindowFlags"> Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index af04956e61d..407d4b26307 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -54,7 +54,7 @@ </methods> <members> <member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0"> - The file system access scope. See enum [code]Access[/code] constants. + The file system access scope. See [enum Access] constants. [b]Warning:[/b] Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url]. </member> <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir"> @@ -74,7 +74,7 @@ The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected. </member> <member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true"> - If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File"). + If [code]true[/code], changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File"). </member> <member name="root_subfolder" type="String" setter="set_root_subfolder" getter="get_root_subfolder" default=""""> If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory. diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index fbdc6b5e645..7db6a398dc3 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -11,11 +11,11 @@ var ctx = HMACContext.new() func _ready(): - var key = "supersecret".to_utf8() + var key = "supersecret".to_utf8_buffer() var err = ctx.start(HashingContext.HASH_SHA256, key) assert(err == OK) - var msg1 = "this is ".to_utf8() - var msg2 = "super duper secret".to_utf8() + var msg1 = "this is ".to_utf8_buffer() + var msg2 = "super duper secret".to_utf8_buffer() err = ctx.update(msg1) assert(err == OK) err = ctx.update(msg2) @@ -34,11 +34,11 @@ public override void _Ready() { - byte[] key = "supersecret".ToUtf8(); + byte[] key = "supersecret".ToUtf8Buffer(); Error err = _ctx.Start(HashingContext.HashType.Sha256, key); Debug.Assert(err == Error.Ok); - byte[] msg1 = "this is ".ToUtf8(); - byte[] msg2 = "super duper secret".ToUtf8(); + byte[] msg1 = "this is ".ToUtf8Buffer(); + byte[] msg2 = "super duper secret".ToUtf8Buffer(); err = _ctx.Update(msg1); Debug.Assert(err == Error.Ok); err = _ctx.Update(msg2); diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 166ef7a1083..896f9f9cf53 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -78,7 +78,7 @@ <param index="2" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" /> <description> Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. - The [param mode] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. + The [param source] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. For ASTC compression, the [param astc_format] parameter must be supplied. </description> </method> @@ -714,6 +714,12 @@ <constant name="COMPRESS_BPTC" value="3" enum="CompressMode"> Use BPTC compression. </constant> + <constant name="COMPRESS_ASTC" value="4" enum="CompressMode"> + Use ASTC compression. + </constant> + <constant name="COMPRESS_MAX" value="5" enum="CompressMode"> + Represents the size of the [enum CompressMode] enum. + </constant> <constant name="USED_CHANNELS_L" value="0" enum="UsedChannels"> </constant> <constant name="USED_CHANNELS_LA" value="1" enum="UsedChannels"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 60d473a1033..024b8d5a2b6 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -10,7 +10,7 @@ For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [code]edge_connection_margin[/code] to the respective other edge's vertex. You may assign navigation layers to regions with [method NavigationServer2D.region_set_navigation_layers], which then can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. This allows allowing or forbidding some areas to 2D objects. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. - [b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. + [b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing an agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. </description> <tutorials> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 226a1948e18..9407ffbd632 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -662,7 +662,7 @@ <return type="bool" /> <param index="0" name="method" type="StringName" /> <description> - Returns [code]true[/code] if the the given [param method] name exists in the object. + Returns [code]true[/code] if the given [param method] name exists in the object. [b]Note:[/b] In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the [code]MethodName[/code] class to avoid allocating a new [StringName] on each call. </description> </method> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 9107937183c..35ee04cfd87 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -112,7 +112,7 @@ socket = PacketPeerUDP.new() # Server socket.set_dest_address("127.0.0.1", 789) - socket.put_packet("Time to stop".to_ascii()) + socket.put_packet("Time to stop".to_ascii_buffer()) # Client while socket.wait() == OK: @@ -124,7 +124,7 @@ var socket = new PacketPeerUDP(); // Server socket.SetDestAddress("127.0.0.1", 789); - socket.PutPacket("Time to stop".ToAscii()); + socket.PutPacket("Time to stop".ToAsciiBuffer()); // Client while (socket.Wait() == OK) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 78b7e073c79..16c485c0bcc 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1004,7 +1004,7 @@ macOS specific override for the shortcut to add a caret below every caret. </member> <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> - Default [InputEventAction] to move the text cursor the the end of the text. + Default [InputEventAction] to move the text cursor to the end of the text. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> <member name="input/ui_text_caret_document_end.macos" type="Dictionary" setter="" getter=""> @@ -2384,7 +2384,7 @@ [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]). </member> <member name="rendering/textures/vram_compression/import_s3tc_bptc" type="bool" setter="" getter=""> - If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. + If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]). </member> <member name="rendering/textures/webp_compression/compression_method" type="int" setter="" getter="" default="2"> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 161514bc030..36f8eac58be 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Quaternion" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Quaternion. + A unit quaternion used for representing 3D rotations. </brief_description> <description> - A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. - It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation. - Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. + Quaternions are similar to [Basis], which implements the matrix representation of rotations. Unlike [Basis], which stores rotation, scale, and shearing, quaternions only store rotation. + Quaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. + [b]Note:[/b] Quaternions need to be normalized before being used for rotation. </description> <tutorials> <link title="Using 3D transforms">$DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index ec338cb7299..08c1cc4bd37 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1852,7 +1852,7 @@ <method name="lightmap_create"> <return type="RID" /> <description> - Creates a lightmap GI and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. + Creates a lightmap GI and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. This is the internal equivalent of the [LightmapGI] node. </description> @@ -4171,10 +4171,10 @@ <constant name="FOG_VOLUME_SHAPE_MAX" value="5" enum="FogVolumeShape"> </constant> <constant name="VIEWPORT_SCALING_3D_MODE_BILINEAR" value="0" enum="ViewportScaling3DMode"> - Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling. + Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling. </constant> <constant name="VIEWPORT_SCALING_3D_MODE_FSR" value="1" enum="ViewportScaling3DMode"> - Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling. + Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling. </constant> <constant name="VIEWPORT_SCALING_3D_MODE_MAX" value="2" enum="ViewportScaling3DMode"> </constant> diff --git a/doc/classes/ScriptLanguageExtension.xml b/doc/classes/ScriptLanguageExtension.xml index d67fe5d2550..00adbba1ad1 100644 --- a/doc/classes/ScriptLanguageExtension.xml +++ b/doc/classes/ScriptLanguageExtension.xml @@ -361,7 +361,7 @@ The option is local to the location of the code completion query - e.g. a local variable. </constant> <constant name="LOCATION_PARENT_MASK" value="256" enum="CodeCompletionLocation"> - The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in a the class or a parent class. + The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. </constant> <constant name="LOCATION_OTHER_USER_CODE" value="512" enum="CodeCompletionLocation"> The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml index 5a8eec39212..22894380ab2 100644 --- a/doc/classes/ShapeCast2D.xml +++ b/doc/classes/ShapeCast2D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons). - Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity. + Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity. The node can detect multiple collision objects, but it's usually used to detect the first collision. [b]Note:[/b] shape casting is more computationally expensive compared to ray casting. </description> diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml index 907ae73055a..6adf0335280 100644 --- a/doc/classes/ShapeCast3D.xml +++ b/doc/classes/ShapeCast3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons). - Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity. + Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity. The node can detect multiple collision objects, but it's usually used to detect the first collision. [b]Note:[/b] Shape casting is more computationally expensive compared to ray casting. </description> diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml index 8d1cd4b4d4f..f4cd3302eed 100644 --- a/doc/classes/SkeletonModification2DFABRIK.xml +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -5,7 +5,7 @@ </brief_description> <description> This [SkeletonModification2D] uses an algorithm called Forward And Backward Reaching Inverse Kinematics, or FABRIK, to rotate a bone chain so that it reaches a target. - FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. + FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. Then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification2DCCDIK]. FABRIK also supports angle constraints, which are fully taken into account when solving. [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from [Bone2D] nodes! FABRIK joints hold the data needed for each [Bone2D] in the bone chain used by FABRIK. To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index 209602e974e..2513b5e6222 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -13,7 +13,7 @@ <method name="fetch_physical_bones"> <return type="void" /> <description> - Empties the list of [PhysicalBone2D] nodes and populates it will all [PhysicalBone2D] nodes that are children of the [Skeleton2D]. + Empties the list of [PhysicalBone2D] nodes and populates it with all [PhysicalBone2D] nodes that are children of the [Skeleton2D]. </description> </method> <method name="get_physical_bone_node" qualifiers="const"> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 9a70690122a..492efe5007b 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -177,10 +177,10 @@ [b]Note:[/b] To put an ASCII string without prepending its size, you can use [method put_data]: [codeblocks] [gdscript] - put_data("Hello world".to_ascii()) + put_data("Hello world".to_ascii_buffer()) [/gdscript] [csharp] - PutData("Hello World".ToAscii()); + PutData("Hello World".ToAsciiBuffer()); [/csharp] [/codeblocks] </description> @@ -221,10 +221,10 @@ [b]Note:[/b] To put an UTF-8 string without prepending its size, you can use [method put_data]: [codeblocks] [gdscript] - put_data("Hello world".to_utf8()) + put_data("Hello world".to_utf8_buffer()) [/gdscript] [csharp] - PutData("Hello World".ToUtf8()); + PutData("Hello World".ToUtf8Buffer()); [/csharp] [/codeblocks] </description> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 6bcc3c5ea60..87a5773f956 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -103,8 +103,9 @@ Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or [member skew]. [b]Note:[/b] When using beveled corners with 45-degree angles ([member corner_detail] = 1), it is recommended to set [member anti_aliasing] to [code]false[/code] to ensure crisp visuals and avoid possible visual glitches. </member> - <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625"> - This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. + <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="1.0"> + This changes the size of the antialiasing effect. [code]1.0[/code] is recommended for an optimal result at 100% scale, identical to how rounded rectangles are rendered in web browsers and most vector drawing software. + [b]Note:[/b] Higher values may produce a blur effect but can also create undesired artifacts on small boxes with large-radius corners. </member> <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)"> The background color of the stylebox. diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 5b567dbc284..9eb3dba7311 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -242,6 +242,7 @@ <param index="0" name="index" type="int" /> <description> Specifies the smooth group to use for the [i]next[/i] vertex. If this is never called, all vertices will have the default smooth group of [code]0[/code] and will be smoothed with adjacent vertices of the same group. To produce a mesh with flat normals, set the smooth group to [code]-1[/code]. + [b]Note:[/b] This function actually takes an [code]uint32_t[/code], so C# users should use [code]uint32.MaxValue[/code] instead of [code]-1[/code] to produce a mesh with flat normals. </description> </method> <method name="set_tangent"> diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 3c7191392a3..ec69e86f628 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -197,7 +197,7 @@ Sets the maximum width which all tabs should be limited to. Unlimited if set to [code]0[/code]. </member> <member name="scroll_to_selected" type="bool" setter="set_scroll_to_selected" getter="get_scroll_to_selected" default="true"> - If [code]true[/code], the tab offset will be changed to keep the the currently selected tab visible. + If [code]true[/code], the tab offset will be changed to keep the currently selected tab visible. </member> <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true"> if [code]true[/code], the mouse's scroll wheel can be used to navigate the scroll view. diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 6d715784881..98f08f23a0d 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1007,7 +1007,7 @@ <return type="bool" /> <param index="0" name="string" type="String" /> <description> - Returns [code]true[/code] is [param string] is a valid identifier. + Returns [code]true[/code] if [param string] is a valid identifier. If the text server supports the [constant FEATURE_UNICODE_IDENTIFIERS] feature, a valid identifier must: - Conform to normalization form C. - Begin with a Unicode character of class XID_Start or [code]"_"[/code]. @@ -1775,6 +1775,9 @@ <constant name="GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL" value="2048" enum="GraphemeFlag" is_bitfield="true"> It is safe to insert a U+0640 before this grapheme for elongation. </constant> + <constant name="GRAPHEME_IS_EMBEDDED_OBJECT" value="4096" enum="GraphemeFlag" is_bitfield="true"> + Grapheme is an object replacement character for the embedded object. + </constant> <constant name="HINTING_NONE" value="0" enum="Hinting"> Disables font hinting (smoother but less crisp). </constant> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index f240f0a0095..aa025c4e249 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -22,7 +22,7 @@ <method name="_get_height" qualifiers="virtual const"> <return type="int" /> <description> - Called when the the [TextureLayered]'s height is queried. + Called when the [TextureLayered]'s height is queried. </description> </method> <method name="_get_layer_data" qualifiers="virtual const"> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index c371fc3ca2b..23f2623cffd 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -67,7 +67,7 @@ <param index="1" name="atlas_source_id_override" type="int" default="-1" /> <description> Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. - The function returns the added source source ID or -1 if the source could not be added. + The function returns the added source ID or -1 if the source could not be added. </description> </method> <method name="add_terrain"> @@ -578,7 +578,7 @@ <param index="0" name="source_from" type="int" /> <param index="1" name="source_to" type="int" /> <description> - Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlac coordinates ID and the alternative tile ID are kept the same when using source-level proxies. + Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available. Proxied tiles can be automatically replaced in TileMap nodes using the editor. </description> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index 60d1986bee8..ccb6a67a0e2 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -86,7 +86,7 @@ func _process(delta): if !connected: # Try to contact server - udp.put_packet("The answer is... 42!".to_utf8()) + udp.put_packet("The answer is... 42!".to_utf8_buffer()) if udp.get_available_packet_count() > 0: print("Connected: %s" % udp.get_packet().get_string_from_utf8()) connected = true @@ -110,7 +110,7 @@ if (!_connected) { // Try to contact server - _udp.PutPacket("The Answer Is..42!".ToUtf8()); + _udp.PutPacket("The Answer Is..42!".ToUtf8Buffer()); } if (_udp.GetAvailablePacketCount() > 0) { diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index fe85ad7df6a..9988b892db8 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -214,7 +214,7 @@ <return type="bool" /> <param index="0" name="to" type="Vector2" /> <description> - Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_finite" qualifiers="const"> @@ -288,7 +288,7 @@ <return type="Vector2" /> <description> Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized]. - [b]Note:[/b] This function may return incorrect values if the initial vector length is near zero. + [b]Note:[/b] This function may return incorrect values if the input vector length is near zero. </description> </method> <method name="orthogonal" qualifiers="const"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 8c429e86f1b..e08a203d906 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -159,7 +159,7 @@ <return type="Vector2i" /> <param index="0" name="right" type="int" /> <description> - Gets the remainder of each component of the [Vector2i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. + Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. [codeblock] print(Vector2i(10, -20) % 7) # Prints "(3, -6)" [/codeblock] diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index ce411d954e3..dd8d0defb13 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -166,7 +166,7 @@ <return type="Vector3i" /> <param index="0" name="right" type="int" /> <description> - Gets the remainder of each component of the [Vector3i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. + Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers. [codeblock] print(Vector3i(10, -20, 30) % 7) # Prints "(3, -6, 2)" [/codeblock] diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 7f71dc23ec0..cb7a5b2b2d8 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -131,9 +131,9 @@ </method> <method name="is_equal_approx" qualifiers="const"> <return type="bool" /> - <param index="0" name="with" type="Vector4" /> + <param index="0" name="to" type="Vector4" /> <description> - Returns [code]true[/code] if this vector and [param with] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_finite" qualifiers="const"> @@ -164,7 +164,8 @@ <method name="length_squared" qualifiers="const"> <return type="float" /> <description> - Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length]. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="lerp" qualifiers="const"> @@ -198,14 +199,14 @@ <return type="Vector4" /> <param index="0" name="mod" type="float" /> <description> - Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]. + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]. </description> </method> <method name="posmodv" qualifiers="const"> <return type="Vector4" /> <param index="0" name="modv" type="Vector4" /> <description> - Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components. + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components. </description> </method> <method name="round" qualifiers="const"> diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index 0885525d7c4..92e01c7ce43 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -65,7 +65,8 @@ <method name="length_squared" qualifiers="const"> <return type="int" /> <description> - Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length]. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="max_axis_index" qualifiers="const"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 8d92616d6f0..35253dc9ef1 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -258,7 +258,7 @@ If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly. </member> <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true"> - If [code]true[/code], this viewport will mark incoming input events as handled by itself. If [code]false[/code], this is instead done by the the first parent viewport that is set to handle input locally. + If [code]true[/code], this viewport will mark incoming input events as handled by itself. If [code]false[/code], this is instead done by the first parent viewport that is set to handle input locally. A [SubViewportContainer] will automatically set this property to [code]false[/code] for the [Viewport] contained inside of it. See also [method set_input_as_handled] and [method is_input_handled]. </member> @@ -410,10 +410,10 @@ Represents the size of the [enum PositionalShadowAtlasQuadrantSubdiv] enum. </constant> <constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode"> - Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling. + Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less than [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling. </constant> <constant name="SCALING_3D_MODE_FSR" value="1" enum="Scaling3DMode"> - Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling. + Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less than [code]1.0[/code] will be result in the viewport being upscaled using FSR. Values greater than [code]1.0[/code] are not supported and bilinear downsampling will be used instead. A value of [code]1.0[/code] disables scaling. </constant> <constant name="SCALING_3D_MODE_MAX" value="2" enum="Scaling3DMode"> Represents the size of the [enum Scaling3DMode] enum. diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index b2bc6709a0e..3713ca48c60 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -58,7 +58,7 @@ <members> <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1"> The render layer(s) this [VisualInstance3D] is drawn on. - This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. + This object will only be visible for [Camera3D]s whose cull mask includes any of the render layers this [VisualInstance3D] is set to. For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> <member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0"> diff --git a/doc/classes/VisualShaderNodeTextureParameter.xml b/doc/classes/VisualShaderNodeTextureParameter.xml index 8a08bea6596..76a46ea313b 100644 --- a/doc/classes/VisualShaderNodeTextureParameter.xml +++ b/doc/classes/VisualShaderNodeTextureParameter.xml @@ -19,7 +19,7 @@ Sets the texture repeating mode. See [enum TextureRepeat] for options. </member> <member name="texture_source" type="int" setter="set_texture_source" getter="get_texture_source" enum="VisualShaderNodeTextureParameter.TextureSource" default="0"> - Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. see [enum TextureSource] for options. + Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See [enum TextureSource] for options. </member> <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureParameter.TextureType" default="0"> Defines the type of data provided by the source texture. See [enum TextureType] for options. diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index a8237efd168..deef703e0de 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -730,7 +730,7 @@ The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with [member unfocusable]. </constant> <constant name="FLAG_POPUP" value="5" enum="Flags"> - Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [member transient]). + Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [member transient]). </constant> <constant name="FLAG_EXTEND_TO_TITLE" value="6" enum="Flags"> Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with [member extend_to_title]. diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml index 96a6f5decd8..223953ff794 100644 --- a/doc/classes/XRInterface.xml +++ b/doc/classes/XRInterface.xml @@ -70,7 +70,7 @@ <description> Returns the transform for a view/eye. [param view] is the view/eye index. - [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D. + [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the [member Node3D.global_transform] of the current XROrigin3D. </description> </method> <method name="get_view_count"> @@ -246,7 +246,7 @@ Player is free to move around, full positional tracking. </constant> <constant name="XR_PLAY_AREA_STAGE" value="4" enum="PlayAreaMode"> - Same as roomscale but origin point is fixed to the center of the physical space, XRServer.center_on_hmd disabled. + Same as [constant XR_PLAY_AREA_ROOMSCALE] but origin point is fixed to the center of the physical space, [method XRServer.center_on_hmd] disabled. </constant> <constant name="XR_ENV_BLEND_MODE_OPAQUE" value="0" enum="EnvironmentBlendMode"> Opaque blend mode. This is typically used for VR devices. diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml index b74ac1e469e..a2ef6f64378 100644 --- a/doc/classes/XRInterfaceExtension.xml +++ b/doc/classes/XRInterfaceExtension.xml @@ -159,13 +159,13 @@ <method name="_pre_render" qualifiers="virtual"> <return type="void" /> <description> - Called if this [XRInterfaceExtension] is active before rendering starts, most XR interfaces will sync tracking at this point in time. + Called if this [XRInterfaceExtension] is active before rendering starts. Most XR interfaces will sync tracking at this point in time. </description> </method> <method name="_process" qualifiers="virtual"> <return type="void" /> <description> - Called if this [XRInterfaceExtension] is active before our physics and game process is called. most XR interfaces will update its [XRPositionalTracker]s at this point in time. + Called if this [XRInterfaceExtension] is active before our physics and game process is called. Most XR interfaces will update its [XRPositionalTracker]s at this point in time. </description> </method> <method name="_set_anchor_detection_is_enabled" qualifiers="virtual"> diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 522685bf87d..19f2cfd47dc 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1310,6 +1310,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { uint32_t instance_color_offset = 0; bool instance_uses_color = false; bool instance_uses_custom_data = false; + bool use_instancing = false; if (state.canvas_instance_batches[p_index].command_type == Item::Command::TYPE_MESH) { const Item::CommandMesh *m = static_cast<const Item::CommandMesh *>(state.canvas_instance_batches[p_index].command); @@ -1336,6 +1337,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { instance_color_offset = mesh_storage->multimesh_get_color_offset(multimesh); instance_uses_color = mesh_storage->multimesh_uses_colors(multimesh); instance_uses_custom_data = mesh_storage->multimesh_uses_custom_data(multimesh); + use_instancing = true; } else if (state.canvas_instance_batches[p_index].command_type == Item::Command::TYPE_PARTICLES) { const Item::CommandParticles *pt = static_cast<const Item::CommandParticles *>(state.canvas_instance_batches[p_index].command); @@ -1362,6 +1364,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { instance_color_offset = 8; // 8 bytes for instance transform. instance_uses_color = true; instance_uses_custom_data = true; + use_instancing = true; } ERR_FAIL_COND(mesh.is_null()); @@ -1397,7 +1400,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { use_index_buffer = true; } - if (instance_count > 1) { + if (use_instancing) { if (instance_buffer == 0) { break; } @@ -1426,7 +1429,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { } glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - if (instance_count > 1) { + if (use_instancing) { glDisableVertexAttribArray(5); glDisableVertexAttribArray(6); glDisableVertexAttribArray(7); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index b3d6b01c6cc..3d8f7924a78 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1948,7 +1948,7 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_ glDepthFunc(GL_LEQUAL); glDepthMask(GL_TRUE); scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; - scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_OPAQUE; + scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_ALWAYS; if (!fb_cleared) { glClearDepth(1.0f); @@ -1976,19 +1976,17 @@ void RasterizerSceneGLES3::render_scene(const Ref<RenderSceneBuffers> &p_render_ _render_list_template<PASS_MODE_COLOR>(&render_list_params, &render_data, 0, render_list[RENDER_LIST_OPAQUE].elements.size()); + glDepthMask(GL_FALSE); + scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_DISABLED; + if (draw_sky) { RENDER_TIMESTAMP("Render Sky"); - if (scene_state.current_depth_test != GLES3::SceneShaderData::DEPTH_TEST_ENABLED) { - glEnable(GL_DEPTH_TEST); - scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; - } + glEnable(GL_DEPTH_TEST); - glDepthMask(GL_FALSE); glDisable(GL_BLEND); glEnable(GL_CULL_FACE); glCullFace(GL_BACK); scene_state.current_depth_test = GLES3::SceneShaderData::DEPTH_TEST_ENABLED; - scene_state.current_depth_draw = GLES3::SceneShaderData::DEPTH_DRAW_DISABLED; scene_state.cull_mode = GLES3::SceneShaderData::CULL_BACK; _draw_sky(render_data.environment, render_data.cam_projection, render_data.cam_transform, sky_energy_multiplier, p_camera_data->view_count > 1, flip_y); diff --git a/drivers/gles3/shaders/particles.glsl b/drivers/gles3/shaders/particles.glsl index f8741a22abe..40881a1808c 100644 --- a/drivers/gles3/shaders/particles.glsl +++ b/drivers/gles3/shaders/particles.glsl @@ -300,28 +300,23 @@ void main() { vec3 rel_vec = xform[3].xyz - attractors[i].transform[3].xyz; vec3 local_pos = rel_vec * mat3(attractors[i].transform); - switch (attractors[i].type) { - case ATTRACTOR_TYPE_SPHERE: { - dir = safe_normalize(rel_vec); - float d = length(local_pos) / attractors[i].extents.x; - if (d > 1.0) { - continue; - } - amount = max(0.0, 1.0 - d); - } break; - case ATTRACTOR_TYPE_BOX: { - dir = safe_normalize(rel_vec); + if (attractors[i].type == ATTRACTOR_TYPE_SPHERE) { + dir = safe_normalize(rel_vec); + float d = length(local_pos) / attractors[i].extents.x; + if (d > 1.0) { + continue; + } + amount = max(0.0, 1.0 - d); + } else if (attractors[i].type == ATTRACTOR_TYPE_BOX) { + dir = safe_normalize(rel_vec); - vec3 abs_pos = abs(local_pos / attractors[i].extents.xyz); - float d = max(abs_pos.x, max(abs_pos.y, abs_pos.z)); - if (d > 1.0) { - continue; - } - amount = max(0.0, 1.0 - d); - - } break; - case ATTRACTOR_TYPE_VECTOR_FIELD: { - } break; + vec3 abs_pos = abs(local_pos / attractors[i].extents.xyz); + float d = max(abs_pos.x, max(abs_pos.y, abs_pos.z)); + if (d > 1.0) { + continue; + } + amount = max(0.0, 1.0 - d); + } else if (attractors[i].type == ATTRACTOR_TYPE_VECTOR_FIELD) { } amount = pow(amount, attractors[i].attenuation); dir = safe_normalize(mix(dir, attractors[i].transform[2].xyz, attractors[i].directionality)); @@ -383,80 +378,72 @@ void main() { vec3 rel_vec = xform[3].xyz - colliders[i].transform[3].xyz; vec3 local_pos = rel_vec * mat3(colliders[i].transform); - switch (colliders[i].type) { - case COLLIDER_TYPE_SPHERE: { - float d = length(rel_vec) - (particle_size + colliders[i].extents.x); + if (colliders[i].type == COLLIDER_TYPE_SPHERE) { + float d = length(rel_vec) - (particle_size + colliders[i].extents.x); - if (d < 0.0) { + if (d < 0.0) { + col = true; + depth = -d; + normal = normalize(rel_vec); + } + } else if (colliders[i].type == COLLIDER_TYPE_BOX) { + vec3 abs_pos = abs(local_pos); + vec3 sgn_pos = sign(local_pos); + + if (any(greaterThan(abs_pos, colliders[i].extents.xyz))) { + //point outside box + + vec3 closest = min(abs_pos, colliders[i].extents.xyz); + vec3 rel = abs_pos - closest; + depth = length(rel) - particle_size; + if (depth < 0.0) { col = true; - depth = -d; - normal = normalize(rel_vec); + normal = mat3(colliders[i].transform) * (normalize(rel) * sgn_pos); + depth = -depth; } - - } break; - case COLLIDER_TYPE_BOX: { - vec3 abs_pos = abs(local_pos); - vec3 sgn_pos = sign(local_pos); - - if (any(greaterThan(abs_pos, colliders[i].extents.xyz))) { - //point outside box - - vec3 closest = min(abs_pos, colliders[i].extents.xyz); - vec3 rel = abs_pos - closest; - depth = length(rel) - particle_size; - if (depth < 0.0) { - col = true; - normal = mat3(colliders[i].transform) * (normalize(rel) * sgn_pos); - depth = -depth; - } + } else { + //point inside box + vec3 axis_len = colliders[i].extents.xyz - abs_pos; + // there has to be a faster way to do this? + if (all(lessThan(axis_len.xx, axis_len.yz))) { + normal = vec3(1, 0, 0); + } else if (all(lessThan(axis_len.yy, axis_len.xz))) { + normal = vec3(0, 1, 0); } else { - //point inside box - vec3 axis_len = colliders[i].extents.xyz - abs_pos; - // there has to be a faster way to do this? - if (all(lessThan(axis_len.xx, axis_len.yz))) { - normal = vec3(1, 0, 0); - } else if (all(lessThan(axis_len.yy, axis_len.xz))) { - normal = vec3(0, 1, 0); - } else { - normal = vec3(0, 0, 1); - } - - col = true; - depth = dot(normal * axis_len, vec3(1)) + particle_size; - normal = mat3(colliders[i].transform) * (normal * sgn_pos); + normal = vec3(0, 0, 1); } - } break; - case COLLIDER_TYPE_SDF: { - } break; - case COLLIDER_TYPE_HEIGHT_FIELD: { - vec3 local_pos_bottom = local_pos; - local_pos_bottom.y -= particle_size; + col = true; + depth = dot(normal * axis_len, vec3(1)) + particle_size; + normal = mat3(colliders[i].transform) * (normal * sgn_pos); + } + } else if (colliders[i].type == COLLIDER_TYPE_SDF) { + } else if (colliders[i].type == COLLIDER_TYPE_HEIGHT_FIELD) { + vec3 local_pos_bottom = local_pos; + local_pos_bottom.y -= particle_size; - if (any(greaterThan(abs(local_pos_bottom), colliders[i].extents.xyz))) { - continue; - } - const float DELTA = 1.0 / 8192.0; + if (any(greaterThan(abs(local_pos_bottom), colliders[i].extents.xyz))) { + continue; + } + const float DELTA = 1.0 / 8192.0; - vec3 uvw_pos = vec3(local_pos_bottom / colliders[i].extents.xyz) * 0.5 + 0.5; + vec3 uvw_pos = vec3(local_pos_bottom / colliders[i].extents.xyz) * 0.5 + 0.5; - float y = 1.0 - texture(height_field_texture, uvw_pos.xz).r; + float y = 1.0 - texture(height_field_texture, uvw_pos.xz).r; - if (y > uvw_pos.y) { - //inside heightfield + if (y > uvw_pos.y) { + //inside heightfield - vec3 pos1 = (vec3(uvw_pos.x, y, uvw_pos.z) * 2.0 - 1.0) * colliders[i].extents.xyz; - vec3 pos2 = (vec3(uvw_pos.x + DELTA, 1.0 - texture(height_field_texture, uvw_pos.xz + vec2(DELTA, 0)).r, uvw_pos.z) * 2.0 - 1.0) * colliders[i].extents.xyz; - vec3 pos3 = (vec3(uvw_pos.x, 1.0 - texture(height_field_texture, uvw_pos.xz + vec2(0, DELTA)).r, uvw_pos.z + DELTA) * 2.0 - 1.0) * colliders[i].extents.xyz; + vec3 pos1 = (vec3(uvw_pos.x, y, uvw_pos.z) * 2.0 - 1.0) * colliders[i].extents.xyz; + vec3 pos2 = (vec3(uvw_pos.x + DELTA, 1.0 - texture(height_field_texture, uvw_pos.xz + vec2(DELTA, 0)).r, uvw_pos.z) * 2.0 - 1.0) * colliders[i].extents.xyz; + vec3 pos3 = (vec3(uvw_pos.x, 1.0 - texture(height_field_texture, uvw_pos.xz + vec2(0, DELTA)).r, uvw_pos.z + DELTA) * 2.0 - 1.0) * colliders[i].extents.xyz; - normal = normalize(cross(pos1 - pos2, pos1 - pos3)); - float local_y = (vec3(local_pos / colliders[i].extents.xyz) * 0.5 + 0.5).y; + normal = normalize(cross(pos1 - pos2, pos1 - pos3)); + float local_y = (vec3(local_pos / colliders[i].extents.xyz) * 0.5 + 0.5).y; - col = true; - depth = dot(normal, pos1) - dot(normal, local_pos_bottom); - } - - } break; + col = true; + depth = dot(normal, pos1) - dot(normal, local_pos_bottom); + } } if (col) { diff --git a/drivers/gles3/shaders/particles_copy.glsl b/drivers/gles3/shaders/particles_copy.glsl index f273cb7b64b..774aa139b3b 100644 --- a/drivers/gles3/shaders/particles_copy.glsl +++ b/drivers/gles3/shaders/particles_copy.glsl @@ -44,8 +44,12 @@ uniform highp mat4 inv_emission_transform; #define PARTICLE_FLAG_ACTIVE uint(1) +#define FLT_MAX float(3.402823466e+38) + void main() { - mat4 txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); // zero scale, becomes invisible. + // Set scale to zero and translate to -INF so particle will be invisible + // even for materials that ignore rotation/scale (i.e. billboards). + mat4 txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(-FLT_MAX, -FLT_MAX, -FLT_MAX, 0.0)); if (bool(floatBitsToUint(velocity_flags.w) & PARTICLE_FLAG_ACTIVE)) { #ifdef MODE_3D txform = transpose(mat4(xform_1, xform_2, xform_3, vec4(0.0, 0.0, 0.0, 1.0))); @@ -102,9 +106,8 @@ void main() { // as they will be drawn with the node position as origin. txform = inv_emission_transform * txform; #endif - - txform = transpose(txform); } + txform = transpose(txform); instance_color_custom_data = uvec4(packHalf2x16(color.xy), packHalf2x16(color.zw), packHalf2x16(custom.xy), packHalf2x16(custom.zw)); out_xform_1 = txform[0]; diff --git a/drivers/gles3/storage/particles_storage.cpp b/drivers/gles3/storage/particles_storage.cpp index 2b47271408b..4b64e2aec13 100644 --- a/drivers/gles3/storage/particles_storage.cpp +++ b/drivers/gles3/storage/particles_storage.cpp @@ -919,7 +919,7 @@ void ParticlesStorage::_particles_update_instance_buffer(Particles *particles, c glBeginTransformFeedback(GL_POINTS); if (particles->draw_order == RS::PARTICLES_DRAW_ORDER_LIFETIME) { - uint32_t lifetime_split = MIN(particles->amount * particles->phase, particles->amount - 1); + uint32_t lifetime_split = (MIN(int(particles->amount * particles->phase), particles->amount - 1) + 1) % particles->amount; uint32_t stride = particles->process_buffer_stride_cache; glBindBuffer(GL_ARRAY_BUFFER, particles->back_process_buffer); @@ -1135,14 +1135,13 @@ void ParticlesStorage::_particles_reverse_lifetime_sort(Particles *particles) { glGetBufferSubData(GL_ARRAY_BUFFER, 0, buffer_size, particle_array); #endif - uint32_t lifetime_split = MIN(particles->amount * particles->sort_buffer_phase, particles->amount - 1); - + uint32_t lifetime_split = (MIN(int(particles->amount * particles->sort_buffer_phase), particles->amount - 1) + 1) % particles->amount; for (uint32_t i = 0; i < lifetime_split / 2; i++) { - SWAP(particle_array[i], particle_array[lifetime_split - i]); + SWAP(particle_array[i], particle_array[lifetime_split - i - 1]); } for (uint32_t i = 0; i < (particles->amount - lifetime_split) / 2; i++) { - SWAP(particle_array[lifetime_split + i + 1], particle_array[particles->amount - 1 - i]); + SWAP(particle_array[lifetime_split + i], particle_array[particles->amount - 1 - i]); } #ifndef __EMSCRIPTEN__ diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index befe84f3115..ddbbdb1c6a1 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -119,7 +119,7 @@ void ConnectDialog::ok_pressed() { return; } - if (!method_name.strip_edges().is_valid_identifier()) { + if (!TS->is_valid_identifier(method_name.strip_edges())) { error->set_text(TTR("Method name must be a valid identifier.")); error->popup_centered(); return; @@ -228,7 +228,7 @@ StringName ConnectDialog::generate_method_callback_name(Node *p_source, String p String node_name = p_source->get_name(); for (int i = 0; i < node_name.length(); i++) { // TODO: Regex filter may be cleaner. char32_t c = node_name[i]; - if (!is_ascii_identifier_char(c)) { + if ((i == 0 && !is_unicode_identifier_start(c)) || (i > 0 && !is_unicode_identifier_continue(c))) { if (c == ' ') { // Replace spaces with underlines. c = '_'; @@ -338,11 +338,6 @@ void ConnectDialog::_update_method_tree() { // If a script is attached, get methods from it. ScriptInstance *si = target->get_script_instance(); if (si) { - TreeItem *si_item = method_tree->create_item(root_item); - si_item->set_text(0, TTR("Attached Script")); - si_item->set_icon(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons"))); - si_item->set_selectable(0, false); - if (si->get_script()->is_built_in()) { si->get_script()->reload(); } @@ -350,9 +345,12 @@ void ConnectDialog::_update_method_tree() { si->get_method_list(&methods); methods = _filter_method_list(methods, signal_info, search_string); - if (methods.is_empty()) { - si_item->set_custom_color(0, disabled_color); - } else { + if (!methods.is_empty()) { + TreeItem *si_item = method_tree->create_item(root_item); + si_item->set_text(0, TTR("Attached Script")); + si_item->set_icon(0, get_theme_icon(SNAME("Script"), SNAME("EditorIcons"))); + si_item->set_selectable(0, false); + _create_method_tree_items(methods, si_item); } } @@ -687,8 +685,10 @@ ConnectDialog::ConnectDialog() { method_tree->connect("item_activated", callable_mp((Window *)method_popup, &Window::hide)); empty_tree_label = memnew(Label(TTR("No method found matching given filters."))); - method_tree->add_child(empty_tree_label); - empty_tree_label->set_anchors_and_offsets_preset(Control::PRESET_CENTER); + method_popup->add_child(empty_tree_label); + empty_tree_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); + empty_tree_label->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER); + empty_tree_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD); script_methods_only = memnew(CheckButton(TTR("Script Methods Only"))); method_vbc->add_child(script_methods_only); diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp index e5f74762f67..4a95047a719 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp @@ -970,6 +970,7 @@ void DebugAdapterProtocol::poll() { List<Ref<DAPeer>> to_delete; for (List<Ref<DAPeer>>::Element *E = clients.front(); E; E = E->next()) { Ref<DAPeer> peer = E->get(); + peer->connection->poll(); StreamPeerTCP::Status status = peer->connection->get_status(); if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) { to_delete.push_back(peer); diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 296181f79da..cc88424c55c 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -91,7 +91,12 @@ void EditorLog::_update_theme() { log->add_theme_font_override("mono_font", mono_font); } - log->add_theme_font_size_override("normal_font_size", get_theme_font_size(SNAME("output_source_size"), SNAME("EditorFonts"))); + const int font_size = get_theme_font_size(SNAME("output_source_size"), SNAME("EditorFonts")); + log->add_theme_font_size_override("normal_font_size", font_size); + log->add_theme_font_size_override("bold_font_size", font_size); + log->add_theme_font_size_override("italics_font_size", font_size); + log->add_theme_font_size_override("mono_font_size", font_size); + log->add_theme_color_override("selection_color", get_theme_color(SNAME("accent_color"), SNAME("Editor")) * Color(1, 1, 1, 0.4)); type_filter_map[MSG_TYPE_STD]->toggle_button->set_icon(get_theme_icon(SNAME("Popup"), SNAME("EditorIcons"))); @@ -273,6 +278,11 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) { return; } + if (unlikely(log->is_updating())) { + // The new message arrived during log RTL text processing/redraw (invalid BiDi control characters / font error), ignore it to avoid RTL data corruption. + return; + } + // Only add the message to the log if it passes the filters. bool filter_active = type_filter_map[p_message.type]->is_active(); String search_text = search_box->get_text(); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0e17c72d901..359d17b277c 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1145,7 +1145,7 @@ void EditorNode::_scan_external_changes() { } if (need_reload) { - disk_changed->call_deferred(SNAME("popup_centered_ratio"), 0.5); + disk_changed->call_deferred(SNAME("popup_centered_ratio"), 0.3); } } @@ -2761,6 +2761,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } } + save_confirmation->reset_size(); save_confirmation->popup_centered(); break; } @@ -3074,6 +3075,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { save_confirmation->set_ok_button_text(TTR("Save & Quit")); save_confirmation->set_text((p_option == FILE_QUIT ? TTR("Save changes to the following scene(s) before quitting?") : TTR("Save changes to the following scene(s) before opening Project Manager?")) + unsaved_scenes); } + save_confirmation->reset_size(); save_confirmation->popup_centered(); } } @@ -5534,6 +5536,7 @@ void EditorNode::_scene_tab_closed(int p_tab, int option) { if (unsaved) { save_confirmation->set_ok_button_text(TTR("Save & Close")); save_confirmation->set_text(vformat(TTR("Save changes to '%s' before closing?"), !scene->get_scene_file_path().is_empty() ? scene->get_scene_file_path() : "unsaved scene")); + save_confirmation->reset_size(); save_confirmation->popup_centered(); } else { _discard_changes(); @@ -7830,6 +7833,7 @@ EditorNode::EditorNode() { save_confirmation = memnew(ConfirmationDialog); save_confirmation->add_button(TTR("Don't Save"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard"); gui_base->add_child(save_confirmation); + save_confirmation->set_min_size(Vector2(450.0 * EDSCALE, 0)); save_confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current)); save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes)); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 0d480c78963..31668416ace 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -834,7 +834,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_focus_color", "MenuButton", font_focus_color); theme->set_color("font_outline_color", "MenuButton", font_outline_color); - theme->set_constant("outline_size", "MenuButton", 0 * EDSCALE); + theme->set_constant("outline_size", "MenuButton", 0); theme->set_stylebox("MenuHover", "EditorStyles", style_widget_hover); @@ -860,7 +860,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "Button", icon_disabled_color); theme->set_constant("h_separation", "Button", 2 * EDSCALE); - theme->set_constant("outline_size", "Button", 0 * EDSCALE); + theme->set_constant("outline_size", "Button", 0); const float ACTION_BUTTON_EXTRA_MARGIN = 32 * EDSCALE; @@ -917,7 +917,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "MenuBar", icon_disabled_color); theme->set_constant("h_separation", "MenuBar", 4 * EDSCALE); - theme->set_constant("outline_size", "MenuBar", 0 * EDSCALE); + theme->set_constant("outline_size", "MenuBar", 0); // OptionButton Ref<StyleBoxFlat> style_option_button_focus = style_widget_focus->duplicate(); @@ -961,7 +961,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("arrow_margin", "OptionButton", widget_default_margin.x - 2 * EDSCALE); theme->set_constant("modulate_arrow", "OptionButton", true); theme->set_constant("h_separation", "OptionButton", 4 * EDSCALE); - theme->set_constant("outline_size", "OptionButton", 0 * EDSCALE); + theme->set_constant("outline_size", "OptionButton", 0); // CheckButton theme->set_stylebox("normal", "CheckButton", style_menu); @@ -995,8 +995,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "CheckButton", icon_disabled_color); theme->set_constant("h_separation", "CheckButton", 8 * EDSCALE); - theme->set_constant("check_v_offset", "CheckButton", 0 * EDSCALE); - theme->set_constant("outline_size", "CheckButton", 0 * EDSCALE); + theme->set_constant("check_v_offset", "CheckButton", 0); + theme->set_constant("outline_size", "CheckButton", 0); // Checkbox Ref<StyleBoxFlat> sb_checkbox = style_menu->duplicate(); @@ -1031,8 +1031,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_disabled_color", "CheckBox", icon_disabled_color); theme->set_constant("h_separation", "CheckBox", 8 * EDSCALE); - theme->set_constant("check_v_offset", "CheckBox", 0 * EDSCALE); - theme->set_constant("outline_size", "CheckBox", 0 * EDSCALE); + theme->set_constant("check_v_offset", "CheckBox", 0); + theme->set_constant("outline_size", "CheckBox", 0); // PopupDialog theme->set_stylebox("panel", "PopupDialog", style_popup); @@ -1087,7 +1087,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const int vsep_base = extra_spacing + default_margin_size + 6; const int force_even_vsep = vsep_base + (vsep_base % 2); theme->set_constant("v_separation", "PopupMenu", force_even_vsep * EDSCALE); - theme->set_constant("outline_size", "PopupMenu", 0 * EDSCALE); + theme->set_constant("outline_size", "PopupMenu", 0); theme->set_constant("item_start_padding", "PopupMenu", default_margin_size * 1.5 * EDSCALE); theme->set_constant("item_end_padding", "PopupMenu", default_margin_size * 1.5 * EDSCALE); @@ -1206,7 +1206,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("button_margin", "Tree", default_margin_size * EDSCALE); theme->set_constant("scroll_border", "Tree", 40 * EDSCALE); theme->set_constant("scroll_speed", "Tree", 12); - theme->set_constant("outline_size", "Tree", 0 * EDSCALE); + theme->set_constant("outline_size", "Tree", 0); const Color guide_color = mono_color * Color(1, 1, 1, 0.05); Color relationship_line_color = mono_color * Color(1, 1, 1, relationship_line_opacity); @@ -1302,7 +1302,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("h_separation", "ItemList", 6 * EDSCALE); theme->set_constant("icon_margin", "ItemList", 6 * EDSCALE); theme->set_constant("line_separation", "ItemList", 3 * EDSCALE); - theme->set_constant("outline_size", "ItemList", 0 * EDSCALE); + theme->set_constant("outline_size", "ItemList", 0); // TabBar & TabContainer Ref<StyleBoxFlat> style_tabbar_background = make_flat_stylebox(dark_color_1, 0, 0, 0, 0, corner_radius * EDSCALE); @@ -1340,9 +1340,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_icon("drop_mark", "TabContainer", theme->get_icon(SNAME("GuiTabDropMark"), SNAME("EditorIcons"))); theme->set_icon("drop_mark", "TabBar", theme->get_icon(SNAME("GuiTabDropMark"), SNAME("EditorIcons"))); theme->set_constant("side_margin", "TabContainer", 0); - theme->set_constant("outline_size", "TabContainer", 0 * EDSCALE); + theme->set_constant("outline_size", "TabContainer", 0); theme->set_constant("h_separation", "TabBar", 4 * EDSCALE); - theme->set_constant("outline_size", "TabBar", 0 * EDSCALE); + theme->set_constant("outline_size", "TabBar", 0); // Content of each tab. Ref<StyleBoxFlat> style_content_panel = style_default->duplicate(); @@ -1438,7 +1438,10 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("selection_color", "LineEdit", selection_color); theme->set_color("clear_button_color", "LineEdit", font_color); theme->set_color("clear_button_color_pressed", "LineEdit", accent_color); - theme->set_constant("outline_size", "LineEdit", 0 * EDSCALE); + + theme->set_constant("minimum_character_width", "LineEdit", 4); + theme->set_constant("outline_size", "LineEdit", 0); + theme->set_constant("caret_width", "LineEdit", 1); // TextEdit theme->set_stylebox("normal", "TextEdit", style_line_edit); @@ -1455,7 +1458,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("background_color", "TextEdit", Color(0, 0, 0, 0)); theme->set_constant("line_spacing", "TextEdit", 4 * EDSCALE); - theme->set_constant("outline_size", "TextEdit", 0 * EDSCALE); + theme->set_constant("outline_size", "TextEdit", 0); + theme->set_constant("caret_width", "TextEdit", 1); theme->set_icon("h_grabber", "SplitContainer", theme->get_icon(SNAME("GuiHsplitter"), SNAME("EditorIcons"))); theme->set_icon("v_grabber", "SplitContainer", theme->get_icon(SNAME("GuiVsplitter"), SNAME("EditorIcons"))); @@ -1592,7 +1596,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("shadow_offset_x", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * EDSCALE); theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * EDSCALE); - theme->set_constant("outline_size", "RichTextLabel", 0 * EDSCALE); + theme->set_constant("outline_size", "RichTextLabel", 0); theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox()); theme->set_stylebox("normal", "RichTextLabel", style_tree_bg); @@ -1636,7 +1640,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_constant("shadow_offset_y", "Label", 1 * EDSCALE); theme->set_constant("shadow_outline_size", "Label", 1 * EDSCALE); theme->set_constant("line_spacing", "Label", 3 * EDSCALE); - theme->set_constant("outline_size", "Label", 0 * EDSCALE); + theme->set_constant("outline_size", "Label", 0); // LinkButton theme->set_stylebox("focus", "LinkButton", style_empty); @@ -1648,7 +1652,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("font_disabled_color", "LinkButton", font_disabled_color); theme->set_color("font_outline_color", "LinkButton", font_outline_color); - theme->set_constant("outline_size", "LinkButton", 0 * EDSCALE); + theme->set_constant("outline_size", "LinkButton", 0); // TooltipPanel + TooltipLabel // TooltipPanel is also used for custom tooltips, while TooltipLabel @@ -1685,7 +1689,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("fill", "ProgressBar", make_stylebox(theme->get_icon(SNAME("GuiProgressFill"), SNAME("EditorIcons")), 6, 6, 6, 6, 2, 1, 2, 1)); theme->set_color("font_color", "ProgressBar", font_color); theme->set_color("font_outline_color", "ProgressBar", font_outline_color); - theme->set_constant("outline_size", "ProgressBar", 0 * EDSCALE); + theme->set_constant("outline_size", "ProgressBar", 0); // GraphEdit theme->set_stylebox("bg", "GraphEdit", style_tree_bg); diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index 10c3e963af1..866a6db2a65 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -145,6 +145,12 @@ void EditorToaster::_notification(int p_what) { } void EditorToaster::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { + // This may be called from a thread. Since we will deal with non-thread-safe elements, + // we have to put it in the queue for safety. + callable_mp_static(&EditorToaster::_error_handler_impl).bind(p_file, p_line, p_error, p_errorexp, p_editor_notify, p_type).call_deferred(); +} + +void EditorToaster::_error_handler_impl(const String &p_file, int p_line, const String &p_error, const String &p_errorexp, bool p_editor_notify, int p_type) { if (!EditorToaster::get_singleton() || !EditorToaster::get_singleton()->is_inside_tree()) { return; } @@ -158,13 +164,8 @@ void EditorToaster::_error_handler(void *p_self, const char *p_func, const char int show_all_setting = EDITOR_GET("interface/editor/show_internal_errors_in_toast_notifications"); if (p_editor_notify || (show_all_setting == 0 && in_dev) || show_all_setting == 1) { - String err_str; - if (p_errorexp && p_errorexp[0]) { - err_str = String::utf8(p_errorexp); - } else { - err_str = String::utf8(p_error); - } - String tooltip_str = String::utf8(p_file) + ":" + itos(p_line); + String err_str = !p_errorexp.is_empty() ? p_errorexp : p_error; + String tooltip_str = p_file + ":" + itos(p_line); if (!p_editor_notify) { if (p_type == ERR_HANDLER_WARNING) { @@ -174,7 +175,7 @@ void EditorToaster::_error_handler(void *p_self, const char *p_func, const char } } - Severity severity = (p_type == ERR_HANDLER_WARNING) ? SEVERITY_WARNING : SEVERITY_ERROR; + Severity severity = ((ErrorHandlerType)p_type == ERR_HANDLER_WARNING) ? SEVERITY_WARNING : SEVERITY_ERROR; EditorToaster::get_singleton()->popup_str(err_str, severity, tooltip_str); } } diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h index 6b834f82889..4837756b4ef 100644 --- a/editor/editor_toaster.h +++ b/editor/editor_toaster.h @@ -89,6 +89,7 @@ private: const double default_message_duration = 5.0; static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type); + static void _error_handler_impl(const String &p_file, int p_line, const String &p_error, const String &p_errorexp, bool p_editor_notify, int p_type); void _update_vbox_position(); void _update_disable_notifications_button(); void _auto_hide_or_free_toasts(); diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 3dd01754a35..89e2e36b772 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -245,6 +245,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ String current_group; uint32_t smooth_group = 0; bool smoothing = true; + const uint32_t no_smoothing_smooth_group = (uint32_t)-1; while (true) { String l = f->get_line().strip_edges(); @@ -349,10 +350,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ if (!colors.is_empty()) { surf_tool->set_color(colors[vtx]); } - if (!smoothing) { - smooth_group++; - } - surf_tool->set_smooth_group(smooth_group); + surf_tool->set_smooth_group(smoothing ? smooth_group : no_smoothing_smooth_group); surf_tool->add_vertex(vertex); } @@ -367,8 +365,10 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_ do_smooth = true; } if (do_smooth != smoothing) { - smooth_group++; smoothing = do_smooth; + if (smoothing) { + smooth_group++; + } } } else if (/*l.begins_with("g ") ||*/ l.begins_with("usemtl ") || (l.begins_with("o ") || f->eof_reached())) { //commit group to mesh //groups are too annoying diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 4814b9ae3bd..9522ab6e7ea 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1239,6 +1239,7 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo bool panner_active = panner->gui_input(p_event, warped_panning ? viewport->get_global_rect() : Rect2()); if (panner->is_panning() != pan_pressed) { pan_pressed = panner->is_panning(); + _update_cursor(); } if (panner_active) { diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index e4435485505..e110e524543 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -5162,10 +5162,10 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p position_control->set_navigation_mode(Node3DEditorViewport::NAVIGATION_MOVE); position_control->set_custom_minimum_size(Size2(navigation_control_size, navigation_control_size) * EDSCALE); position_control->set_h_size_flags(SIZE_SHRINK_END); - position_control->set_anchor_and_offset(SIDE_LEFT, ANCHOR_BEGIN, 0 * EDSCALE); + position_control->set_anchor_and_offset(SIDE_LEFT, ANCHOR_BEGIN, 0); position_control->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -navigation_control_size * EDSCALE); position_control->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_BEGIN, navigation_control_size * EDSCALE); - position_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0 * EDSCALE); + position_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0); position_control->set_viewport(this); surface->add_child(position_control); @@ -5175,8 +5175,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p look_control->set_h_size_flags(SIZE_SHRINK_END); look_control->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -navigation_control_size * EDSCALE); look_control->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -navigation_control_size * EDSCALE); - look_control->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_END, 0 * EDSCALE); - look_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0 * EDSCALE); + look_control->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_END, 0); + look_control->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, 0); look_control->set_viewport(this); surface->add_child(look_control); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a749e6de410..46218869b36 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1060,7 +1060,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref<Resource> p_for_script) { script_editor->reload_scripts(); need_reload = false; } else { - disk_changed->call_deferred(SNAME("popup_centered_ratio"), 0.5); + disk_changed->call_deferred(SNAME("popup_centered_ratio"), 0.3); } } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index af761a2cea2..a563d17c57c 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -5931,7 +5931,7 @@ VisualShaderEditor::VisualShaderEditor() { add_options.push_back(AddOption("ATanH", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_ATANH, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); add_options.push_back(AddOption("ATanH", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_ATANH, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("ATanH", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Returns the inverse hyperbolic tangent of the parameter."), { VisualShaderNodeVectorFunc::FUNC_ATANH, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D)); - add_options.push_back(AddOption("Ceil", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), { VisualShaderNodeVectorFunc::FUNC_CEIL }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); + add_options.push_back(AddOption("Ceil", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), { VisualShaderNodeVectorFunc::FUNC_CEIL, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); add_options.push_back(AddOption("Ceil", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), { VisualShaderNodeVectorFunc::FUNC_CEIL, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_3D }, VisualShaderNode::PORT_TYPE_VECTOR_3D)); add_options.push_back(AddOption("Ceil", "Vector/Functions", "VisualShaderNodeVectorFunc", TTR("Finds the nearest integer that is greater than or equal to the parameter."), { VisualShaderNodeVectorFunc::FUNC_CEIL, VisualShaderNodeVectorFunc::OP_TYPE_VECTOR_4D }, VisualShaderNode::PORT_TYPE_VECTOR_4D)); add_options.push_back(AddOption("Clamp", "Vector/Functions", "VisualShaderNodeClamp", TTR("Constrains a value to lie between two further values."), { VisualShaderNodeClamp::OP_TYPE_VECTOR_2D }, VisualShaderNode::PORT_TYPE_VECTOR_2D)); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 5ae90224a4c..75773edc867 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2256,7 +2256,7 @@ void ProjectManager::_open_selected_projects_ask() { return; } - const Size2i popup_min_size = Size2i(600.0 * EDSCALE, 400.0 * EDSCALE); + const Size2i popup_min_size = Size2i(600.0 * EDSCALE, 0); if (selected_list.size() > 1) { multi_open_ask->set_text(vformat(TTR("You requested to open %d projects in parallel. Do you confirm?\nNote that usual checks for engine version compatibility will be bypassed."), selected_list.size())); @@ -2341,7 +2341,7 @@ void ProjectManager::_open_selected_projects_ask() { void ProjectManager::_full_convert_button_pressed() { ask_update_settings->hide(); - ask_full_convert_dialog->popup_centered(Size2i(600.0 * EDSCALE, 400.0 * EDSCALE)); + ask_full_convert_dialog->popup_centered(Size2i(600.0 * EDSCALE, 0)); ask_full_convert_dialog->get_cancel_button()->grab_focus(); } diff --git a/logo_outlined.png b/logo_outlined.png index 44b85cde574..f834ec395c8 100644 Binary files a/logo_outlined.png and b/logo_outlined.png differ diff --git a/logo_outlined.svg b/logo_outlined.svg index 4079a1dd564..8ddc5642950 100644 --- a/logo_outlined.svg +++ b/logo_outlined.svg @@ -1,23 +1,23 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" version="1.1" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" + inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" xml:space="preserve" width="1024" height="414" viewBox="0 0 960.00002 388.12499" sodipodi:docname="logo_outlined.svg" - inkscape:export-filename="/home/riteo/srg/godot-riteo/logo_outlined.png" + inkscape:export-filename="logo_outlined.png" inkscape:export-xdpi="48" - inkscape:export-ydpi="48"><metadata + inkscape:export-ydpi="48" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata8"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs @@ -36,14 +36,14 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1916" - inkscape:window-height="1025" + inkscape:window-height="1036" id="namedview4" showgrid="false" inkscape:zoom="1.2041016" - inkscape:cx="512" - inkscape:cy="207" - inkscape:window-x="1360" - inkscape:window-y="53" + inkscape:cx="519.88968" + inkscape:cy="232.95376" + inkscape:window-x="1920" + inkscape:window-y="20" inkscape:window-maximized="1" inkscape:current-layer="g14" fit-margin-top="48" @@ -62,7 +62,9 @@ inkscape:snap-bbox-midpoints="false" inkscape:object-nodes="true" inkscape:snap-others="false" - units="px" /><g + units="px" + inkscape:showpageshadow="2" + inkscape:deskcolor="#d1d1d1" /><g id="g10" inkscape:groupmode="layer" inkscape:label="godot_engine_logo_2017_curves-01" @@ -92,10 +94,14 @@ style="stroke:none;stroke-width:10.60874228;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" /><g id="g36" transform="matrix(1.1310535,0,0,1.1310535,468.26549,336.71278)" - style="stroke:none;stroke-width:10.60874228;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"><path - id="path38" - style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:15.5885606;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" - d="m 0,0 c -6.078,0.094 -13.034,-1.173 -13.034,-1.173 v -11.863 h 6.995 l -0.078,-5.288 c 0,-1.959 -1.942,-2.943 -5.815,-2.943 -3.878,0 -7.303,1.642 -10.274,4.917 -2.978,3.279 -4.459,8.072 -4.459,14.388 0,6.329 1.447,10.995 4.345,14.006 2.892,3.008 6.683,4.517 11.346,4.517 1.959,0 3.987,-0.316 6.096,-0.961 2.11,-0.639 3.519,-1.238 4.238,-1.799 0.713,-0.577 1.391,-0.85 2.032,-0.85 0.638,0 1.671,0.746 3.1,2.255 1.431,1.505 2.713,3.786 3.844,6.827 1.126,3.057 1.69,5.4 1.69,7.062 0,1.649 -0.036,2.786 -0.109,3.386 -1.581,1.73 -4.499,3.102 -8.755,4.122 -4.248,1.017 -9.011,1.522 -14.28,1.522 -11.594,0 -20.66,-3.65 -27.207,-10.95 -6.552,-7.303 -9.822,-16.783 -9.822,-28.452 0,-13.701 3.347,-24.087 10.041,-31.162 6.706,-7.074 15.51,-10.607 26.425,-10.607 5.87,0 11.08,0.505 15.632,1.522 4.557,1.013 7.586,2.053 9.093,3.105 l 0.452,35.33 C 11.496,-1.036 6.078,-0.104 0,0 m 283.58148,-40.1198 c 0,-1.496 -3.721,-2.255 -11.176,-2.255 -7.448,0 -11.18,0.759 -11.18,2.255 v 56.681 h -13.545 c -1.281,0 -2.185,1.727 -2.71,5.198 -0.226,1.652 -0.334,3.343 -0.334,5.077 0,1.724 0.108,3.422 0.334,5.077 0.525,3.462 1.429,5.202 2.71,5.202 h 49.112 c 1.279,0 2.179,-1.74 2.712,-5.202 0.221,-1.655 0.335,-3.353 0.335,-5.077 0,-1.734 -0.114,-3.425 -0.335,-5.077 -0.533,-3.471 -1.433,-5.198 -2.712,-5.198 h -13.211 z M 205.6005,16.447401 c -3.612,0 -6.645,-1.659 -9.095,-4.967 -2.44,-3.3110004 -3.662,-7.9580004 -3.662,-13.9380004 0,-5.993 1.169,-10.5809996 3.499,-13.7779996 2.33,-3.207 5.398,-4.804 9.2,-4.804 3.801,0 6.89,1.617 9.258,4.862 2.372,3.233 3.56,7.8609996 3.56,13.8859996 0,6.02 -1.225,10.654 -3.671,13.8900004 -2.447,3.232 -5.473,4.849 -9.089,4.849 m -0.058,-59.493 c -10.577,0 -19.193,3.46 -25.851,10.379 -6.663,6.925 -9.993,17.03 -9.993,30.3139996 0,13.2920004 3.367,23.3560004 10.1,30.2090004 6.741,6.844 15.431,10.269 26.086,10.269 10.651,0 19.246,-3.363 25.797,-10.109 6.55,-6.733 9.822,-16.94 9.822,-30.5910004 0,-13.6609996 -3.349,-23.8219996 -10.05,-30.4899996 -6.699,-6.654 -15.338,-9.981 -25.911,-9.981 m -82.13011,58.710808 v -33.768 c 0,-1.577 0.116,-2.571 0.342,-2.988 0.224,-0.415 0.903,-0.623 2.029,-0.623 4.144,0 7.283,1.548 9.429,4.634 2.151,3.083 3.215,8.2160005 3.215,15.4050005 0,7.192 -1.113,11.8779995 -3.325,14.0549995 -2.223,2.183 -5.744,3.285 -10.561,3.285 z m -21.675,-52.392 v 67.735 c 0,1.883 0.468,3.369 1.413,4.471 0.939,1.085 2.161,1.636 3.671,1.636 h 18.854 c 11.965,0 21.053,-3.018 27.257,-9.04 6.215,-6.02 9.322,-15.499 9.322,-28.44699953 0,-27.70000047 -11.821,-41.54700047 -35.456,-41.54700047 h -19.302 c -3.836,0 -5.759,1.727 -5.759,5.192 M 55.862999,16.447401 c -3.611,0 -6.636,-1.659 -9.09,-4.967 -2.441,-3.3110004 -3.668,-7.9580004 -3.668,-13.9380004 0,-5.993 1.166,-10.5809996 3.503,-13.7779996 2.333,-3.207 5.398,-4.804 9.2,-4.804 3.8,0 6.887,1.617 9.258,4.862 2.371,3.233 3.559,7.8609996 3.559,13.8859996 0,6.02 -1.227,10.654 -3.673,13.8900004 -2.443,3.232 -5.473,4.849 -9.089,4.849 m -0.055,-59.493 c -10.573,0 -19.195,3.46 -25.859,10.379 -6.655,6.925 -9.984,17.03 -9.984,30.3139996 0,13.2920004 3.367,23.3560004 10.101,30.2090004 6.736,6.844 15.431,10.269 26.082,10.269 10.649,0 19.251,-3.363 25.794,-10.109 6.555,-6.733 9.827,-16.94 9.827,-30.5910004 0,-13.6609996 -3.348,-23.8219996 -10.05,-30.4899996 -6.702,-6.654 -15.333,-9.981 -25.911,-9.981" /></g><g + style="stroke-width:10.60874228;stroke-linejoin:round;paint-order:markers stroke fill"><g + id="path38"><path + style="color:#000000;fill:#ffffff;-inkscape-stroke:none" + d="m -13.681641,-50.839844 c -12.596904,0 -23.922227,4.43354 -32.080078,13.039063 a 7.79506,7.79506 0 0 0 -0.0059,0.0059 c -8.419793,8.89902 -12.173828,21.547223 -12.173828,36.5175783 0,13.1245257 3.885011,24.8172657 11.814453,33.6562497 8.072696,9.001174 19.779925,13.541016 33.009765,13.541016 5.7670161,0 11.130982,-0.548208 16.0937505,-1.736328 a 7.79506,7.79506 0 0 0 0.00195,0 C 7.9897789,42.982586 12.251503,41.478866 15.669922,37.738281 a 7.79506,7.79506 0 0 0 1.984375,-4.316406 c 0.178476,-1.466931 0.166015,-2.563734 0.166015,-4.326172 0,-3.425323 -0.889241,-6.278915 -2.169921,-9.755859 a 7.79506,7.79506 0 0 0 -0.0098,-0.02344 C 14.283054,15.666208 12.680545,12.507843 10.142578,9.8378906 9.2271105,8.8715838 8.3606463,8.0299624 7.2246094,7.2050781 7.2197468,7.2015474 7.2119011,7.1969043 7.2070312,7.1933594 8.0837303,7.0601219 8.9770024,6.9723347 9.8300781,6.7695312 10.775034,6.544885 11.736616,6.2312768 12.738281,5.8125 c 1.225424,11.0403 4.918921,20.536176 11.767578,27.505859 a 7.79506,7.79506 0 0 0 0.0059,0.0059 c 8.176259,8.307351 19.314813,12.595703 31.636718,12.595703 12.285007,0 23.361037,-4.205988 31.378907,-12.466797 l 0.0059,-0.0059 c 2.599207,-2.671035 4.689876,-5.754167 6.410156,-9.125 v 6.685546 c 0,3.174455 0.919882,6.779853 3.291016,9.544922 a 7.79506,7.79506 0 0 0 0.02148,0.02734 c 2.274218,2.627823 6.160321,4.330078 9.566411,4.330078 h 18.85351 c 13.27236,0 24.68019,-3.475272 32.67969,-11.236328 l 0.004,-0.0039 c 3.50739,-3.398515 6.103,-7.548801 7.98047,-12.251953 1.95158,4.481627 4.55037,8.492643 7.89844,11.90039 a 7.79506,7.79506 0 0 0 0.008,0.0078 c 8.17873,8.303689 19.3134,12.59375 31.63868,12.59375 12.28913,0 23.36042,-4.210522 31.38281,-12.46875 0.0204,-0.02093 0.0363,-0.04543 0.0566,-0.06641 0.32316,2.067188 0.71217,3.928778 1.80469,6.027343 1.14745,2.204109 4.38126,5.498047 8.55078,5.498047 h 49.11328 c 4.17404,0 7.40475,-3.301165 8.54883,-5.5 1.14408,-2.198835 1.52822,-4.121552 1.86523,-6.310547 a 7.79506,7.79506 0 0 0 0.0234,-0.154297 c 0.26703,-1.999711 0.40234,-4.041777 0.40234,-6.109375 0,-2.075615 -0.13536,-4.113677 -0.40234,-6.109375 a 7.79506,7.79506 0 0 0 -0.0215,-0.15039 c -0.33695,-2.194334 -0.72026,-4.119614 -1.86914,-6.322266 -1.14887,-2.202652 -4.39924,-5.4863279 -8.54687,-5.4863279 H 291.375 V -40.119141 c 0,-3.605114 -2.68219,-6.578534 -4.45703,-7.652343 -1.77484,-1.07381 -3.15956,-1.387588 -4.58399,-1.675782 -2.84884,-0.576386 -5.93572,-0.722656 -9.92773,-0.722656 -3.98876,0 -7.07885,0.146842 -9.92773,0.722656 -1.42445,0.287907 -2.80774,0.600519 -4.58204,1.671875 -1.77429,1.071357 -4.46484,4.041584 -4.46484,7.65625 V 8.7675781 h -4.97852 c 0.53826,-3.6028951 0.84375,-7.3707461 0.84375,-11.3417969 0,-14.9348322 -3.75874,-27.4709582 -12.3457,-36.0156252 a 7.79506,7.79506 0 0 0 -0.006,-0.0039 c -8.15443,-8.099651 -19.19427,-12.246094 -31.40234,-12.246094 -12.27679,0 -23.37947,4.365172 -31.4668,12.769532 a 7.79506,7.79506 0 0 0 -0.002,0 c -3.5928,3.734075 -6.17519,8.26351 -8.14258,13.232421 -1.67232,-4.343171 -3.73029,-8.375933 -6.61328,-11.753906 -7.57526,-8.875856 -19.1799,-13.121094 -32.51953,-13.121094 h -19.30274 c -3.08768,0 -6.65269,0.704423 -9.533199,3.298829 -2.880507,2.594405 -4.019532,6.513117 -4.019532,9.6875 v 7.521484 c -1.791465,-3.486279 -3.986908,-6.65901 -6.726562,-9.384766 a 7.79506,7.79506 0 0 0 -0.0059,-0.0059 c -8.154482,-8.09608 -19.190047,-12.244141 -31.402343,-12.244141 -12.273433,0 -23.379088,4.362353 -31.472657,12.765625 a 7.79506,7.79506 0 0 0 -0.0059,0.0078 c -2.078078,2.162387 -3.869846,4.553494 -5.394531,7.146484 l -0.09766,-7.599609 a 7.79506,7.79506 0 0 0 -3.332032,-6.291016 C 11.958498,-47.286873 8.591407,-48.032498 3.6503906,-49.130859 -1.60087,-50.304087 -7.3646155,-50.839844 -13.681641,-50.839844 Z m 0,15.587891 c 5.4229635,0 10.0808639,0.473214 13.93359413,1.333984 a 7.79506,7.79506 0 0 0 0.007813,0.002 c 2.01650327,0.44826 1.93180777,0.514397 3.05859377,0.914063 l 0.3183594,24.8515624 c -1.224922,0.1426094 -2.1780924,0.3300847 -3.76562505,0.3574219 -0.001256,1.91e-5 -0.00265,-1.9e-5 -0.003906,0 -0.0813889,0.00123 -0.16966434,-0.018157 -0.25195313,-0.017578 A 7.79506,7.79506 0 0 0 1.7539062,-13.150391 l -0.076172,-5.173828 v -0.002 c -0.001,-3.554641 -2.8946805,-7.723567 -5.7285156,-9.158203 -2.8343262,-1.434884 -5.2842732,-1.576172 -7.8808598,-1.576172 -6.078133,0 -11.944075,2.950048 -16.046875,7.472656 -4.653417,5.125077 -6.480468,12.0915876 -6.480468,19.6250004 0,7.5149768 1.733481,14.4327846 6.519531,19.4082026 6.4e-4,6.66e-4 0.0013,0.0013 0.002,0.002 6.44e-4,6.68e-4 0.0013,0.0013 0.002,0.002 4.347809,4.519769 10.618265,6.90625 16.960938,6.90625 2.7971771,0 5.6124765,-0.457269 8.3769527,-1.302735 0.8560969,-0.258987 1.586871,-0.510088 2.33789067,-0.767578 0.42775588,0.707203 0.75217426,1.027967 1.28320313,2.451172 0.7495552,2.038994 0.8358563,2.835556 0.9375,3.382813 -0.7507405,0.304508 -1.41639152,0.61698 -2.61523437,0.904296 -3.53284813,0.845612 -7.69270203,1.306641 -12.46289113,1.306641 -9.958136,0 -16.384959,-2.760563 -21.406249,-8.359375 -5.173829,-5.76686 -7.830079,-13.0351827 -7.830079,-23.2480467 0,-12.4270673 2.939406,-20.5476823 7.904297,-25.7988283 l 0.0039,-0.0039 c 6.06e-4,-6.41e-4 0.0013,-0.0013 0.002,-0.002 5.252936,-5.538205 11.532106,-8.169922 20.761718,-8.169922 z m 69.490235,0 c 8.943682,0 15.168464,2.506843 20.417968,7.71875 4.812153,4.791517 7.748047,12.576276 7.748047,24.9589842 0,12.4055171 -2.904345,20.3134788 -7.617187,25.1542968 a 7.79506,7.79506 0 0 0 -0.0098,0.0098 c -5.067351,5.224568 -11.191206,7.742187 -20.199219,7.742187 -8.977809,0 -15.228563,-2.561596 -20.523437,-7.939453 l -0.002,-0.002 c -6.68e-4,-6.78e-4 -0.0013,-0.0013 -0.002,-0.002 -4.968267,-5.058458 -7.861328,-12.7694566 -7.861328,-24.7421876 0,-11.9773224 2.87616,-19.7762004 7.802734,-24.9062504 l 0.0039,-0.0039 c 6.16e-4,-6.41e-4 0.0013,-0.0013 0.002,-0.002 5.233116,-5.430463 11.37106,-7.986328 20.240235,-7.986328 z m 149.734376,0 c 8.93499,0 15.16961,2.50802 20.41211,7.712891 4.81503,4.79132 7.7539,12.577704 7.7539,24.9648432 0,12.4055171 -2.90594,20.3153858 -7.61523,25.1562498 a 7.79506,7.79506 0 0 0 -0.004,0.0039 c -5.0792,5.230396 -11.19475,7.746094 -20.20507,7.746094 -8.98471,0 -15.22994,-2.561015 -20.53321,-7.945312 -4.96574,-5.058518 -7.85937,-12.7698598 -7.85937,-24.7402346 0,-11.9814204 2.88042,-19.7781244 7.8164,-24.9082034 5.22866,-5.433626 11.35719,-7.990234 20.23438,-7.990234 z m 66.86328,0.671875 c 1.71218,0 2.21956,0.12373 3.38086,0.203125 v 50.9375 a 7.79506,7.79506 0 0 0 7.79492,7.794922 h 8.30078 c 0.0669,0.820409 0.16211,1.626225 0.16211,2.480468 0,0.847857 -0.0969,1.660257 -0.16406,2.484375 h -39.28711 c -0.0667,-0.819921 -0.16211,-1.620834 -0.16211,-2.484375 0,-0.870352 0.0956,-1.663833 0.16211,-2.480468 h 8.63086 a 7.79506,7.79506 0 0 0 7.79492,-7.794922 v -50.9375 c 1.16227,-0.07957 1.67392,-0.203125 3.38672,-0.203125 z m -162.875,0.455078 h 17.26758 c 10.29535,0 16.41813,2.679714 20.66211,7.652344 4.24398,4.97263 7,13.360313 7,26.10156225 0,11.70111175 -2.74067,18.76925975 -6.95117,22.84765575 a 7.79506,7.79506 0 0 0 -0.006,0.0059 c -4.4082,4.278877 -11.1738,6.837891 -21.82813,6.83789 h -16.14453 z m 16.25195,4.617188 c -1.04293,0 -2.14036,0.03826 -3.63867,0.498046 -1.49578,0.459009 -3.82446,1.589227 -5.24219,4.205079 -3.5e-4,6.58e-4 3.6e-4,0.0013 0,0.002 -2.16464,3.994843 -1.28515,4.740325 -1.28515,6.699218 v 33.769532 a 7.79506,7.79506 0 0 0 7.79492,7.792968 h 1.12891 c 6.00574,0 11.80043,-1.370564 16.02343,-5.517578 a 7.79506,7.79506 0 0 0 0.006,-0.0059 c 5.26572,-5.182403 5.65039,-11.6132457 5.65039,-19.6093751 0,-7.9533895 -0.83122,-14.4341049 -4.60937,-19.8554689 l -0.002,-0.002 c -3.48276,-5.006481 -9.74205,-7.976563 -15.82617,-7.976562 z m -69.974606,0.673828 c -5.98094,0 -11.975929,3.17317 -15.496094,8.005859 -3.700679,5.066737 -5.001953,11.370405 -5.001953,18.3710937 0,7.0461672 1.421733,13.4519213 5.189453,18.5625003 a 7.79506,7.79506 0 0 0 0.01367,0.01953 c 3.537144,4.768082 9.351334,8.117188 15.349609,8.117187 5.939621,0 11.748344,-3.235861 15.306641,-7.943359 3.848276,-5.091179 5.25,-11.5107608 5.25,-18.5898436 0,-7.0442837 -1.332446,-13.3940924 -5.060547,-18.4843754 l -0.002,-0.002 c -3.544799,-4.849958 -9.538638,-8.05664 -15.548828,-8.05664 z m 149.734376,0 c -5.98461,0 -11.98672,3.173848 -15.50586,8.017578 -3.6845,5.061033 -4.98828,11.3570994 -4.98828,18.3593747 0,7.0418225 1.41272,13.4462443 5.18164,18.5605473 a 7.79506,7.79506 0 0 0 0.0117,0.01563 c 3.5393,4.778774 9.3588,8.123046 15.35742,8.123046 5.93962,0 11.74626,-3.239478 15.30469,-7.939453 a 7.79506,7.79506 0 0 0 0.004,-0.0039 c 3.84951,-5.092809 5.2461,-11.5124871 5.2461,-18.5898436 0,-7.0416455 -1.33184,-13.3907654 -5.0586,-18.4804684 l -0.004,-0.0039 c -3.54423,-4.853783 -9.53914,-8.058593 -15.54883,-8.058593 z m -149.734376,15.58789 c 1.588884,0 1.76744,0.02722 2.964843,1.666016 a 7.79506,7.79506 0 0 0 0.0078,0.01172 c 1.007497,1.373782 2.048828,4.2769243 2.048828,9.2773434 0,4.9609051 -1.051984,7.8086375 -2.095703,9.1894531 -1.327698,1.7564959 -1.578722,1.7539063 -2.871094,1.7539063 -1.219834,0 -1.460971,0.023539 -2.820312,-1.8066407 -1.112458,-1.513176 -2.144532,-4.3959018 -2.144532,-9.3027344 0,-4.9820232 1.032618,-7.8536437 2.001954,-9.1796877 a 7.79506,7.79506 0 0 0 0.0098,-0.01367 c 1.146711,-1.576297 1.279057,-1.595703 2.898438,-1.595703 z m 149.734376,0 c 1.59046,0 1.76875,0.02839 2.96094,1.66211 a 7.79506,7.79506 0 0 0 0.0117,0.01758 c 1.00765,1.373399 2.05079,4.2749713 2.05079,9.2753904 0,4.9626314 -1.05322,7.8102679 -2.09571,9.1894531 -1.33099,1.7571181 -1.5804,1.7539063 -2.87109,1.7539063 -1.22304,0 -1.47037,0.021921 -2.82422,-1.8046876 -1.10926,-1.5094721 -2.13672,-4.3935246 -2.13672,-9.3046875 0,-4.979422 1.03164,-7.8561267 2.00195,-9.1874997 a 7.79506,7.79506 0 0 0 0.008,-0.0098 c 1.14085,-1.570264 1.27515,-1.591797 2.89453,-1.591797 z M 0,0 0.09179687,5.4179687 c -0.0027192,3.84e-4 -0.0050943,0.00157 -0.0078125,0.00195 z m -17.826172,4.515625 a 7.79506,7.79506 0 0 0 3.394531,1.9785156 c 0,0 4.16777,0.597219 9.0292973,0.9628906 -0.364549,0.1693785 -0.9404306,0.4431528 -1.734375,0.6835938 a 7.79506,7.79506 0 0 0 -0.021484,0.00586 c -1.4535196,0.444533 -2.6955876,0.6210937 -3.8164059,0.6210937 -2.981452,0 -4.290525,-0.631362 -5.726563,-2.125 a 7.79506,7.79506 0 0 0 -0.0039,-0.00391 c -0.38649,-0.4015606 -0.76386,-1.2417621 -1.121094,-2.1230469 z m 12.5351564,2.9492187 c 0.065836,0.00486 0.1291125,0.007 0.1953125,0.011719 -0.1310168,0.097798 -0.3245375,0.1663064 -0.4472656,0.265625 L -5.4355469,7.65625 C -5.0520181,7.3570016 -5.190514,7.4289003 -5.2910156,7.4648437 Z" + id="path205" /><path + style="color:#000000;fill:#414042;stroke-width:15.5886;-inkscape-stroke:none" + d="m 0,0 c -6.078,0.094 -13.034,-1.173 -13.034,-1.173 v -11.863 h 6.995 l -0.078,-5.288 c 0,-1.959 -1.942,-2.943 -5.815,-2.943 -3.878,0 -7.303,1.642 -10.274,4.917 -2.978,3.279 -4.459,8.072 -4.459,14.388 0,6.329 1.447,10.995 4.345,14.006 2.892,3.008 6.683,4.517 11.346,4.517 1.959,0 3.987,-0.316 6.096,-0.961 2.11,-0.639 3.519,-1.238 4.238,-1.799 0.713,-0.577 1.391,-0.85 2.032,-0.85 0.638,0 1.671,0.746 3.1,2.255 1.431,1.505 2.713,3.786 3.844,6.827 1.126,3.057 1.69,5.4 1.69,7.062 0,1.649 -0.036,2.786 -0.109,3.386 -1.581,1.73 -4.499,3.102 -8.755,4.122 -4.248,1.017 -9.011,1.522 -14.28,1.522 -11.594,0 -20.66,-3.65 -27.207,-10.95 -6.552,-7.303 -9.822,-16.783 -9.822,-28.452 0,-13.701 3.347,-24.087 10.041,-31.162 6.706,-7.074 15.51,-10.607 26.425,-10.607 5.87,0 11.08,0.505 15.632,1.522 4.557,1.013 7.586,2.053 9.093,3.105 l 0.452,35.33 C 11.496,-1.036 6.078,-0.104 0,0 m 283.58148,-40.1198 c 0,-1.496 -3.721,-2.255 -11.176,-2.255 -7.448,0 -11.18,0.759 -11.18,2.255 v 56.681 h -13.545 c -1.281,0 -2.185,1.727 -2.71,5.198 -0.226,1.652 -0.334,3.343 -0.334,5.077 0,1.724 0.108,3.422 0.334,5.077 0.525,3.462 1.429,5.202 2.71,5.202 h 49.112 c 1.279,0 2.179,-1.74 2.712,-5.202 0.221,-1.655 0.335,-3.353 0.335,-5.077 0,-1.734 -0.114,-3.425 -0.335,-5.077 -0.533,-3.471 -1.433,-5.198 -2.712,-5.198 h -13.211 z M 205.6005,16.447401 c -3.612,0 -6.645,-1.659 -9.095,-4.967 -2.44,-3.3110004 -3.662,-7.9580004 -3.662,-13.9380004 0,-5.993 1.169,-10.5809996 3.499,-13.7779996 2.33,-3.207 5.398,-4.804 9.2,-4.804 3.801,0 6.89,1.617 9.258,4.862 2.372,3.233 3.56,7.8609996 3.56,13.8859996 0,6.02 -1.225,10.654 -3.671,13.8900004 -2.447,3.232 -5.473,4.849 -9.089,4.849 m -0.058,-59.493 c -10.577,0 -19.193,3.46 -25.851,10.379 -6.663,6.925 -9.993,17.03 -9.993,30.3139996 0,13.2920004 3.367,23.3560004 10.1,30.2090004 6.741,6.844 15.431,10.269 26.086,10.269 10.651,0 19.246,-3.363 25.797,-10.109 6.55,-6.733 9.822,-16.94 9.822,-30.5910004 0,-13.6609996 -3.349,-23.8219996 -10.05,-30.4899996 -6.699,-6.654 -15.338,-9.981 -25.911,-9.981 m -82.13011,58.710808 v -33.768 c 0,-1.577 0.116,-2.571 0.342,-2.988 0.224,-0.415 0.903,-0.623 2.029,-0.623 4.144,0 7.283,1.548 9.429,4.634 2.151,3.083 3.215,8.2160005 3.215,15.4050005 0,7.192 -1.113,11.8779995 -3.325,14.0549995 -2.223,2.183 -5.744,3.285 -10.561,3.285 z m -21.675,-52.392 v 67.735 c 0,1.883 0.468,3.369 1.413,4.471 0.939,1.085 2.161,1.636 3.671,1.636 h 18.854 c 11.965,0 21.053,-3.018 27.257,-9.04 6.215,-6.02 9.322,-15.499 9.322,-28.44699953 0,-27.70000047 -11.821,-41.54700047 -35.456,-41.54700047 h -19.302 c -3.836,0 -5.759,1.727 -5.759,5.192 M 55.862999,16.447401 c -3.611,0 -6.636,-1.659 -9.09,-4.967 -2.441,-3.3110004 -3.668,-7.9580004 -3.668,-13.9380004 0,-5.993 1.166,-10.5809996 3.503,-13.7779996 2.333,-3.207 5.398,-4.804 9.2,-4.804 3.8,0 6.887,1.617 9.258,4.862 2.371,3.233 3.559,7.8609996 3.559,13.8859996 0,6.02 -1.227,10.654 -3.673,13.8900004 -2.443,3.232 -5.473,4.849 -9.089,4.849 m -0.055,-59.493 c -10.573,0 -19.195,3.46 -25.859,10.379 -6.655,6.925 -9.984,17.03 -9.984,30.3139996 0,13.2920004 3.367,23.3560004 10.101,30.2090004 6.736,6.844 15.431,10.269 26.082,10.269 10.649,0 19.251,-3.363 25.794,-10.109 6.555,-6.733 9.827,-16.94 9.827,-30.5910004 0,-13.6609996 -3.348,-23.8219996 -10.05,-30.4899996 -6.702,-6.654 -15.333,-9.981 -25.911,-9.981" + id="path207" /></g></g><g id="g40" transform="matrix(1.1310535,0,0,1.1310535,441.34721,235.75121)" style="stroke:none;stroke-width:4.31066306;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" /><g @@ -122,10 +128,15 @@ style="stroke:none;stroke-width:4.31066306;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" /><g id="g74" transform="matrix(1.1310535,0,0,1.1310535,669.70883,256.83868)" - style="stroke:none;stroke-width:4.31066306;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"><path - id="path76" - style="fill:#6d6e71;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:15.5885606;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" - d="M 0,0 C -1.763,0 -3.208,-0.802 -4.334,-2.402 -5.463,-4.008 -6.052,-5.987 -6.102,-8.346 H 5.56 v 1.082 c 0,2.086 -0.486,3.823 -1.47,5.201 C 3.109,-0.684 1.747,0 0,0 m 0.401,-23.76 c -2.733,0 -4.958,1.026 -6.681,3.073 -1.73,2.043 -2.595,4.657 -2.595,7.841 v 4.197 c 0,3.19 0.865,5.85 2.6,7.965 1.739,2.105 3.831,3.158 6.275,3.158 2.646,0 4.706,-0.939 6.172,-2.823 1.462,-1.887 2.195,-4.422 2.195,-7.603 v -2.773 H -6.102 v -2.102 c 0,-2.447 0.59,-4.484 1.757,-6.11 1.166,-1.63 2.748,-2.438 4.746,-2.438 1.382,0 2.579,0.244 3.578,0.724 1.012,0.491 1.869,1.179 2.591,2.082 l 1.147,-1.988 c -0.769,-0.968 -1.755,-1.75 -2.962,-2.33 -1.203,-0.577 -2.658,-0.873 -4.354,-0.873 m -28.299804,25.7639105 0.23,-4.178 c 0.676,1.48300001 1.562,2.63400001 2.678,3.435 1.115,0.805 2.422,1.213 3.916,1.213 2.258,0 3.995,-0.835 5.199,-2.51299999 1.211,-1.67500001 1.807,-4.27900001 1.807,-7.81200001 V -23.271089 h -2.825 v 15.3939995 c 0,2.888 -0.422,4.905 -1.261,6.075 -0.843,1.17000001 -2.063,1.75300001 -3.668,1.75300001 -1.434,0 -2.635,-0.466 -3.599,-1.41400001 -0.967,-0.939 -1.692,-2.19 -2.171,-3.767 V -23.271089 h -2.809 V 2.0039105 Z m -9.133591,-25.2752055 h -2.830008 V 2.0037072 h 2.830008 z m 0,32.4710013 h -2.830008 v 3.9819957 h 2.830008 z M -60.863903,-12.846289 c 0,-2.565 0.486,-4.605 1.472,-6.123 0.974,-1.532 2.457,-2.288 4.436,-2.288 1.356,0 2.498,0.361 3.435,1.101 0.934,0.74 1.672,1.77 2.218,3.077 v 12.5200001 c -0.525,1.346 -1.246,2.434 -2.157,3.272 -0.91,0.82400002 -2.062,1.23800002 -3.448,1.23800002 -1.975,0 -3.468,-0.86 -4.46,-2.58700002 -0.999,-1.73 -1.496,-3.986 -1.496,-6.756 z m -2.833,3.4540001 c 0,3.582 0.723,6.459 2.177,8.62700002 1.442,2.15699998 3.448,3.23899998 6.004,3.23899998 1.419,0 2.664,-0.346 3.728,-1.04 1.066,-0.68099998 1.947,-1.67799998 2.654,-2.946 l 0.274,3.516 h 2.381 V -23.294289 c 0,-3.239 -0.751,-5.749 -2.26,-7.525 -1.511,-1.769 -3.657,-2.665 -6.428,-2.665 -0.996,0 -2.067,0.156 -3.212,0.459 -1.147,0.303 -2.162,0.701 -3.052,1.2 l 0.776,2.463 c 0.759,-0.492 1.608,-0.873 2.548,-1.141 0.932,-0.277 1.895,-0.41 2.894,-0.41 2.009,0 3.498,0.645 4.46,1.932 0.966,1.304 1.45,3.19 1.45,5.687 v 3.057 c -0.717,-1.138 -1.597,-2.011 -2.64,-2.614 -1.039,-0.606 -2.253,-0.909 -3.622,-0.909 -2.539,0 -4.53,0.994 -5.968,2.982 -1.441,1.984 -2.164,4.631 -2.164,7.932 z m -19.227592,11.3961994 0.23,-4.178 c 0.674,1.48300001 1.564,2.63400001 2.682,3.435 1.108,0.805 2.413,1.213 3.914,1.213 2.258,0 3.988,-0.835 5.189,-2.51299999 1.214,-1.67500001 1.815,-4.27900001 1.815,-7.81200001 V -23.271089 h -2.825 v 15.3939995 c 0,2.888 -0.423,4.905 -1.264,6.075 -0.836,1.17000001 -2.065,1.75300001 -3.665,1.75300001 -1.435,0 -2.638,-0.466 -3.603,-1.41400001 -0.969,-0.939 -1.691,-2.19 -2.172,-3.767 V -23.271089 h -2.805 V 2.0039105 Z M -98.69412,0 c -1.763,0 -3.21,-0.802 -4.341,-2.402 -1.126,-1.606 -1.712,-3.585 -1.763,-5.944 h 11.663 v 1.082 c 0,2.086 -0.488,3.823 -1.474,5.201 -0.981,1.379 -2.341,2.063 -4.085,2.063 m 0.394,-23.76 c -2.726,0 -4.951,1.026 -6.679,3.073 -1.733,2.043 -2.6,4.657 -2.6,7.841 v 4.197 c 0,3.19 0.871,5.85 2.602,7.965 1.744,2.105 3.834,3.158 6.283,3.158 2.643,0 4.703,-0.939 6.164,-2.823 1.463,-1.887 2.197,-4.422 2.197,-7.603 v -2.773 h -14.465 v -2.102 c 0,-2.447 0.587,-4.484 1.76,-6.11 1.162,-1.63 2.742,-2.438 4.738,-2.438 1.387,0 2.585,0.244 3.585,0.724 1.007,0.491 1.866,1.179 2.589,2.082 l 1.141,-1.988 c -0.764,-0.968 -1.75,-1.75 -2.959,-2.33 -1.204,-0.577 -2.658,-0.873 -4.356,-0.873 M -129.86659,0 c -1.758,0 -3.202,-0.802 -4.334,-2.402 -1.133,-1.606 -1.718,-3.585 -1.765,-5.944 h 11.66 v 1.082 c 0,2.086 -0.489,3.823 -1.469,5.201 -0.986,1.379 -2.347,2.063 -4.092,2.063 m 0.397,-23.76 c -2.725,0 -4.954,1.026 -6.685,3.073 -1.726,2.043 -2.591,4.657 -2.591,7.841 v 4.197 c 0,3.19 0.867,5.85 2.602,7.965 1.739,2.105 3.828,3.158 6.277,3.158 2.648,0 4.699,-0.939 6.164,-2.823 1.468,-1.887 2.201,-4.422 2.201,-7.603 v -2.773 h -14.464 v -2.102 c 0,-2.447 0.586,-4.484 1.752,-6.11 1.168,-1.63 2.755,-2.438 4.744,-2.438 1.382,0 2.585,0.244 3.588,0.724 1.003,0.491 1.863,1.179 2.578,2.082 l 1.149,-1.988 c -0.763,-0.968 -1.752,-1.75 -2.959,-2.33 -1.204,-0.577 -2.659,-0.873 -4.356,-0.873 m -41.1488,25.7639105 0.24,-3.923 c 0.664,1.40400001 1.554,2.48600001 2.657,3.255 1.107,0.759 2.41,1.138 3.906,1.138 1.527,0 2.814,-0.444 3.852,-1.343 1.039,-0.89599999 1.805,-2.252 2.292,-4.074 0.623,1.682 1.505,3.01100001 2.65,3.973 1.145,0.964 2.534,1.444 4.143,1.444 2.217,0 3.937,-0.897 5.156,-2.69199999 1.224,-1.79900001 1.834,-4.55900001 1.834,-8.28800001 V -23.271089 h -2.823 v 14.8139995 c 0,3.1 -0.429,5.283 -1.263,6.538 -0.839,1.25700001 -2.042,1.89000001 -3.598,1.89000001 -1.637,0 -2.915,-0.691 -3.834,-2.09600001 -0.914,-1.405 -1.478,-3.161 -1.683,-5.282 v -0.655 -15.2089995 h -2.809 v 14.7979995 c 0,3.027 -0.424,5.194 -1.292,6.488 -0.864,1.29400001 -2.066,1.93600001 -3.609,1.93600001 -1.475,0 -2.668,-0.45 -3.562,-1.34200001 -0.9,-0.897 -1.54,-2.125 -1.928,-3.683 V -23.271089 h -2.806 V 2.0039105 Z M -188.9332,-21.231295 c 1.553,0 2.936,0.44 4.144,1.336 1.21,0.9 2.058,2.037 2.561,3.422 v 5.468 h -4.492 c -1.91,0 -3.44,-0.541 -4.585,-1.623 -1.148,-1.075 -1.716,-2.418 -1.716,-4.015 0,-1.349 0.355,-2.457 1.074,-3.311 0.718,-0.857 1.722,-1.277 3.014,-1.277 m 7.124,-2.04 c -0.14,0.876 -0.249,1.587 -0.318,2.144 -0.067,0.567 -0.101,1.131 -0.101,1.704 -0.767,-1.254 -1.757,-2.294 -2.98,-3.109 -1.221,-0.821 -2.579,-1.228 -4.075,-1.228 -2.092,0 -3.701,0.648 -4.84,1.946 -1.132,1.303 -1.704,3.059 -1.704,5.276 0,2.343 0.823,4.223 2.473,5.618 1.649,1.3950005 3.89,2.0920005 6.709,2.0920005 h 4.417 v 3.106 c 0,1.786 -0.456,3.193 -1.351,4.21 -0.914,1.00399996 -2.17,1.51199995911 -3.791,1.51199995911 -1.508,0 -2.752,-0.47899999911 -3.728,-1.44999995911 -0.973,-0.965 -1.456,-2.144 -1.456,-3.549 l -2.623,0.023 -0.046,0.137 c -0.074,1.906 0.647,3.591 2.168,5.08399996 1.515,1.48900004 3.459,2.22900004 5.825,2.22900004 2.338,0 4.22,-0.711 5.657,-2.12800004 1.429,-1.43099996 2.146,-3.47099996 2.146,-6.12399996 V -18.174295 c 0,-0.903 0.042,-1.78 0.121,-2.617 0.081,-0.848 0.212,-1.665 0.417,-2.48 z m -20.0925,4.627199 c -0.624,-1.28 -1.771,-2.454 -3.449,-3.516 -1.676,-1.069 -3.805,-1.6 -6.391,-1.6 -3.412,0 -6.156,1.075 -8.24,3.249 -2.076,2.157 -3.116,5.266 -3.116,9.323 v 10.116 c 0,3.969 0.98,7.013 2.946,9.138 1.962,2.108 4.59,3.177 7.872,3.177 3.208,0 5.695,-0.844 7.455,-2.513 1.755,-1.675 2.677,-4.015 2.757,-7.003 l -0.044,-0.133 h -2.619 c -0.094,2.29 -0.759,4.057 -2.01,5.305 -1.244,1.238 -3.095,1.864 -5.539,1.864 -2.473,0 -4.432,-0.837 -5.866,-2.516 -1.43,-1.675 -2.143,-4.103 -2.143,-7.293 v -10.174 c 0,-3.308 0.771,-5.83 2.311,-7.567 1.54,-1.724 3.616,-2.588 6.236,-2.588 1.913,0 3.451,0.339 4.602,1.033 1.155,0.684 1.956,1.519 2.409,2.51 v 8.861 h -7.06 v 2.463 h 9.889 z" /></g><g + style="stroke-width:4.31066306;stroke-linejoin:round;paint-order:markers stroke fill"><g + id="path76"><path + style="color:#000000;fill:#ffffff;-inkscape-stroke:none" + d="m -55.166016,-41.279297 c -1.808526,0 -3.536849,0.278071 -5.203125,0.71875 -1.678722,0.443464 -3.320167,1.066841 -4.873046,1.9375 -2.596787,1.63317 -3.994246,4.637553 -3.570313,7.675781 -0.09298,-0.04089 -0.186745,-0.07996 -0.28125,-0.117187 h -2.826172 c -2.002104,0.02358 -3.918364,0.816659 -5.351562,2.214844 -1.433198,-1.398185 -3.349459,-2.191265 -5.351563,-2.214844 h -2.804687 c -1.542011,0.14908 -3.004629,0.754254 -4.201172,1.738281 -0.32252,-0.182255 -0.611512,-0.428692 -0.94336,-0.58789 l -0.0039,-0.002 c -2.472567,-1.184943 -5.120798,-1.638671 -7.724609,-1.638671 -4.678985,-1e-6 -9.601215,2.251543 -12.628905,5.833984 -2.6704,3.151849 -4.02447,7.203314 -4.31836,11.27539 -0.15077,-0.501332 -0.35165,-0.986202 -0.59961,-1.447265 l 0.44141,-0.763672 c 1.59705,-2.762944 1.34866,-6.220292 -0.62695,-8.726562 -1.5267,-1.936879 -3.53107,-3.484621 -5.70508,-4.529297 l -0.008,-0.0039 c -2.47409,-1.18567 -5.11932,-1.638672 -7.72266,-1.638671 -3.09586,-1e-6 -6.25097,1.054638 -8.94141,2.757812 -1.45619,-1.447996 -3.42495,-2.262872 -5.47851,-2.267578 h -2.82227 c -1.93669,0.04642 -3.7867,0.812326 -5.18945,2.148437 -1.40276,-1.336111 -3.25277,-2.102017 -5.18945,-2.148437 h -2.8086 c -1.93899,0.0455 -3.79137,0.812222 -5.19531,2.150391 -1.40394,-1.338169 -3.25633,-2.104889 -5.19531,-2.150391 h -2.80664 c -0.81079,0.191731 -1.58559,0.512204 -2.29492,0.949219 -1.07507,-0.587545 -2.27349,-0.913413 -3.49805,-0.951172 h -2.91992 c -0.67325,0.151008 -1.32346,0.390732 -1.9336,0.71289 -1.795,-0.706205 -3.66929,-1.201171 -5.54101,-1.201171 -3.50013,0 -7.49664,1.420164 -10.20117,4.162109 -0.567,-0.443355 -1.08741,-0.964665 -1.68555,-1.34375 -3.21038,-2.04466 -6.92275,-2.818359 -10.57227,-2.818359 -5.04822,-1e-6 -10.30237,1.935015 -13.86328,5.648437 -6.4e-4,6.65e-4 -0.001,0.0013 -0.002,0.002 -3.76116,3.915201 -5.28516,9.332898 -5.28516,14.716797 v 10.1152344 c 0,5.2520039 1.41057,10.530801 5.01953,14.4316406 0.005,0.0059 0.0104,0.01173 0.0156,0.01758 3.43151,3.686867 8.60365,5.660156 13.57812,5.660156 4.57508,0 9.35017,-1.363472 12.81836,-4.652343 0.006,-0.0052 0.0117,-0.01041 0.0176,-0.01563 1.84606,-1.761905 3.13464,-3.974261 3.98438,-6.3359379 2.53321,1.4403465 5.4497,2.2343749 8.22851,2.2343749 3.02219,0 6.24428,-0.9011821 8.91211,-2.6308593 1.40906,1.3487442 3.27257,2.1202136 5.22266,2.1621094 h 2.47656 c 0.53252,-0.1480547 1.04779,-0.3523286 1.53711,-0.609375 1.73031,0.643973 3.51943,1.0781249 5.26758,1.0781249 2.13316,0 4.35253,-0.730485 6.41015,-1.7968749 2.08238,1.0593742 4.32324,1.7968749 6.52539,1.7968749 3.64342,0 7.56291,-1.8298717 10.20118,-4.5546874 2.88192,2.6877619 6.82494,4.5546874 10.81054,4.5546874 4.48972,0 9.45756,-2.1552464 12.31641,-5.830078 1.60293,-2.0604476 2.51241,-4.43830193884 3.09961,-6.9042969 0.71465,2.43454664 1.82624,4.7452784 3.4414,6.71875 0.0104,0.012402 0.0208,0.024772 0.0312,0.037109 2.88105,3.477408 7.60195,5.9785159 12.285157,5.9785159 2.833994,0 5.804706,-0.9358347 8.371093,-2.496094 1.344793,1.2264745 3.07637,1.9437037 4.894532,2.0273437 h 2.503906 c 0.545292,-0.1512945 1.072488,-0.361518 1.572266,-0.6269531 1.716131,0.6544598 3.499698,1.0957034 5.253906,1.0957034 3.56251,0 7.487652,-1.6692823 10.173828,-4.3496097 2.794016,2.6236811 6.685243,4.3496097 10.408203,4.3496097 1.716056,0 3.475139,-0.4203695 5.179688,-1.0468753 0.471256,0.242399 0.966003,0.4361093 1.476562,0.578125 h 1.203125 v 3.3828133 c 7.7e-5,4.304222 3.488747,7.793766 7.792969,7.794921 h 2.830078 c 4.304985,-7.7e-5 7.794845,-3.489937 7.794922,-7.794921 V 9.7988281 h 1.339844 c 0.545292,-0.1512946 1.072488,-0.361518 1.572265,-0.6269531 1.713658,0.6532826 3.495541,1.095703 5.251953,1.095703 3.629954,0 7.633696,-1.7251239 10.324219,-4.4980468 2.8782652,2.658651 6.792122,4.4980468 10.75,4.4980468 4.4899939,0 9.4557947,-2.1437813 12.324219,-5.830078 0.0033,-0.00455 0.0065,-0.00911 0.0098,-0.013672 2.759395,-3.56154471 3.828125,-7.9966434 3.828125,-12.375 v -2.773437 c -0.05002,-1.926545 -0.811929,-3.766268 -2.138671,-5.164063 l 0.445312,-0.773437 c 1.5981,-2.771071 1.341005,-6.237217 -0.648437,-8.742188 -1.515701,-1.90793 -3.510901,-3.460952 -5.6894536,-4.507812 l -0.00586,-0.002 c -2.4753832,-1.187279 -5.1217303,-1.640625 -7.72460937,-1.640625 -3.10147653,-1e-6 -6.26458173,1.060157 -8.95898443,2.771484 -1.4616306,-1.460639 -3.4434086,-2.28117 -5.5097656,-2.28125 h -2.826172 c -2.001426,0.02408 -3.916898,0.817122 -5.34961,2.214844 -1.432711,-1.397722 -3.348182,-2.190765 -5.349609,-2.214844 h -2.808594 c -1.196545,0.193759 -2.331416,0.663891 -3.314453,1.373047 -0.983426,-0.710129 -2.11901,-1.180949 -3.316406,-1.375 h -2.830078 c -0.06152,0.02461 -0.122722,0.05 -0.183594,0.07617 -0.648488,-1.735391 -1.5001,-3.401647 -2.751953,-4.875 -0.0045,-0.0052 -0.0091,-0.01043 -0.01367,-0.01563 -3.033908,-3.551942 -7.902338,-5.398438 -12.353516,-5.398438 z m -5.078125,3.28125 c -0.01306,0.0037 -0.02405,0.01382 -0.03711,0.01758 -0.01541,0.0045 -0.03148,0.0013 -0.04687,0.0059 z m -120.642579,8.980469 0.0273,0.01758 c -0.004,-0.0027 -0.01,-0.0031 -0.0137,-0.0059 -0.005,-0.0033 -0.009,-0.0084 -0.0137,-0.01172 z m -22.28125,1.96875 0.0527,0.03125 c -0.009,-0.0053 -0.0185,-0.0045 -0.0274,-0.0098 -0.009,-0.0054 -0.0163,-0.01609 -0.0254,-0.02148 z m 93.80859,3.550781 c -0.006,0.0086 -0.009,0.01874 -0.0156,0.02734 -0.003,0.0037 -0.007,0.0061 -0.01,0.0098 z m 44.787114,27.9960939 -0.02539,0.037109 c 0.0061,-0.00841 0.0096,-0.016978 0.01563,-0.025391 0.0029,-0.00408 0.0068,-0.00763 0.0098,-0.011719 z m 55.0292972,0.00586 -0.015625,0.023437 c 0.00411,-0.00568 0.00567,-0.011895 0.00977,-0.017578 0.0016,-0.00222 0.00426,-0.00364 0.00586,-0.00586 z m -75.0507812,3.0625 c 0.0054,0.00393 0.01216,0.00584 0.01758,0.00977 0.0088,0.00635 0.01459,0.015149 0.02344,0.021484 z m 55.041016,0.013672 c 0.0024,0.0017 0.0055,0.00221 0.0078,0.00391 0.0038,0.00276 0.0059,0.00701 0.0098,0.00977 z m -17.976563,0.3828125 -0.0625,0.039063 c 0.01045,-0.00668 0.01692,-0.016737 0.02734,-0.023437 0.01087,-0.00704 0.02431,-0.00855 0.03516,-0.015625 z" + id="path211" + sodipodi:nodetypes="ccccccccccccscccssssscccccccccccccsccsscssccscccsccccscscsscccsccccscscccscsscccscsccsccccccscsccccccccsccccscccccccccsccccccccsscccssccscccsccccssc" /><path + style="color:#000000;fill:#6d6e71;stroke-width:15.5886;-inkscape-stroke:none" + d="M 0,0 C -1.763,0 -3.208,-0.802 -4.334,-2.402 -5.463,-4.008 -6.052,-5.987 -6.102,-8.346 H 5.56 v 1.082 c 0,2.086 -0.486,3.823 -1.47,5.201 C 3.109,-0.684 1.747,0 0,0 m 0.401,-23.76 c -2.733,0 -4.958,1.026 -6.681,3.073 -1.73,2.043 -2.595,4.657 -2.595,7.841 v 4.197 c 0,3.19 0.865,5.85 2.6,7.965 1.739,2.105 3.831,3.158 6.275,3.158 2.646,0 4.706,-0.939 6.172,-2.823 1.462,-1.887 2.195,-4.422 2.195,-7.603 v -2.773 H -6.102 v -2.102 c 0,-2.447 0.59,-4.484 1.757,-6.11 1.166,-1.63 2.748,-2.438 4.746,-2.438 1.382,0 2.579,0.244 3.578,0.724 1.012,0.491 1.869,1.179 2.591,2.082 l 1.147,-1.988 c -0.769,-0.968 -1.755,-1.75 -2.962,-2.33 -1.203,-0.577 -2.658,-0.873 -4.354,-0.873 m -28.299804,25.7639105 0.23,-4.178 c 0.676,1.48300001 1.562,2.63400001 2.678,3.435 1.115,0.805 2.422,1.213 3.916,1.213 2.258,0 3.995,-0.835 5.199,-2.51299999 1.211,-1.67500001 1.807,-4.27900001 1.807,-7.81200001 V -23.271089 h -2.825 v 15.3939995 c 0,2.888 -0.422,4.905 -1.261,6.075 -0.843,1.17000001 -2.063,1.75300001 -3.668,1.75300001 -1.434,0 -2.635,-0.466 -3.599,-1.41400001 -0.967,-0.939 -1.692,-2.19 -2.171,-3.767 V -23.271089 h -2.809 V 2.0039105 Z m -9.133591,-25.2752055 h -2.830008 V 2.0037072 h 2.830008 z m 0,32.4710013 h -2.830008 v 3.9819957 h 2.830008 z M -60.863903,-12.846289 c 0,-2.565 0.486,-4.605 1.472,-6.123 0.974,-1.532 2.457,-2.288 4.436,-2.288 1.356,0 2.498,0.361 3.435,1.101 0.934,0.74 1.672,1.77 2.218,3.077 v 12.5200001 c -0.525,1.346 -1.246,2.434 -2.157,3.272 -0.91,0.82400002 -2.062,1.23800002 -3.448,1.23800002 -1.975,0 -3.468,-0.86 -4.46,-2.58700002 -0.999,-1.73 -1.496,-3.986 -1.496,-6.756 z m -2.833,3.4540001 c 0,3.582 0.723,6.459 2.177,8.62700002 1.442,2.15699998 3.448,3.23899998 6.004,3.23899998 1.419,0 2.664,-0.346 3.728,-1.04 1.066,-0.68099998 1.947,-1.67799998 2.654,-2.946 l 0.274,3.516 h 2.381 V -23.294289 c 0,-3.239 -0.751,-5.749 -2.26,-7.525 -1.511,-1.769 -3.657,-2.665 -6.428,-2.665 -0.996,0 -2.067,0.156 -3.212,0.459 -1.147,0.303 -2.162,0.701 -3.052,1.2 l 0.776,2.463 c 0.759,-0.492 1.608,-0.873 2.548,-1.141 0.932,-0.277 1.895,-0.41 2.894,-0.41 2.009,0 3.498,0.645 4.46,1.932 0.966,1.304 1.45,3.19 1.45,5.687 v 3.057 c -0.717,-1.138 -1.597,-2.011 -2.64,-2.614 -1.039,-0.606 -2.253,-0.909 -3.622,-0.909 -2.539,0 -4.53,0.994 -5.968,2.982 -1.441,1.984 -2.164,4.631 -2.164,7.932 z m -19.227592,11.3961994 0.23,-4.178 c 0.674,1.48300001 1.564,2.63400001 2.682,3.435 1.108,0.805 2.413,1.213 3.914,1.213 2.258,0 3.988,-0.835 5.189,-2.51299999 1.214,-1.67500001 1.815,-4.27900001 1.815,-7.81200001 V -23.271089 h -2.825 v 15.3939995 c 0,2.888 -0.423,4.905 -1.264,6.075 -0.836,1.17000001 -2.065,1.75300001 -3.665,1.75300001 -1.435,0 -2.638,-0.466 -3.603,-1.41400001 -0.969,-0.939 -1.691,-2.19 -2.172,-3.767 V -23.271089 h -2.805 V 2.0039105 Z M -98.69412,0 c -1.763,0 -3.21,-0.802 -4.341,-2.402 -1.126,-1.606 -1.712,-3.585 -1.763,-5.944 h 11.663 v 1.082 c 0,2.086 -0.488,3.823 -1.474,5.201 -0.981,1.379 -2.341,2.063 -4.085,2.063 m 0.394,-23.76 c -2.726,0 -4.951,1.026 -6.679,3.073 -1.733,2.043 -2.6,4.657 -2.6,7.841 v 4.197 c 0,3.19 0.871,5.85 2.602,7.965 1.744,2.105 3.834,3.158 6.283,3.158 2.643,0 4.703,-0.939 6.164,-2.823 1.463,-1.887 2.197,-4.422 2.197,-7.603 v -2.773 h -14.465 v -2.102 c 0,-2.447 0.587,-4.484 1.76,-6.11 1.162,-1.63 2.742,-2.438 4.738,-2.438 1.387,0 2.585,0.244 3.585,0.724 1.007,0.491 1.866,1.179 2.589,2.082 l 1.141,-1.988 c -0.764,-0.968 -1.75,-1.75 -2.959,-2.33 -1.204,-0.577 -2.658,-0.873 -4.356,-0.873 M -129.86659,0 c -1.758,0 -3.202,-0.802 -4.334,-2.402 -1.133,-1.606 -1.718,-3.585 -1.765,-5.944 h 11.66 v 1.082 c 0,2.086 -0.489,3.823 -1.469,5.201 -0.986,1.379 -2.347,2.063 -4.092,2.063 m 0.397,-23.76 c -2.725,0 -4.954,1.026 -6.685,3.073 -1.726,2.043 -2.591,4.657 -2.591,7.841 v 4.197 c 0,3.19 0.867,5.85 2.602,7.965 1.739,2.105 3.828,3.158 6.277,3.158 2.648,0 4.699,-0.939 6.164,-2.823 1.468,-1.887 2.201,-4.422 2.201,-7.603 v -2.773 h -14.464 v -2.102 c 0,-2.447 0.586,-4.484 1.752,-6.11 1.168,-1.63 2.755,-2.438 4.744,-2.438 1.382,0 2.585,0.244 3.588,0.724 1.003,0.491 1.863,1.179 2.578,2.082 l 1.149,-1.988 c -0.763,-0.968 -1.752,-1.75 -2.959,-2.33 -1.204,-0.577 -2.659,-0.873 -4.356,-0.873 m -41.1488,25.7639105 0.24,-3.923 c 0.664,1.40400001 1.554,2.48600001 2.657,3.255 1.107,0.759 2.41,1.138 3.906,1.138 1.527,0 2.814,-0.444 3.852,-1.343 1.039,-0.89599999 1.805,-2.252 2.292,-4.074 0.623,1.682 1.505,3.01100001 2.65,3.973 1.145,0.964 2.534,1.444 4.143,1.444 2.217,0 3.937,-0.897 5.156,-2.69199999 1.224,-1.79900001 1.834,-4.55900001 1.834,-8.28800001 V -23.271089 h -2.823 v 14.8139995 c 0,3.1 -0.429,5.283 -1.263,6.538 -0.839,1.25700001 -2.042,1.89000001 -3.598,1.89000001 -1.637,0 -2.915,-0.691 -3.834,-2.09600001 -0.914,-1.405 -1.478,-3.161 -1.683,-5.282 v -0.655 -15.2089995 h -2.809 v 14.7979995 c 0,3.027 -0.424,5.194 -1.292,6.488 -0.864,1.29400001 -2.066,1.93600001 -3.609,1.93600001 -1.475,0 -2.668,-0.45 -3.562,-1.34200001 -0.9,-0.897 -1.54,-2.125 -1.928,-3.683 V -23.271089 h -2.806 V 2.0039105 Z M -188.9332,-21.231295 c 1.553,0 2.936,0.44 4.144,1.336 1.21,0.9 2.058,2.037 2.561,3.422 v 5.468 h -4.492 c -1.91,0 -3.44,-0.541 -4.585,-1.623 -1.148,-1.075 -1.716,-2.418 -1.716,-4.015 0,-1.349 0.355,-2.457 1.074,-3.311 0.718,-0.857 1.722,-1.277 3.014,-1.277 m 7.124,-2.04 c -0.14,0.876 -0.249,1.587 -0.318,2.144 -0.067,0.567 -0.101,1.131 -0.101,1.704 -0.767,-1.254 -1.757,-2.294 -2.98,-3.109 -1.221,-0.821 -2.579,-1.228 -4.075,-1.228 -2.092,0 -3.701,0.648 -4.84,1.946 -1.132,1.303 -1.704,3.059 -1.704,5.276 0,2.343 0.823,4.223 2.473,5.618 1.649,1.3950005 3.89,2.0920005 6.709,2.0920005 h 4.417 v 3.106 c 0,1.786 -0.456,3.193 -1.351,4.21 -0.914,1.00399996 -2.17,1.51199995911 -3.791,1.51199995911 -1.508,0 -2.752,-0.47899999911 -3.728,-1.44999995911 -0.973,-0.965 -1.456,-2.144 -1.456,-3.549 l -2.623,0.023 -0.046,0.137 c -0.074,1.906 0.647,3.591 2.168,5.08399996 1.515,1.48900004 3.459,2.22900004 5.825,2.22900004 2.338,0 4.22,-0.711 5.657,-2.12800004 1.429,-1.43099996 2.146,-3.47099996 2.146,-6.12399996 V -18.174295 c 0,-0.903 0.042,-1.78 0.121,-2.617 0.081,-0.848 0.212,-1.665 0.417,-2.48 z m -20.0925,4.627199 c -0.624,-1.28 -1.771,-2.454 -3.449,-3.516 -1.676,-1.069 -3.805,-1.6 -6.391,-1.6 -3.412,0 -6.156,1.075 -8.24,3.249 -2.076,2.157 -3.116,5.266 -3.116,9.323 v 10.116 c 0,3.969 0.98,7.013 2.946,9.138 1.962,2.108 4.59,3.177 7.872,3.177 3.208,0 5.695,-0.844 7.455,-2.513 1.755,-1.675 2.677,-4.015 2.757,-7.003 l -0.044,-0.133 h -2.619 c -0.094,2.29 -0.759,4.057 -2.01,5.305 -1.244,1.238 -3.095,1.864 -5.539,1.864 -2.473,0 -4.432,-0.837 -5.866,-2.516 -1.43,-1.675 -2.143,-4.103 -2.143,-7.293 v -10.174 c 0,-3.308 0.771,-5.83 2.311,-7.567 1.54,-1.724 3.616,-2.588 6.236,-2.588 1.913,0 3.451,0.339 4.602,1.033 1.155,0.684 1.956,1.519 2.409,2.51 v 8.861 h -7.06 v 2.463 h 9.889 z" + id="path213" /></g></g><g id="g78" transform="matrix(1.1310535,0,0,1.1310535,348.13109,279.2668)" style="stroke-width:0.884131"><path diff --git a/methods.py b/methods.py index 7654e6e86d8..33ab894f924 100644 --- a/methods.py +++ b/methods.py @@ -50,7 +50,7 @@ def disable_warnings(self): def force_optimization_on_debug(self): # 'self' is the environment - if self["target"] != "template-release": + if self["target"] == "template_release": return if self.msvc: diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index c233d518012..b964bbce7ee 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -478,7 +478,24 @@ Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_c } if (look_class->has_member(name)) { resolve_class_member(look_class, name, p_class); - base = look_class->get_member(name).get_datatype(); + GDScriptParser::ClassNode::Member member = look_class->get_member(name); + GDScriptParser::DataType member_datatype = member.get_datatype(); + + switch (member.type) { + case GDScriptParser::ClassNode::Member::CLASS: + break; // OK. + case GDScriptParser::ClassNode::Member::CONSTANT: + if (member_datatype.kind != GDScriptParser::DataType::SCRIPT && member_datatype.kind != GDScriptParser::DataType::CLASS) { + push_error(vformat(R"(Constant "%s" is not a preloaded script or class.)", name), p_class); + return ERR_PARSE_ERROR; + } + break; + default: + push_error(vformat(R"(Cannot use %s "%s" in extends chain.)", member.get_type_name(), name), p_class); + return ERR_PARSE_ERROR; + } + + base = member_datatype; found = true; break; } @@ -506,6 +523,10 @@ Error GDScriptAnalyzer::resolve_class_inheritance(GDScriptParser::ClassNode *p_c GDScriptParser::DataType id_type = id->get_datatype(); if (!id_type.is_set()) { push_error(vformat(R"(Could not find type "%s" under base "%s".)", id->name, base.to_string()), p_class); + return ERR_PARSE_ERROR; + } else if (id_type.kind != GDScriptParser::DataType::SCRIPT && id_type.kind != GDScriptParser::DataType::CLASS) { + push_error(vformat(R"(Identifier "%s" is not a preloaded script or class.)", id->name), p_class); + return ERR_PARSE_ERROR; } base = id_type; diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index 146ed10ceba..1bf9f85831e 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -337,7 +337,7 @@ void ExtendGDScriptParser::parse_function_symbol(const GDScriptParser::FunctionN symbol.kind = lsp::SymbolKind::Variable; symbol.name = parameter->identifier->name; symbol.range.start.line = LINE_NUMBER_TO_INDEX(parameter->start_line); - symbol.range.start.character = LINE_NUMBER_TO_INDEX(parameter->start_line); + symbol.range.start.character = LINE_NUMBER_TO_INDEX(parameter->start_column); symbol.range.end.line = LINE_NUMBER_TO_INDEX(parameter->end_line); symbol.range.end.character = LINE_NUMBER_TO_INDEX(parameter->end_column); symbol.uri = uri; diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp index acd75f039a8..0aa53c1dbe5 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.cpp +++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp @@ -237,6 +237,7 @@ void GDScriptLanguageProtocol::poll() { HashMap<int, Ref<LSPeer>>::Iterator E = clients.begin(); while (E != clients.end()) { Ref<LSPeer> peer = E->value; + peer->connection->poll(); StreamPeerTCP::Status status = peer->connection->get_status(); if (status == StreamPeerTCP::STATUS_NONE || status == StreamPeerTCP::STATUS_ERROR) { on_client_disconnected(E->key); diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.gd new file mode 100644 index 00000000000..72af0991587 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.gd @@ -0,0 +1,9 @@ +# GH-75870 + +const A = 1 + +class B extends A: + pass + +func test(): + pass diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out new file mode 100644 index 00000000000..65d629a35b6 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Constant "A" is not a preloaded script or class. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.gd new file mode 100644 index 00000000000..fe334f8cb77 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.gd @@ -0,0 +1,12 @@ +# GH-75870 + +class A: + const X = 1 + +const Y = A.X # A.X is now resolved. + +class B extends A.X: + pass + +func test(): + pass diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out new file mode 100644 index 00000000000..951cfb1ea41 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Identifier "X" is not a preloaded script or class. diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.gd new file mode 100644 index 00000000000..6574d4cf31c --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.gd @@ -0,0 +1,9 @@ +# GH-75870 + +var A = 1 + +class B extends A: + pass + +func test(): + pass diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out new file mode 100644 index 00000000000..7b39af69792 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out @@ -0,0 +1,2 @@ +GDTEST_ANALYZER_ERROR +Cannot use variable "A" in extends chain. diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index d93485a8005..7087c306889 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -2820,7 +2820,13 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> p_state) { if (j == 0) { const Array &target_names = extras.has("targetNames") ? (Array)extras["targetNames"] : Array(); for (int k = 0; k < targets.size(); k++) { - import_mesh->add_blend_shape(k < target_names.size() ? (String)target_names[k] : String("morph_") + itos(k)); + String bs_name; + if (k < target_names.size() && ((String)target_names[k]).size() != 0) { + bs_name = (String)target_names[k]; + } else { + bs_name = String("morph_") + itos(k); + } + import_mesh->add_blend_shape(bs_name); } } diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 3cf6288fef2..e1aa467fdc6 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -4105,6 +4105,7 @@ RID TextServerAdvanced::_shaped_text_substr(const RID &p_shaped, int64_t p_start new_sd->direction = sd->direction; new_sd->custom_punct = sd->custom_punct; new_sd->para_direction = sd->para_direction; + new_sd->base_para_direction = sd->base_para_direction; for (int i = 0; i < TextServer::SPACING_MAX; i++) { new_sd->extra_spacing[i] = sd->extra_spacing[i]; } @@ -4149,22 +4150,61 @@ bool TextServerAdvanced::_shape_substr(ShapedTextDataAdvanced *p_new_sd, const S ERR_FAIL_COND_V_MSG((start < 0 || end - start > p_new_sd->utf16.length()), false, "Invalid BiDi override range."); // Create temporary line bidi & shape. - UBiDi *bidi_iter = ubidi_openSized(end - start, 0, &err); - ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err)); - ubidi_setLine(p_sd->bidi_iter[ov], start, end, bidi_iter, &err); - if (U_FAILURE(err)) { - ubidi_close(bidi_iter); - ERR_FAIL_V_MSG(false, u_errorName(err)); + UBiDi *bidi_iter = nullptr; + if (p_sd->bidi_iter[ov]) { + bidi_iter = ubidi_openSized(end - start, 0, &err); + if (U_SUCCESS(err)) { + ubidi_setLine(p_sd->bidi_iter[ov], start, end, bidi_iter, &err); + if (U_FAILURE(err)) { + // Line BiDi failed (string contains incompatible control characters), try full paragraph BiDi instead. + err = U_ZERO_ERROR; + const UChar *data = p_sd->utf16.get_data(); + switch (static_cast<TextServer::Direction>(p_sd->bidi_override[ov].z)) { + case DIRECTION_LTR: { + ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_LTR, nullptr, &err); + } break; + case DIRECTION_RTL: { + ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_RTL, nullptr, &err); + } break; + case DIRECTION_INHERITED: { + ubidi_setPara(bidi_iter, data + start, end - start, p_sd->base_para_direction, nullptr, &err); + } break; + case DIRECTION_AUTO: { + UBiDiDirection direction = ubidi_getBaseDirection(data + start, end - start); + if (direction != UBIDI_NEUTRAL) { + ubidi_setPara(bidi_iter, data + start, end - start, direction, nullptr, &err); + } else { + ubidi_setPara(bidi_iter, data + start, end - start, p_sd->base_para_direction, nullptr, &err); + } + } break; + } + if (U_FAILURE(err)) { + ubidi_close(bidi_iter); + bidi_iter = nullptr; + ERR_PRINT(vformat("BiDi reordering for the line failed: %s", u_errorName(err))); + } + } + } else { + bidi_iter = nullptr; + ERR_PRINT(vformat("BiDi iterator allocation for the line failed: %s", u_errorName(err))); + } } p_new_sd->bidi_iter.push_back(bidi_iter); err = U_ZERO_ERROR; - int bidi_run_count = ubidi_countRuns(bidi_iter, &err); - ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err)); + int bidi_run_count = 1; + if (bidi_iter) { + bidi_run_count = ubidi_countRuns(bidi_iter, &err); + if (U_FAILURE(err)) { + ERR_PRINT(u_errorName(err)); + } + } for (int i = 0; i < bidi_run_count; i++) { int32_t _bidi_run_start = 0; - int32_t _bidi_run_length = 0; - ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length); + int32_t _bidi_run_length = end - start; + if (bidi_iter) { + ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length); + } int32_t bidi_run_start = _convert_pos(p_sd, ov_start + start + _bidi_run_start); int32_t bidi_run_end = _convert_pos(p_sd, ov_start + start + _bidi_run_start + _bidi_run_length); @@ -5571,25 +5611,25 @@ bool TextServerAdvanced::_shaped_text_shape(const RID &p_shaped) { sd->script_iter = memnew(ScriptIterator(sd->text, 0, sd->text.length())); } - int base_para_direction = UBIDI_DEFAULT_LTR; + sd->base_para_direction = UBIDI_DEFAULT_LTR; switch (sd->direction) { case DIRECTION_LTR: { sd->para_direction = DIRECTION_LTR; - base_para_direction = UBIDI_LTR; + sd->base_para_direction = UBIDI_LTR; } break; case DIRECTION_RTL: { sd->para_direction = DIRECTION_RTL; - base_para_direction = UBIDI_RTL; + sd->base_para_direction = UBIDI_RTL; } break; case DIRECTION_INHERITED: case DIRECTION_AUTO: { UBiDiDirection direction = ubidi_getBaseDirection(data, sd->utf16.length()); if (direction != UBIDI_NEUTRAL) { sd->para_direction = (direction == UBIDI_RTL) ? DIRECTION_RTL : DIRECTION_LTR; - base_para_direction = direction; + sd->base_para_direction = direction; } else { sd->para_direction = DIRECTION_LTR; - base_para_direction = UBIDI_DEFAULT_LTR; + sd->base_para_direction = UBIDI_DEFAULT_LTR; } } break; } @@ -5609,38 +5649,53 @@ bool TextServerAdvanced::_shaped_text_shape(const RID &p_shaped) { UErrorCode err = U_ZERO_ERROR; UBiDi *bidi_iter = ubidi_openSized(end - start, 0, &err); - ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err)); - - switch (static_cast<TextServer::Direction>(sd->bidi_override[ov].z)) { - case DIRECTION_LTR: { - ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_LTR, nullptr, &err); - } break; - case DIRECTION_RTL: { - ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_RTL, nullptr, &err); - } break; - case DIRECTION_INHERITED: { - ubidi_setPara(bidi_iter, data + start, end - start, base_para_direction, nullptr, &err); - } break; - case DIRECTION_AUTO: { - UBiDiDirection direction = ubidi_getBaseDirection(data + start, end - start); - if (direction != UBIDI_NEUTRAL) { - ubidi_setPara(bidi_iter, data + start, end - start, direction, nullptr, &err); - } else { - ubidi_setPara(bidi_iter, data + start, end - start, base_para_direction, nullptr, &err); - } - } break; + if (U_SUCCESS(err)) { + switch (static_cast<TextServer::Direction>(sd->bidi_override[ov].z)) { + case DIRECTION_LTR: { + ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_LTR, nullptr, &err); + } break; + case DIRECTION_RTL: { + ubidi_setPara(bidi_iter, data + start, end - start, UBIDI_RTL, nullptr, &err); + } break; + case DIRECTION_INHERITED: { + ubidi_setPara(bidi_iter, data + start, end - start, sd->base_para_direction, nullptr, &err); + } break; + case DIRECTION_AUTO: { + UBiDiDirection direction = ubidi_getBaseDirection(data + start, end - start); + if (direction != UBIDI_NEUTRAL) { + ubidi_setPara(bidi_iter, data + start, end - start, direction, nullptr, &err); + } else { + ubidi_setPara(bidi_iter, data + start, end - start, sd->base_para_direction, nullptr, &err); + } + } break; + } + if (U_FAILURE(err)) { + ubidi_close(bidi_iter); + bidi_iter = nullptr; + ERR_PRINT(vformat("BiDi reordering for the paragraph failed: %s", u_errorName(err))); + } + } else { + bidi_iter = nullptr; + ERR_PRINT(vformat("BiDi iterator allocation for the paragraph failed: %s", u_errorName(err))); } - ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err)); sd->bidi_iter.push_back(bidi_iter); err = U_ZERO_ERROR; - int bidi_run_count = ubidi_countRuns(bidi_iter, &err); - ERR_FAIL_COND_V_MSG(U_FAILURE(err), false, u_errorName(err)); + int bidi_run_count = 1; + if (bidi_iter) { + bidi_run_count = ubidi_countRuns(bidi_iter, &err); + if (U_FAILURE(err)) { + ERR_PRINT(u_errorName(err)); + } + } for (int i = 0; i < bidi_run_count; i++) { int32_t _bidi_run_start = 0; - int32_t _bidi_run_length = 0; + int32_t _bidi_run_length = end - start; + bool is_rtl = false; hb_direction_t bidi_run_direction = HB_DIRECTION_INVALID; - bool is_rtl = (ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length) == UBIDI_LTR); + if (bidi_iter) { + is_rtl = (ubidi_getVisualRun(bidi_iter, i, &_bidi_run_start, &_bidi_run_length) == UBIDI_LTR); + } switch (sd->orientation) { case ORIENTATION_HORIZONTAL: { if (is_rtl) { @@ -5697,7 +5752,7 @@ bool TextServerAdvanced::_shaped_text_shape(const RID &p_shaped) { gl.start = span.start; gl.end = span.end; gl.count = 1; - gl.flags = GRAPHEME_IS_VALID | GRAPHEME_IS_VIRTUAL; + gl.flags = GRAPHEME_IS_VALID | GRAPHEME_IS_EMBEDDED_OBJECT; if (sd->orientation == ORIENTATION_HORIZONTAL) { gl.advance = sd->objects[span.embedded_key].rect.size.x; } else { diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index ce08cf7694c..dff87f3d744 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -475,6 +475,7 @@ class TextServerAdvanced : public TextServerExtension { /* Shaped data */ TextServer::Direction para_direction = DIRECTION_LTR; // Detected text direction. + int base_para_direction = UBIDI_DEFAULT_LTR; bool valid = false; // String is shaped. bool line_breaks_valid = false; // Line and word break flags are populated (and virtual zero width spaces inserted). bool justification_ops_valid = false; // Virtual elongation glyphs are added to the string. @@ -514,7 +515,9 @@ class TextServerAdvanced : public TextServerExtension { ~ShapedTextDataAdvanced() { for (int i = 0; i < bidi_iter.size(); i++) { - ubidi_close(bidi_iter[i]); + if (bidi_iter[i]) { + ubidi_close(bidi_iter[i]); + } } if (script_iter) { memdelete(script_iter); diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 86877262876..eac5ba4a076 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -3664,7 +3664,7 @@ bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) { gl.end = span.end; gl.count = 1; gl.index = 0; - gl.flags = GRAPHEME_IS_VALID | GRAPHEME_IS_VIRTUAL; + gl.flags = GRAPHEME_IS_VALID | GRAPHEME_IS_EMBEDDED_OBJECT; if (sd->orientation == ORIENTATION_HORIZONTAL) { gl.advance = sd->objects[span.embedded_key].rect.size.x; } else { diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java index 7b628e25edf..f48dba56df2 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotTextInputWrapper.java @@ -124,11 +124,12 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) { if (mEdit == pTextView && isFullScreenEdit() && pKeyEvent != null) { final String characters = pKeyEvent.getCharacters(); - - for (int i = 0; i < characters.length(); i++) { - final int character = characters.codePointAt(i); - GodotLib.key(0, character, 0, true); - GodotLib.key(0, character, 0, false); + if (characters != null) { + for (int i = 0; i < characters.length(); i++) { + final int character = characters.codePointAt(i); + GodotLib.key(0, character, 0, true); + GodotLib.key(0, character, 0, false); + } } } diff --git a/platform/android/tts_android.h b/platform/android/tts_android.h index 8e3bfccbdb1..8e00ac5000f 100644 --- a/platform/android/tts_android.h +++ b/platform/android/tts_android.h @@ -32,6 +32,7 @@ #define TTS_ANDROID_H #include "core/string/ustring.h" +#include "core/templates/hash_map.h" #include "core/variant/array.h" #include "servers/display_server.h" diff --git a/platform/ios/tts_ios.h b/platform/ios/tts_ios.h index 2d104de8ae0..7f9d30b22b5 100644 --- a/platform/ios/tts_ios.h +++ b/platform/ios/tts_ios.h @@ -38,8 +38,8 @@ #endif #include "core/string/ustring.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" diff --git a/platform/linuxbsd/tts_linux.h b/platform/linuxbsd/tts_linux.h index 4134f8fa2fe..651a64d9d62 100644 --- a/platform/linuxbsd/tts_linux.h +++ b/platform/linuxbsd/tts_linux.h @@ -34,8 +34,8 @@ #include "core/os/thread.h" #include "core/os/thread_safe.h" #include "core/string/ustring.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index 5a097adf396..ab76d9b2738 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -768,7 +768,7 @@ Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_pre String certificate_file = p_preset->get("codesign/certificate_file"); String certificate_pass = p_preset->get("codesign/certificate_password"); - if (!certificate_file.is_empty() && !certificate_file.is_empty()) { + if (!certificate_file.is_empty() && !certificate_pass.is_empty()) { args.push_back("--p12-file"); args.push_back(certificate_file); args.push_back("--p12-password"); diff --git a/platform/macos/tts_macos.h b/platform/macos/tts_macos.h index 2153a4c692d..35205bd1ae4 100644 --- a/platform/macos/tts_macos.h +++ b/platform/macos/tts_macos.h @@ -32,8 +32,8 @@ #define TTS_MACOS_H #include "core/string/ustring.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" diff --git a/platform/windows/tts_windows.cpp b/platform/windows/tts_windows.cpp index 3a143d0ecb0..54ab93ee01e 100644 --- a/platform/windows/tts_windows.cpp +++ b/platform/windows/tts_windows.cpp @@ -36,15 +36,16 @@ void __stdcall TTS_Windows::speech_event_callback(WPARAM wParam, LPARAM lParam) TTS_Windows *tts = TTS_Windows::get_singleton(); SPEVENT event; while (tts->synth->GetEvents(1, &event, NULL) == S_OK) { - if (tts->ids.has(event.ulStreamNum)) { + uint32_t stream_num = (uint32_t)event.ulStreamNum; + if (tts->ids.has(stream_num)) { if (event.eEventId == SPEI_START_INPUT_STREAM) { - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_STARTED, tts->ids[event.ulStreamNum].id); + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_STARTED, tts->ids[stream_num].id); } else if (event.eEventId == SPEI_END_INPUT_STREAM) { - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_ENDED, tts->ids[event.ulStreamNum].id); - tts->ids.erase(event.ulStreamNum); + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_ENDED, tts->ids[stream_num].id); + tts->ids.erase(stream_num); tts->_update_tts(); } else if (event.eEventId == SPEI_WORD_BOUNDARY) { - const Char16String &string = tts->ids[event.ulStreamNum].string; + const Char16String &string = tts->ids[stream_num].string; int pos = 0; for (int i = 0; i < MIN(event.lParam, string.length()); i++) { char16_t c = string[i]; @@ -53,7 +54,7 @@ void __stdcall TTS_Windows::speech_event_callback(WPARAM wParam, LPARAM lParam) } pos++; } - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_BOUNDARY, tts->ids[event.ulStreamNum].id, pos - tts->ids[event.ulStreamNum].offset); + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_BOUNDARY, tts->ids[stream_num].id, pos - tts->ids[stream_num].offset); } } } @@ -106,7 +107,7 @@ void TTS_Windows::_update_tts() { synth->SetRate(10.f * log10(message.rate) / log10(3.f)); synth->Speak((LPCWSTR)ut.string.get_data(), flags, &stream_number); - ids[stream_number] = ut; + ids[(uint32_t)stream_number] = ut; queue.pop_front(); } @@ -230,9 +231,10 @@ void TTS_Windows::stop() { SPVOICESTATUS status; synth->GetStatus(&status, nullptr); - if (ids.has(status.ulCurrentStream)) { - DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, ids[status.ulCurrentStream].id); - ids.erase(status.ulCurrentStream); + uint32_t current_stream = (uint32_t)status.ulCurrentStream; + if (ids.has(current_stream)) { + DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, ids[current_stream].id); + ids.erase(current_stream); } for (DisplayServer::TTSUtterance &message : queue) { DisplayServer::get_singleton()->tts_post_utterance_event(DisplayServer::TTS_UTTERANCE_CANCELED, message.id); diff --git a/platform/windows/tts_windows.h b/platform/windows/tts_windows.h index f0538a097cb..33b597c6125 100644 --- a/platform/windows/tts_windows.h +++ b/platform/windows/tts_windows.h @@ -32,8 +32,8 @@ #define TTS_WINDOWS_H #include "core/string/ustring.h" +#include "core/templates/hash_map.h" #include "core/templates/list.h" -#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @@ -54,7 +54,7 @@ class TTS_Windows { int offset; int id; }; - RBMap<ULONG, UTData> ids; + HashMap<uint32_t, UTData> ids; static void __stdcall speech_event_callback(WPARAM wParam, LPARAM lParam); void _update_tts(); diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 04c75553067..b86635b82b1 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -722,12 +722,12 @@ void CPUParticles2D::_particles_process(double p_delta) { tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->sample(0); }*/ - real_t tex_angle = 0.0; + real_t tex_angle = 1.0; if (curve_parameters[PARAM_ANGLE].is_valid()) { tex_angle = curve_parameters[PARAM_ANGLE]->sample(tv); } - real_t tex_anim_offset = 0.0; + real_t tex_anim_offset = 1.0; if (curve_parameters[PARAM_ANGLE].is_valid()) { tex_anim_offset = curve_parameters[PARAM_ANGLE]->sample(tv); } diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index 23855b2d8e8..2ee62920ed2 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -742,12 +742,12 @@ void CPUParticles3D::_particles_process(double p_delta) { tex_linear_velocity = curve_parameters[PARAM_INITIAL_LINEAR_VELOCITY]->sample(0); }*/ - real_t tex_angle = 0.0; + real_t tex_angle = 1.0; if (curve_parameters[PARAM_ANGLE].is_valid()) { tex_angle = curve_parameters[PARAM_ANGLE]->sample(tv); } - real_t tex_anim_offset = 0.0; + real_t tex_anim_offset = 1.0; if (curve_parameters[PARAM_ANGLE].is_valid()) { tex_anim_offset = curve_parameters[PARAM_ANGLE]->sample(tv); } diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 91c4fa37612..ca5e9b401cd 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -1968,7 +1968,7 @@ void CodeEdit::confirm_code_completion(bool p_replace) { return; } - char32_t caret_last_completion_char; + char32_t caret_last_completion_char = 0; begin_complex_operation(); Vector<int> caret_edit_order = get_caret_index_edit_order(); for (const int &i : caret_edit_order) { diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 48e37599816..cea60f375a4 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -500,8 +500,9 @@ void ColorPicker::_html_submitted(const String &p_html) { return; } - Color previous_color = color; - color = Color::html(p_html); + const Color previous_color = color; + color = Color::from_string(p_html, previous_color); + if (!is_editing_alpha()) { color.a = previous_color.a; } @@ -601,13 +602,13 @@ void ColorPicker::_text_type_toggled() { text_type->set_icon(get_theme_icon(SNAME("Script"), SNAME("EditorIcons"))); c_text->set_editable(false); - c_text->set_h_size_flags(SIZE_EXPAND_FILL); + c_text->set_tooltip_text(RTR("Copy this constructor in a script.")); } else { text_type->set_text("#"); text_type->set_icon(nullptr); c_text->set_editable(true); - c_text->set_h_size_flags(SIZE_FILL); + c_text->set_tooltip_text(RTR("Enter a hex code (\"#ff0000\") or named color (\"red\").")); } _update_color(); } @@ -1754,7 +1755,10 @@ ColorPicker::ColorPicker() { c_text = memnew(LineEdit); hex_hbc->add_child(c_text); + c_text->set_h_size_flags(SIZE_EXPAND_FILL); c_text->set_select_all_on_focus(true); + c_text->set_tooltip_text(RTR("Enter a hex code (\"#ff0000\") or named color (\"red\").")); + c_text->set_placeholder(RTR("Hex code or named color")); c_text->connect("text_submitted", callable_mp(this, &ColorPicker::_html_submitted)); c_text->connect("text_changed", callable_mp(this, &ColorPicker::_text_changed)); c_text->connect("focus_exited", callable_mp(this, &ColorPicker::_html_focus_exit)); diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 3ecb9c47c0a..8aee6144fce 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -765,7 +765,7 @@ void Control::set_anchor_and_offset(Side p_side, real_t p_anchor, real_t p_pos, set_offset(p_side, p_pos); } -void Control::set_begin(const Size2 &p_point) { +void Control::set_begin(const Point2 &p_point) { ERR_FAIL_COND(!isfinite(p_point.x) || !isfinite(p_point.y)); if (data.offset[0] == p_point.x && data.offset[1] == p_point.y) { return; @@ -776,11 +776,11 @@ void Control::set_begin(const Size2 &p_point) { _size_changed(); } -Size2 Control::get_begin() const { - return Size2(data.offset[0], data.offset[1]); +Point2 Control::get_begin() const { + return Point2(data.offset[0], data.offset[1]); } -void Control::set_end(const Size2 &p_point) { +void Control::set_end(const Point2 &p_point) { if (data.offset[2] == p_point.x && data.offset[3] == p_point.y) { return; } @@ -790,8 +790,8 @@ void Control::set_end(const Size2 &p_point) { _size_changed(); } -Size2 Control::get_end() const { - return Size2(data.offset[2], data.offset[3]); +Point2 Control::get_end() const { + return Point2(data.offset[2], data.offset[3]); } void Control::set_h_grow_direction(GrowDirection p_direction) { @@ -1358,11 +1358,11 @@ void Control::set_grow_direction_preset(LayoutPreset p_preset) { /// Manual positioning. -void Control::_set_position(const Size2 &p_point) { +void Control::_set_position(const Point2 &p_point) { set_position(p_point); } -void Control::set_position(const Size2 &p_point, bool p_keep_offsets) { +void Control::set_position(const Point2 &p_point, bool p_keep_offsets) { if (p_keep_offsets) { _compute_anchors(Rect2(p_point, data.size_cache), data.offset, data.anchor); } else { diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 6b2faf1a400..17cc81c8d34 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -952,7 +952,7 @@ void LineEdit::_notification(int p_what) { if (ceil(ofs.x) >= x_ofs && (ofs.x + glyphs[i].advance) <= ofs_max) { if (glyphs[i].font_rid != RID()) { TS->font_draw_glyph(glyphs[i].font_rid, ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_selected_color : font_color); - } else if ((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) { + } else if (((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) && ((glyphs[i].flags & TextServer::GRAPHEME_IS_EMBEDDED_OBJECT) != TextServer::GRAPHEME_IS_EMBEDDED_OBJECT)) { TS->draw_hex_code_box(ci, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, selected ? font_selected_color : font_color); } } diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 68e12b9bb59..cf7b6cf6081 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1323,7 +1323,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o if (!skip) { if (frid != RID()) { TS->font_draw_glyph(frid, ci, glyphs[i].font_size, p_ofs + fx_offset + off, gl, font_color); - } else if ((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) { + } else if (((glyphs[i].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) && ((glyphs[i].flags & TextServer::GRAPHEME_IS_EMBEDDED_OBJECT) != TextServer::GRAPHEME_IS_EMBEDDED_OBJECT)) { TS->draw_hex_code_box(ci, glyphs[i].font_size, p_ofs + fx_offset + off, gl, font_color); } } @@ -1510,7 +1510,7 @@ float RichTextLabel::_find_click_in_line(ItemFrame *p_frame, int p_line, const V } if (crect.has_point(p_click)) { for (int j = 0; j < (int)frame->lines.size(); j++) { - _find_click_in_line(frame, j, rect.position + Vector2(0, frame->lines[j].offset.y), rect.size.x, p_click, &table_click_frame, &table_click_line, &table_click_item, &table_click_char, true, p_meta); + _find_click_in_line(frame, j, rect.position + Vector2(frame->padding.position.x, frame->lines[j].offset.y), rect.size.x, p_click, &table_click_frame, &table_click_line, &table_click_item, &table_click_char, true, p_meta); if (table_click_frame && table_click_item) { // Save cell detected cell hit data. table_range = Vector2i(INT32_MAX, 0); @@ -2697,6 +2697,10 @@ bool RichTextLabel::is_ready() const { return (main->first_invalid_line.load() == (int)main->lines.size() && main->first_resized_line.load() == (int)main->lines.size() && main->first_invalid_font_line.load() == (int)main->lines.size()); } +bool RichTextLabel::is_updating() const { + return updating.load() || validating.load(); +} + void RichTextLabel::set_threaded(bool p_threaded) { if (threaded != p_threaded) { _stop_thread(); @@ -2721,6 +2725,7 @@ bool RichTextLabel::_validate_line_caches() { if (updating.load()) { return false; } + validating.store(true); if (main->first_invalid_line.load() == (int)main->lines.size()) { MutexLock data_lock(data_mutex); Rect2 text_rect = _get_text_rect(); @@ -2739,6 +2744,7 @@ bool RichTextLabel::_validate_line_caches() { if (main->first_resized_line.load() == (int)main->lines.size()) { vscroll->set_value(old_scroll); + validating.store(false); return true; } @@ -2790,8 +2796,10 @@ bool RichTextLabel::_validate_line_caches() { if (fit_content) { update_minimum_size(); } + validating.store(false); return true; } + validating.store(false); stop_thread.store(false); if (threaded) { updating.store(true); @@ -2801,7 +2809,9 @@ bool RichTextLabel::_validate_line_caches() { loading_started = OS::get_singleton()->get_ticks_msec(); return false; } else { + updating.store(true); _process_line_caches(); + updating.store(false); queue_redraw(); return true; } @@ -5882,6 +5892,7 @@ RichTextLabel::RichTextLabel(const String &p_text) { set_text(p_text); updating.store(false); + validating.store(false); stop_thread.store(false); set_clip_contents(true); diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 1dae8b75ca1..5a9a8478b7f 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -376,6 +376,7 @@ private: bool threaded = false; std::atomic<bool> stop_thread; std::atomic<bool> updating; + std::atomic<bool> validating; std::atomic<double> loaded; uint64_t loading_started = 0; @@ -679,6 +680,7 @@ public: void deselect(); bool is_ready() const; + bool is_updating() const; void set_threaded(bool p_threaded); bool is_threaded() const; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 0560b9f2e45..814af12d600 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1276,7 +1276,7 @@ void TextEdit::_notification(int p_what) { if (glyphs[j].font_rid != RID()) { TS->font_draw_glyph(glyphs[j].font_rid, ci, glyphs[j].font_size, Vector2(char_margin + char_ofs + ofs_x + glyphs[j].x_off, ofs_y + glyphs[j].y_off), glyphs[j].index, gl_color); had_glyphs_drawn = true; - } else if ((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) { + } else if (((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL) && ((glyphs[j].flags & TextServer::GRAPHEME_IS_EMBEDDED_OBJECT) != TextServer::GRAPHEME_IS_EMBEDDED_OBJECT)) { TS->draw_hex_code_box(ci, glyphs[j].font_size, Vector2(char_margin + char_ofs + ofs_x + glyphs[j].x_off, ofs_y + glyphs[j].y_off), glyphs[j].index, gl_color); had_glyphs_drawn = true; } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index f8c2e9f4ad3..bae2c8a9cbe 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4523,8 +4523,8 @@ int Tree::get_item_offset(TreeItem *p_item) const { return ofs; } - ofs += compute_item_height(it); - if (it != root || !hide_root) { + if ((it != root || !hide_root) && it->is_visible()) { + ofs += compute_item_height(it); ofs += theme_cache.v_separation; } diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 72fb8387320..de76d3610d3 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -219,7 +219,7 @@ void CanvasItem::_enter_canvas() { RenderingServer::get_singleton()->canvas_item_set_parent(canvas_item, canvas); RenderingServer::get_singleton()->canvas_item_set_visibility_layer(canvas_item, visibility_layer); - canvas_group = "root_canvas" + itos(canvas.get_id()); + canvas_group = "_root_canvas" + itos(canvas.get_id()); add_to_group(canvas_group); if (canvas_layer) { @@ -341,9 +341,7 @@ void CanvasItem::_notification(int p_what) { } void CanvasItem::_window_visibility_changed() { - if (visible) { - _propagate_visibility_changed(window->is_visible()); - } + _propagate_visibility_changed(window->is_visible()); } void CanvasItem::queue_redraw() { diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 2e1ba96d11d..35c81ea91b4 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -162,7 +162,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_font("font", "Button", Ref<Font>()); theme->set_font_size("font_size", "Button", -1); - theme->set_constant("outline_size", "Button", 0 * scale); + theme->set_constant("outline_size", "Button", 0); theme->set_color("font_color", "Button", control_font_color); theme->set_color("font_pressed_color", "Button", control_font_pressed_color); @@ -190,7 +190,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_font("font", "MenuBar", Ref<Font>()); theme->set_font_size("font_size", "MenuBar", -1); - theme->set_constant("outline_size", "MenuBar", 0 * scale); + theme->set_constant("outline_size", "MenuBar", 0); theme->set_color("font_color", "MenuBar", control_font_color); theme->set_color("font_pressed_color", "MenuBar", control_font_pressed_color); @@ -315,7 +315,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_color("font_outline_color", "CheckBox", Color(1, 1, 1)); theme->set_constant("h_separation", "CheckBox", 4 * scale); - theme->set_constant("check_v_offset", "CheckBox", 0 * scale); + theme->set_constant("check_v_offset", "CheckBox", 0); theme->set_constant("outline_size", "CheckBox", 0); // CheckButton @@ -352,7 +352,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_color("font_outline_color", "CheckButton", Color(1, 1, 1)); theme->set_constant("h_separation", "CheckButton", 4 * scale); - theme->set_constant("check_v_offset", "CheckButton", 0 * scale); + theme->set_constant("check_v_offset", "CheckButton", 0); theme->set_constant("outline_size", "CheckButton", 0); // Label @@ -1034,7 +1034,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("shadow_offset_y", "RichTextLabel", 1 * scale); theme->set_constant("shadow_outline_size", "RichTextLabel", 1 * scale); - theme->set_constant("line_separation", "RichTextLabel", 0 * scale); + theme->set_constant("line_separation", "RichTextLabel", 0); theme->set_constant("table_h_separation", "RichTextLabel", 3 * scale); theme->set_constant("table_v_separation", "RichTextLabel", 3 * scale); @@ -1057,10 +1057,10 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("separation", "BoxContainer", 4 * scale); theme->set_constant("separation", "HBoxContainer", 4 * scale); theme->set_constant("separation", "VBoxContainer", 4 * scale); - theme->set_constant("margin_left", "MarginContainer", 0 * scale); - theme->set_constant("margin_top", "MarginContainer", 0 * scale); - theme->set_constant("margin_right", "MarginContainer", 0 * scale); - theme->set_constant("margin_bottom", "MarginContainer", 0 * scale); + theme->set_constant("margin_left", "MarginContainer", 0); + theme->set_constant("margin_top", "MarginContainer", 0); + theme->set_constant("margin_right", "MarginContainer", 0); + theme->set_constant("margin_bottom", "MarginContainer", 0); theme->set_constant("h_separation", "GridContainer", 4 * scale); theme->set_constant("v_separation", "GridContainer", 4 * scale); theme->set_constant("separation", "SplitContainer", 12 * scale); @@ -1069,9 +1069,9 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_constant("minimum_grab_thickness", "SplitContainer", 6 * scale); theme->set_constant("minimum_grab_thickness", "HSplitContainer", 6 * scale); theme->set_constant("minimum_grab_thickness", "VSplitContainer", 6 * scale); - theme->set_constant("autohide", "SplitContainer", 1 * scale); - theme->set_constant("autohide", "HSplitContainer", 1 * scale); - theme->set_constant("autohide", "VSplitContainer", 1 * scale); + theme->set_constant("autohide", "SplitContainer", 1); + theme->set_constant("autohide", "HSplitContainer", 1); + theme->set_constant("autohide", "VSplitContainer", 1); theme->set_constant("h_separation", "FlowContainer", 4 * scale); theme->set_constant("v_separation", "FlowContainer", 4 * scale); theme->set_constant("h_separation", "HFlowContainer", 4 * scale); diff --git a/scene/resources/particle_process_material.cpp b/scene/resources/particle_process_material.cpp index 7ae154ea1d2..41edbcb726b 100644 --- a/scene/resources/particle_process_material.cpp +++ b/scene/resources/particle_process_material.cpp @@ -419,7 +419,7 @@ void ParticleProcessMaterial::_update_shader() { if (tex_parameters[PARAM_ANGLE].is_valid()) { code += " float tex_angle = textureLod(angle_texture, vec2(0.0, 0.0), 0.0).r;\n"; } else { - code += " float tex_angle = 0.0;\n"; + code += " float tex_angle = 1.0;\n"; } if (tex_parameters[PARAM_ANIM_OFFSET].is_valid()) { @@ -737,7 +737,7 @@ void ParticleProcessMaterial::_update_shader() { code += " VELOCITY = normalize(VELOCITY) * v;\n"; code += " }\n"; code += " }\n"; - code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, rand_from_seed(alt_seed));\n"; + code += " float base_angle = (tex_angle) * mix(initial_angle_min, initial_angle_max, angle_rand);\n"; code += " base_angle += CUSTOM.y * LIFETIME * (tex_angular_velocity) * mix(angular_velocity_min,angular_velocity_max, rand_from_seed(alt_seed));\n"; code += " CUSTOM.x = base_angle * degree_to_rad;\n"; // angle code += " CUSTOM.z = (tex_anim_offset) * mix(anim_offset_min, anim_offset_max, rand_from_seed(alt_seed)) + tv * tex_anim_speed * mix(anim_speed_min, anim_speed_max, rand_from_seed(alt_seed));\n"; // angle diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 9e0b856ecd2..27ae83908e5 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -757,76 +757,84 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const { } // Create infill (no AA). - if (draw_center && (!aa_on || blend_on || !draw_border)) { + if (draw_center && (!aa_on || blend_on)) { draw_ring(verts, indices, colors, border_style_rect, adapted_corner, infill_rect, infill_rect, bg_color, bg_color, corner_detail, skew, true); } if (aa_on) { real_t aa_border_width[4]; + real_t aa_border_width_half[4]; real_t aa_fill_width[4]; + real_t aa_fill_width_half[4]; if (draw_border) { for (int i = 0; i < 4; i++) { if (border_width[i] > 0) { aa_border_width[i] = aa_size; + aa_border_width_half[i] = aa_size / 2; aa_fill_width[i] = 0; + aa_fill_width_half[i] = 0; } else { aa_border_width[i] = 0; + aa_border_width_half[i] = 0; aa_fill_width[i] = aa_size; + aa_fill_width_half[i] = aa_size / 2; } } } else { for (int i = 0; i < 4; i++) { aa_border_width[i] = 0; + aa_border_width_half[i] = 0; aa_fill_width[i] = aa_size; + aa_fill_width_half[i] = aa_size / 2; } } - Rect2 infill_inner_rect = infill_rect.grow_individual(-aa_border_width[SIDE_LEFT], -aa_border_width[SIDE_TOP], - -aa_border_width[SIDE_RIGHT], -aa_border_width[SIDE_BOTTOM]); - if (draw_center) { - if (!blend_on && draw_border) { - Rect2 infill_inner_rect_aa = infill_inner_rect.grow_individual(aa_border_width[SIDE_LEFT], aa_border_width[SIDE_TOP], - aa_border_width[SIDE_RIGHT], aa_border_width[SIDE_BOTTOM]); - // Create infill within AA border. + // Infill rect, transparent side of antialiasing gradient (base infill rect enlarged by AA size) + Rect2 infill_rect_aa_transparent = infill_rect.grow_individual(aa_fill_width_half[SIDE_LEFT], aa_fill_width_half[SIDE_TOP], + aa_fill_width_half[SIDE_RIGHT], aa_fill_width_half[SIDE_BOTTOM]); + // Infill rect, colored side of antialiasing gradient (base infill rect shrunk by AA size) + Rect2 infill_rect_aa_colored = infill_rect_aa_transparent.grow_individual(-aa_fill_width[SIDE_LEFT], -aa_fill_width[SIDE_TOP], + -aa_fill_width[SIDE_RIGHT], -aa_fill_width[SIDE_BOTTOM]); + if (!blend_on) { + // Create center fill, not antialiased yet draw_ring(verts, indices, colors, border_style_rect, adapted_corner, - infill_inner_rect_aa, infill_inner_rect_aa, bg_color, bg_color, corner_detail, skew, true); + infill_rect_aa_colored, infill_rect_aa_colored, bg_color, bg_color, corner_detail, skew, true); } - if (!blend_on || !draw_border) { - Rect2 infill_rect_aa = infill_rect.grow_individual(aa_fill_width[SIDE_LEFT], aa_fill_width[SIDE_TOP], - aa_fill_width[SIDE_RIGHT], aa_fill_width[SIDE_BOTTOM]); - Color alpha_bg = Color(bg_color.r, bg_color.g, bg_color.b, 0); - - // Create infill fake AA gradient. - draw_ring(verts, indices, colors, style_rect, adapted_corner, - infill_rect_aa, infill_rect, bg_color, alpha_bg, corner_detail, skew); + // Add antialiasing on the center fill + draw_ring(verts, indices, colors, border_style_rect, adapted_corner, + infill_rect_aa_transparent, infill_rect_aa_colored, bg_color, alpha_bg, corner_detail, skew); } } if (draw_border) { - Rect2 infill_rect_aa = infill_rect.grow_individual(aa_border_width[SIDE_LEFT], aa_border_width[SIDE_TOP], - aa_border_width[SIDE_RIGHT], aa_border_width[SIDE_BOTTOM]); - Rect2 style_rect_aa = style_rect.grow_individual(aa_border_width[SIDE_LEFT], aa_border_width[SIDE_TOP], - aa_border_width[SIDE_RIGHT], aa_border_width[SIDE_BOTTOM]); - Rect2 border_style_rect_aa = border_style_rect.grow_individual(aa_border_width[SIDE_LEFT], aa_border_width[SIDE_TOP], - aa_border_width[SIDE_RIGHT], aa_border_width[SIDE_BOTTOM]); + // Inner border recct, fully colored side of antialiasing gradient (base inner rect enlarged by AA size) + Rect2 inner_rect_aa_colored = infill_rect.grow_individual(aa_border_width_half[SIDE_LEFT], aa_border_width_half[SIDE_TOP], + aa_border_width_half[SIDE_RIGHT], aa_border_width_half[SIDE_BOTTOM]); + // Inner border rect, transparent side of antialiasing gradient (base inner rect shrunk by AA size) + Rect2 inner_rect_aa_transparent = inner_rect_aa_colored.grow_individual(-aa_border_width[SIDE_LEFT], -aa_border_width[SIDE_TOP], + -aa_border_width[SIDE_RIGHT], -aa_border_width[SIDE_BOTTOM]); + // Outer border rect, transparent side of antialiasing gradient (base outer rect enlarged by AA size) + Rect2 outer_rect_aa_transparent = style_rect.grow_individual(aa_border_width_half[SIDE_LEFT], aa_border_width_half[SIDE_TOP], + aa_border_width_half[SIDE_RIGHT], aa_border_width_half[SIDE_BOTTOM]); + // Outer border rect, colored side of antialiasing gradient (base outer rect shrunk by AA size) + Rect2 outer_rect_aa_colored = border_style_rect.grow_individual(aa_border_width_half[SIDE_LEFT], aa_border_width_half[SIDE_TOP], + aa_border_width_half[SIDE_RIGHT], aa_border_width_half[SIDE_BOTTOM]); - // Create border. + // Create border ring, not antialiased yet draw_ring(verts, indices, colors, border_style_rect, adapted_corner, - border_style_rect_aa, ((blend_on) ? infill_rect : infill_rect_aa), border_color_inner, border_color, corner_detail, skew); - + outer_rect_aa_colored, ((blend_on) ? infill_rect : inner_rect_aa_colored), border_color_inner, border_color, corner_detail, skew); if (!blend_on) { - // Create inner border fake AA gradient. + // Add antialiasing on the ring inner border draw_ring(verts, indices, colors, border_style_rect, adapted_corner, - infill_rect_aa, infill_rect, border_color_blend, border_color, corner_detail, skew); + inner_rect_aa_colored, inner_rect_aa_transparent, border_color_blend, border_color, corner_detail, skew); } - - // Create outer border fake AA gradient. + // Add antialiasing on the ring outer border draw_ring(verts, indices, colors, border_style_rect, adapted_corner, - style_rect_aa, border_style_rect_aa, border_color, border_color_alpha, corner_detail, skew); + outer_rect_aa_transparent, outer_rect_aa_colored, border_color, border_color_alpha, corner_detail, skew); } } diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index 17acfd773e2..9d96e9a3b7f 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -163,7 +163,7 @@ class StyleBoxFlat : public StyleBox { int corner_detail = 8; int shadow_size = 0; Point2 shadow_offset; - real_t aa_size = 0.625; + real_t aa_size = 1; protected: virtual float get_style_margin(Side p_side) const override; diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 3a6d40d22cb..e46b643cd18 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -2183,11 +2183,17 @@ void VisualShader::_update_shader() const { const String temp = String(info.name); if (!info.options.is_empty()) { + if (!render_mode.is_empty()) { + render_mode += ", "; + } + // Always write out a render_mode for the enumerated modes as having no render mode is not always + // the same as the default. i.e. for depth_draw_opaque, the render mode has to be declared for it + // to work properly, no render mode is an invalid option. if (modes.has(temp) && modes[temp] < info.options.size()) { - if (!render_mode.is_empty()) { - render_mode += ", "; - } render_mode += temp + "_" + info.options[modes[temp]]; + } else { + // Use the default. + render_mode += temp + "_" + info.options[0]; } } else if (flags.has(temp)) { flag_names.push_back(temp); diff --git a/servers/debugger/servers_debugger.cpp b/servers/debugger/servers_debugger.cpp index 75452be49b1..e1bdba0595e 100644 --- a/servers/debugger/servers_debugger.cpp +++ b/servers/debugger/servers_debugger.cpp @@ -56,15 +56,17 @@ Array ServersDebugger::ResourceUsage::serialize() { bool ServersDebugger::ResourceUsage::deserialize(const Array &p_arr) { CHECK_SIZE(p_arr, 1, "ResourceUsage"); uint32_t size = p_arr[0]; - CHECK_SIZE(p_arr, size, "ResourceUsage"); - int idx = 1; - for (uint32_t i = 0; i < size / 4; i++) { + ERR_FAIL_COND_V(size % 4, false); + CHECK_SIZE(p_arr, 1 + size, "ResourceUsage"); + uint32_t idx = 1; + while (idx < 1 + size) { ResourceInfo info; info.path = p_arr[idx]; info.format = p_arr[idx + 1]; info.type = p_arr[idx + 2]; info.vram = p_arr[idx + 3]; infos.push_back(info); + idx += 4; } CHECK_END(p_arr, idx, "ResourceUsage"); return true; diff --git a/servers/physics_3d/godot_collision_solver_3d_sat.cpp b/servers/physics_3d/godot_collision_solver_3d_sat.cpp index 2cb29b3dd0c..92a4d47cd3e 100644 --- a/servers/physics_3d/godot_collision_solver_3d_sat.cpp +++ b/servers/physics_3d/godot_collision_solver_3d_sat.cpp @@ -2065,7 +2065,7 @@ static void _collision_convex_polygon_convex_polygon(const GodotShape3D *p_a, co int vertex_count_B = mesh_B.vertices.size(); // Precalculating this makes the transforms faster. - Basis a_xform_normal = p_transform_b.basis.inverse().transposed(); + Basis a_xform_normal = p_transform_a.basis.inverse().transposed(); // faces of A for (int i = 0; i < face_count_A; i++) { diff --git a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp index 91789201c6c..c7d85a3bbf2 100644 --- a/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp @@ -721,6 +721,14 @@ void RenderForwardClustered::_fill_instance_data(RenderListType p_render_list, i if (inst->store_transform_cache) { RendererRD::MaterialStorage::store_transform(inst->transform, instance_data.transform); RendererRD::MaterialStorage::store_transform(inst->prev_transform, instance_data.prev_transform); + +#ifdef REAL_T_IS_DOUBLE + // Split the origin into two components, the float approximation and the missing precision + // In the shader we will combine these back together to restore the lost precision. + RendererRD::MaterialStorage::split_double(inst->transform.origin.x, &instance_data.transform[12], &instance_data.transform[3]); + RendererRD::MaterialStorage::split_double(inst->transform.origin.y, &instance_data.transform[13], &instance_data.transform[7]); + RendererRD::MaterialStorage::split_double(inst->transform.origin.z, &instance_data.transform[14], &instance_data.transform[11]); +#endif } else { RendererRD::MaterialStorage::store_transform(Transform3D(), instance_data.transform); RendererRD::MaterialStorage::store_transform(Transform3D(), instance_data.prev_transform); @@ -735,14 +743,6 @@ void RenderForwardClustered::_fill_instance_data(RenderListType p_render_list, i instance_data.lightmap_uv_scale[2] = inst->lightmap_uv_scale.size.x; instance_data.lightmap_uv_scale[3] = inst->lightmap_uv_scale.size.y; -#ifdef REAL_T_IS_DOUBLE - // Split the origin into two components, the float approximation and the missing precision - // In the shader we will combine these back together to restore the lost precision. - RendererRD::MaterialStorage::split_double(inst->transform.origin.x, &instance_data.transform[12], &instance_data.transform[3]); - RendererRD::MaterialStorage::split_double(inst->transform.origin.y, &instance_data.transform[13], &instance_data.transform[7]); - RendererRD::MaterialStorage::split_double(inst->transform.origin.z, &instance_data.transform[14], &instance_data.transform[11]); -#endif - bool cant_repeat = instance_data.flags & INSTANCE_DATA_FLAG_MULTIMESH || inst->mesh_instance.is_valid(); if (prev_surface != nullptr && !cant_repeat && prev_surface->sort.sort_key1 == surface->sort.sort_key1 && prev_surface->sort.sort_key2 == surface->sort.sort_key2 && inst->mirror == prev_surface->owner->mirror && repeats < RenderElementInfo::MAX_REPEATS) { diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp index 6bfbc2e0a7f..b9edc46aeee 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp @@ -2060,18 +2060,18 @@ void RenderForwardMobile::_render_list_template(RenderingDevice::DrawListID p_dr if (inst->store_transform_cache) { RendererRD::MaterialStorage::store_transform(inst->transform, push_constant.transform); + +#ifdef REAL_T_IS_DOUBLE + // Split the origin into two components, the float approximation and the missing precision + // In the shader we will combine these back together to restore the lost precision. + RendererRD::MaterialStorage::split_double(inst->transform.origin.x, &push_constant.transform[12], &push_constant.transform[3]); + RendererRD::MaterialStorage::split_double(inst->transform.origin.y, &push_constant.transform[13], &push_constant.transform[7]); + RendererRD::MaterialStorage::split_double(inst->transform.origin.z, &push_constant.transform[14], &push_constant.transform[11]); +#endif } else { RendererRD::MaterialStorage::store_transform(Transform3D(), push_constant.transform); } -#ifdef REAL_T_IS_DOUBLE - // Split the origin into two components, the float approximation and the missing precision - // In the shader we will combine these back together to restore the lost precision. - RendererRD::MaterialStorage::split_double(inst->transform.origin.x, &push_constant.transform[12], &push_constant.transform[3]); - RendererRD::MaterialStorage::split_double(inst->transform.origin.y, &push_constant.transform[13], &push_constant.transform[7]); - RendererRD::MaterialStorage::split_double(inst->transform.origin.z, &push_constant.transform[14], &push_constant.transform[11]); -#endif - push_constant.flags = inst->flags_cache; push_constant.gi_offset = inst->gi_offset_cache; push_constant.layer_mask = inst->layer_mask; diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl index c8ad1f0312f..0098b13d5b5 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl @@ -360,7 +360,7 @@ void vertex_shader(in uint instance_index, in bool is_multimesh, in uint multime vertex = mat3(matrix) * vertex; model_origin = double_add_vec3(model_origin, model_precision, matrix[3].xyz, vec3(0.0), model_precision); } - vertex = mat3(model_matrix) * vertex; + vertex = mat3(inv_view_matrix * modelview) * vertex; vec3 temp_precision; // Will be ignored. vertex += double_add_vec3(model_origin, model_precision, scene_data.inv_view_matrix[3].xyz, view_precision, temp_precision); vertex = mat3(scene_data.view_matrix) * vertex; diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl index a8b28bbd4fc..80f05e71216 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl @@ -347,8 +347,6 @@ void main() { #CODE : VERTEX } - /* output */ - // using local coordinates (default) #if !defined(SKIP_TRANSFORM_USED) && !defined(VERTEX_WORLD_COORDS_USED) @@ -361,7 +359,7 @@ void main() { vertex = mat3(matrix) * vertex; model_origin = double_add_vec3(model_origin, model_precision, matrix[3].xyz, vec3(0.0), model_precision); } - vertex = mat3(model_matrix) * vertex; + vertex = mat3(inv_view_matrix * modelview) * vertex; vec3 temp_precision; vertex += double_add_vec3(model_origin, model_precision, scene_data.inv_view_matrix[3].xyz, view_precision, temp_precision); vertex = mat3(scene_data.view_matrix) * vertex; diff --git a/servers/rendering/renderer_rd/shaders/particles_copy.glsl b/servers/rendering/renderer_rd/shaders/particles_copy.glsl index afbd5a9caa2..67a894b86f9 100644 --- a/servers/rendering/renderer_rd/shaders/particles_copy.glsl +++ b/servers/rendering/renderer_rd/shaders/particles_copy.glsl @@ -206,11 +206,12 @@ void main() { // as they will be drawn with the node position as origin. txform = params.inv_emission_transform * txform; } - - txform = transpose(txform); } else { - txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); //zero scale, becomes invisible + // Set scale to zero and translate to -INF so particle will be invisible + // even for materials that ignore rotation/scale (i.e. billboards). + txform = mat4(vec4(0.0), vec4(0.0), vec4(0.0), vec4(-1.0 / 0.0, -1.0 / 0.0, -1.0 / 0.0, 0.0)); } + txform = transpose(txform); if (params.copy_mode_2d) { uint write_offset = gl_GlobalInvocationID.x * (2 + 1 + 1); //xform + color + custom diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp index 3ed5d7dda85..1f6ec75df15 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp @@ -1193,7 +1193,7 @@ void ParticlesStorage::particles_set_view_axis(RID p_particles, const Vector3 &p } copy_push_constant.order_by_lifetime = (particles->draw_order == RS::PARTICLES_DRAW_ORDER_LIFETIME || particles->draw_order == RS::PARTICLES_DRAW_ORDER_REVERSE_LIFETIME); - copy_push_constant.lifetime_split = MIN(particles->amount * particles->phase, particles->amount - 1); + copy_push_constant.lifetime_split = (MIN(int(particles->amount * particles->phase), particles->amount - 1) + 1) % particles->amount; copy_push_constant.lifetime_reverse = particles->draw_order == RS::PARTICLES_DRAW_ORDER_REVERSE_LIFETIME; copy_push_constant.frame_remainder = particles->interpolate ? particles->frame_remainder : 0.0; @@ -1511,7 +1511,7 @@ void ParticlesStorage::update_particles() { } copy_push_constant.order_by_lifetime = (particles->draw_order == RS::PARTICLES_DRAW_ORDER_LIFETIME || particles->draw_order == RS::PARTICLES_DRAW_ORDER_REVERSE_LIFETIME); - copy_push_constant.lifetime_split = MIN(particles->amount * particles->phase, particles->amount - 1); + copy_push_constant.lifetime_split = (MIN(int(particles->amount * particles->phase), particles->amount - 1) + 1) % particles->amount; copy_push_constant.lifetime_reverse = particles->draw_order == RS::PARTICLES_DRAW_ORDER_REVERSE_LIFETIME; RD::ComputeListID compute_list = RD::get_singleton()->compute_list_begin(); diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 3d0443b494d..8380558e1c0 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -140,9 +140,9 @@ RID RenderingServer::get_test_texture() { c.b = y; } - w[(y * TEST_TEXTURE_SIZE + x) * 3 + 0] = uint8_t(CLAMP(c.r * 255, 0, 255)); - w[(y * TEST_TEXTURE_SIZE + x) * 3 + 1] = uint8_t(CLAMP(c.g * 255, 0, 255)); - w[(y * TEST_TEXTURE_SIZE + x) * 3 + 2] = uint8_t(CLAMP(c.b * 255, 0, 255)); + w[(y * TEST_TEXTURE_SIZE + x) * 3 + 0] = uint8_t(CLAMP(c.r, 0, 255)); + w[(y * TEST_TEXTURE_SIZE + x) * 3 + 1] = uint8_t(CLAMP(c.g, 0, 255)); + w[(y * TEST_TEXTURE_SIZE + x) * 3 + 2] = uint8_t(CLAMP(c.b, 0, 255)); } } } diff --git a/servers/text_server.cpp b/servers/text_server.cpp index 027109b67d8..69ba3dafb25 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -546,6 +546,7 @@ void TextServer::_bind_methods() { BIND_BITFIELD_FLAG(GRAPHEME_IS_UNDERSCORE); BIND_BITFIELD_FLAG(GRAPHEME_IS_CONNECTED); BIND_BITFIELD_FLAG(GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL); + BIND_BITFIELD_FLAG(GRAPHEME_IS_EMBEDDED_OBJECT); /* Hinting */ BIND_ENUM_CONSTANT(HINTING_NONE); @@ -1448,7 +1449,7 @@ void TextServer::shaped_text_draw(const RID &p_shaped, const RID &p_canvas, cons if (glyphs[i].font_rid != RID()) { font_draw_glyph(glyphs[i].font_rid, p_canvas, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, p_color); - } else if (hex_codes && ((glyphs[i].flags & GRAPHEME_IS_VIRTUAL) != GRAPHEME_IS_VIRTUAL)) { + } else if (hex_codes && ((glyphs[i].flags & GRAPHEME_IS_VIRTUAL) != GRAPHEME_IS_VIRTUAL) && ((glyphs[i].flags & GRAPHEME_IS_EMBEDDED_OBJECT) != GRAPHEME_IS_EMBEDDED_OBJECT)) { TextServer::draw_hex_code_box(p_canvas, glyphs[i].font_size, ofs + Vector2(glyphs[i].x_off, glyphs[i].y_off), glyphs[i].index, p_color); } if (orientation == ORIENTATION_HORIZONTAL) { diff --git a/servers/text_server.h b/servers/text_server.h index 2c6a8af6825..7490a48b519 100644 --- a/servers/text_server.h +++ b/servers/text_server.h @@ -125,18 +125,19 @@ public: }; enum GraphemeFlag { - GRAPHEME_IS_VALID = 1 << 0, // Glyph is valid. - GRAPHEME_IS_RTL = 1 << 1, // Glyph is right-to-left. - GRAPHEME_IS_VIRTUAL = 1 << 2, // Glyph is not part of source string (added by fit_to_width function, do not affect caret movement). + GRAPHEME_IS_VALID = 1 << 0, // Grapheme is valid. + GRAPHEME_IS_RTL = 1 << 1, // Grapheme is right-to-left. + GRAPHEME_IS_VIRTUAL = 1 << 2, // Grapheme is not part of source string (added by fit_to_width function, do not affect caret movement). GRAPHEME_IS_SPACE = 1 << 3, // Is whitespace (for justification and word breaks). GRAPHEME_IS_BREAK_HARD = 1 << 4, // Is line break (mandatory break, e.g. "\n"). GRAPHEME_IS_BREAK_SOFT = 1 << 5, // Is line break (optional break, e.g. space). GRAPHEME_IS_TAB = 1 << 6, // Is tab or vertical tab. - GRAPHEME_IS_ELONGATION = 1 << 7, // Elongation (e.g. kashida), glyph can be duplicated or truncated to fit line to width. + GRAPHEME_IS_ELONGATION = 1 << 7, // Elongation (e.g. kashida), grapheme can be duplicated or truncated to fit line to width. GRAPHEME_IS_PUNCTUATION = 1 << 8, // Punctuation, except underscore (can be used as word break, but not line break or justifiction). GRAPHEME_IS_UNDERSCORE = 1 << 9, // Underscore (can be used as word break). GRAPHEME_IS_CONNECTED = 1 << 10, // Connected to previous grapheme. GRAPHEME_IS_SAFE_TO_INSERT_TATWEEL = 1 << 11, // It is safe to insert a U+0640 before this grapheme for elongation. + GRAPHEME_IS_EMBEDDED_OBJECT = 1 << 12, // Grapheme is an object replacement character for the embedded object. }; enum Hinting {