1
0
Fork 0
Commit Graph

77006 Commits

Author SHA1 Message Date
Thaddeus Crews 712d213b2c
Merge pull request #106754 from YYF233333/opt_errarray
Simplify implementation of `errarray`
2025-05-26 11:24:19 -05:00
Lukas Tenbrink 621a8d14fa Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`. 2025-05-26 17:41:15 +02:00
Pedro J. Estébanez 6841b45552 Add tests for resource duplication 2025-05-26 17:05:04 +02:00
Fabio Alessandrelli c28d5d0058 Revert "Expose get_rpc_config and get_node_rpc_config"
This reverts commit 8835f326b1.
2025-05-26 15:57:38 +02:00
Rémi Verschelde 514e80bcc1
D3D12: Fix inconsistent value for `DCOMP_ENABLED` in platform code 2025-05-26 15:16:19 +02:00
kobewi ad9b66100e Remember state of built-in script/shader checkbox 2025-05-26 15:00:11 +02:00
Pedro J. Estébanez 342266cfd9 Overhaul `Variant::duplicate()` for resources
This in the scope of a duplication triggered via any type in the `Variant` realm. that is, the following: `Variant` itself, `Array` and `Dictionary`. That includes invoking `duplicate()` from scripts.

A `duplicate_deep(deep_subresources_mode)` method is added to `Variant`, `Array` and `Dictionary` (for compatibility reasons, simply adding an extra parameter was not possible). The default value for it is `RESOURCE_DEEP_DUPLICATE_NONE`, which is like calling `duplicate(true)`.

Remarks:
- The results of copying resources via those `Variant` types are exactly the same as if the copy were initiated from the `Resource` type at C++.
- In order to keep some separation between `Variant` and the higher-level animal which is `Resource`, `Variant` still contains the original code for that, so it's self-sufficient unless there's a `Resource` involved. Once the deep copy finds a `Resource` that has to be copied according to the duplication parameters, the algorithm invokes the `Resource` duplication machinery. When the stack is unwind back to a nesting level `Variant` can handle, `Variant` duplication logic keeps functioning.

While that is good from a responsibility separation standpoint, that would have a caveat: `Variant` would not be aware of the mapping between original and duplicate subresources and so wouldn't be able to keep preventing multiple duplicates.

To avoid that, this commit also introduces a wormwhole, a sharing mechanism by which `Variant` and `Resource` can collaborate in managing the lifetime of the original-to-duplicates map. The user-visible benefit is that the overduplicate prevention works as broadly as the whole `Variant` entity being copied, including all nesting levels, regardless how disconnected the data members containing resources may be across al the nesting levels. In other words, despite the aforementioned division of duties between `Variant` and `Resource` duplication logic, the duplicates map is shared among them. It's created when first finding a `Resource` and, however how deep the copy was working at that point, the map kept alive unitl the stack is unwind to the root user call, until the first step of the recursion.

Thanks to that common map of duplicates, this commit is able to fix the issue that `Resource::duplicate_for_local_scene()` used to ignore overridden duplicate logic.
2025-05-26 10:06:40 +02:00
Pedro J. Estébanez 2a03b459b9 Overhaul `Resource::duplicate()`
Thanks to a refactor, `Resource::duplicate_for_local_scene()` and `Resource::duplicate()` are now both users of the same, parametrized, implementation.

`Resource::duplicate()` now honors deepness in a more consistent and predictable fashion. `Resource::duplicate_deep()` is added (instead of just adding a parameter to the former, for compatibility needs).

The behavior after this change is as follows:
  - Deep (`deep=true`, formerly `subresources=true`):
    - Previously, only resources found as direct property values of the one to copy would be, recursively, duplicated.
    - Now, in addition, arrays and dictionaries are walked so the copy is truly deep, and only local subresources found across are copied.
    - Previously, subresources would be duplicated as many times as being referenced throughout the main resource.
    - Now, each subresource is only duplicated once and from that point, a referenced to that single copy is used. That's the enhanced behavior that `duplicate_for_local_scene()` already featured.
    - The behavior with respect to packed arrays is still duplication.
    - Formerly, arrays and dictionaries were recursive duplicated, with resources ignored.
    - Now, arrays and dictionaries are recursive duplicated, with resources duplicated.
    - When doing it through `duplicate_deep()`, there's a` deep_subresources_mode` parameter, with various possibilites to control if no resources are duplicated (so arrays, etc. are, but keeping referencing the originals), if only the internal ones are (resources with no non-local path, the default), or if all of them are. The default is to copy every subresource, just like `duplicate(true)`.
  - Not deep (`deep=false`, formerly `subresources=false`): <a name="resource-shallow"></a>
    - Previously, the first level of resources found as direct property values would be duplicated unconditionally. Packed arrays, arrays and dictionaries were non-recursively duplicated.
    - Now, no subresource found at any level in any form will be duplicated, but the original reference kept instead. Packed arrays, arrays and dictionaries are referenced, not duplicated at all.
    - Now, resources found as values of always-duplicate properties are duplicated, recursively or not matching what was requested for the root call.

This commit also changes what's the virtual method to override to customize the duplication (now it's the protected `_duplicate()` instead of the public `duplicate()`).
2025-05-26 10:05:25 +02:00
Haoyu Qiu b2d47352d0 Fix MenuBar min size not updating after child rename 2025-05-26 14:37:30 +08:00
Bastiaan Olij 16659e37c1 OpenXR Futures: Add return value support 2025-05-26 14:54:25 +10:00
Pāvels Nadtočajevs 1d33693e0d
Add missing `TRANSLATION_CHANGED` notifications. 2025-05-26 07:52:07 +03:00
Anish Mishra 08f13a030d Android Editor: Disable `nomedia` file creation for Android 11 (api level 30)
Fixes https://github.com/godotengine/godot/issues/106479
Fixes https://github.com/godotengine/godot/issues/105399
2025-05-26 05:49:25 +05:30
Aaron Franke 528a0a551b
GLTF: Don't export AnimationPlayer nodes as glTF nodes 2025-05-25 12:30:51 -07:00
Anish Mishra e084e479bf
Fix Android editor UI 2025-05-25 22:59:41 +05:30
Anish Mishra a89f083ffa Fix `OS.get_version()` on Android. 2025-05-25 21:17:07 +05:30
LuoZhihao fc8328d5f1 C#: Expose byte array compress and decompress 2025-05-25 23:42:23 +08:00
Patrick Gelvin 6842a5861b Workaround X11 crash issue 2025-05-25 08:07:24 -07:00
Rémi Verschelde b323212e0e
TileSet: Prevent crash in conversion of invalid tiles from Godot 3.x
Fixes #80898.
2025-05-25 15:20:56 +02:00
Rémi Verschelde d0f99ec3d3
TileSet: Fix potential crash updating stale atlas source editor toolbar 2025-05-25 14:06:57 +02:00
Alfonso Grimaldo e1e1933244
fix missing ibl reconstruction from dfg multiscattering 2025-05-24 20:10:02 -06:00
kobewi 9c37ca5383 Expose helper methods for converting UIDs 2025-05-25 00:26:16 +02:00
Pāvels Nadtočajevs f92fd74268
Do not activate accessibility when screen reader detection failed. 2025-05-25 00:17:23 +03:00
Max Shawabkeh d042763750 Fix shader compiler crash when parsing case labels with non-existent vars. 2025-05-24 13:19:35 -07:00
Bernat Arlandis 78a66b4c16 Theora: Fix UV channel offset when cropping region 2025-05-24 20:00:41 +02:00
lawnjelly c7764ef26b FTI - Optimize `SceneTree` traversal 2025-05-24 17:38:33 +01:00
Jorge Korgut Junior f165ee211b Fix Ignore External Changes Bug
Fix Issue #106410 : Add a new list `disk_changed_scenes()` and a boolean `disk_changed_project` to keep track of modfied scenes and the project. Save them only if they are in the list or the boolean value is true, when ignoring external changes.
2025-05-24 14:44:53 +02:00
nobbele acc8fbee34 project_manager: Display last edited time using local timezone instead of UTC 2025-05-24 13:51:30 +02:00
Lazy-Rabbit-2001 3a7e45c0e7 Reintroduce the dragging method of Sprite2D's region_rect 2025-05-24 19:41:05 +08:00
Ryan e3db0d62a8 Allow running EditorScripts from the FileSystemDock
Apply suggestions from code review

Co-Authored-By: Tomasz Chabora <kobewi4e@gmail.com>
2025-05-24 00:04:07 -04:00
David Nikdel 33c83a3257 Fix for directory duplication
This change makes it so if you duplicate a folder, the asset references between resources in that folder will point to the new duplicated files.

For instance, if you had dir-a/foo.tscn and dir-a/foo.png where your scene references the png. Previously duplicate would copy both of them to dir-b but dir-b/foo.tscn would still be referencing dir-a/foo.png!
2025-05-23 21:18:30 -05:00
Joel Kuntz 2cf64cc971 Make FindInFiles globally accessible
- Make ScriptEditor expose open_find_in_files_dialog to allow opening from anywhere
- Add FindInFiles to EditorNode as a keyboard shortcut, command, and menu option
- Change all find_in_files commands to be editor/find_in_files
2025-05-23 19:19:16 -03:00
Stuart Carnie fbe560a97c Metal: Disable MetalFX Temporal for `mobile` rendering method
It isn't supported, as `mobile` can't provide motion vectors. We can
revisit once it is supported via #100283.
2025-05-24 06:48:05 +10:00
uno1982 d79258c2e7 Fix: Windows OS.get_unique_id() null termination issue
use ascii for encoding-neutral
check buffer size as well
2025-05-23 15:05:41 -05:00
Pāvels Nadtočajevs d609cf62a0
Implement `get_filesystem_type` on macOS and Linux. 2025-05-23 23:05:06 +03:00
chansoen cf7e88f6ac Fix `option_button.cpp` not updating selected when out of bounds 2025-05-23 13:00:31 -07:00
Mikael Hermansson 92da11f69c Change `JoltShapeInstance3D` to use move semantics 2025-05-23 21:39:55 +02:00
PiCode fe3aaa2ae3 Add functions to apply impulse and force to SoftBody on GodotPhysics and JoltPhysics 2025-05-23 22:04:52 +03:00
Pāvels Nadtočajevs 0aae67b6bb
Add hardcoded baseline offset for Apple Color Emoji. 2025-05-23 22:00:39 +03:00
aaronp64 ba68e2a1e8 Update time.cpp year/unix time conversions to be constant time
Added functions to convert between year and day from unix timestamps in constant time, to avoid having to iterate one year at a time.
2025-05-23 14:02:14 -04:00
kojurohan42 12ad9ed4e0 Add support for exporting to Google Play Instant 2025-05-23 22:00:14 +05:45
Yufeng Ying 8773f95e40 Optimize and simplify sarray. 2025-05-23 23:47:57 +08:00
Travis Lange a350e01dc7 Fix ios and android plugin always invalid due to null ConfigFile 2025-05-23 11:41:13 -04:00
Yufeng Ying 3545e945f6 Simplify implementation of errarray. 2025-05-23 23:14:59 +08:00
Thaddeus Crews 45fc515ae3
Merge pull request #106749 from KoBeWi/hard-coding_is_bad_for_your_health
Don't hard-code test path when deleting test data
2025-05-23 09:46:16 -05:00
Thaddeus Crews 7bc33bda64
Merge pull request #106748 from BlueCube3310/mobile-lightmaps
Mobile: Move `_setup_lightmaps` before `_fill_render_list`
2025-05-23 09:46:16 -05:00
Thaddeus Crews fa967cb4ae
Merge pull request #104436 from Arnklit/bezier-box-scaling-cursor-improvement
Add correct cursors when scaling bezier keys with box scaling
2025-05-23 09:46:15 -05:00
Thaddeus Crews 42abcff772
Merge pull request #106740 from zeux/meshopt-bump
Update meshoptimizer to v0.23
2025-05-23 09:46:14 -05:00
Thaddeus Crews a9b09fc305
Merge pull request #106739 from timothyqiu/particles-selection
Fix heap-use-after-free when closing a scene with 2D particle nodes selected
2025-05-23 09:46:13 -05:00
Thaddeus Crews 274ed34ac4
Merge pull request #93836 from aaronfranke/capsule-mid-height
Add mid height property to CapsuleShape2D/3D
2025-05-23 09:46:13 -05:00
Thaddeus Crews cc452f9019
Merge pull request #104490 from arkology/The-Return-of-the-QuickOpen-Button
`EditorResourcePicker`: Add `Quick Load` button
2025-05-23 09:46:12 -05:00