1
0
Fork 0
Commit Graph

621 Commits

Author SHA1 Message Date
Thaddeus Crews 60710df3b6
Merge pull request #94047 from KoBeWi/resource_printer
Improve `to_string()` and add it to Resource
2025-10-16 12:48:11 -05:00
Lukas Tenbrink 1e0b41ab27 Remove `display_server.h` transitive include from `node.h`. 2025-10-14 00:43:02 +02:00
Thaddeus Crews 31f9ed087e
Merge pull request #110650 from WhalesState/node-cache-less-dirty
Optimize children cache updates and refine special-case handling
2025-10-13 12:30:14 -05:00
kobewi e6783dbdd1 Improve to_string() and add it to Resource 2025-10-09 00:54:38 +02:00
Lukas Tenbrink 33689d7beb Remove transitive `mesh.h`, `rendering_server.h` and `shader.h` includes from `node.h`. 2025-10-08 12:16:52 +02:00
Juan faddd60c40
Add unique Node IDs to support base and instantiated scene refactorings
The main goal of this PR is to safeguard when a base or instantiated scene changes (nodes renamed, moved or readded),
that the hierarchy is still maintained and the node and its overridden properties can be preserved.

What it does:
* Implements unique node IDs.
* These IDs act as a fallback to names when saving.
* The IDs are **USED AS A FALLBACK**, so they are just an addition. It should not break any current existing scene.
* If a scene renames or moves a node, inherited or instantiated scenes will no longer lose reference to it.

Unlike the previous approach, this one is intended to be a fallback, only used if the node is not found.
This makes it safer to implement and ensure that, at worst case, we fail to find the node, but nothing breaks.
2025-10-06 12:55:38 +02:00
Thaddeus Crews f6aa5ba23c
Merge pull request #97210 from AleksLitynski/object-snapshot-debugger
Add an ObjectDB Profiling Tool
2025-10-03 12:01:11 -05:00
Thaddeus Crews 7bdec67718
Merge pull request #111126 from HolonProduction/gotta-get-path
Optimize initial `Node::get_path` call by avoiding `Vector::reverse`
2025-10-02 15:12:01 -05:00
HolonProduction b50ce590b4 Optimize initial `Node::get_path` call by avoiding `Vector::reverse` 2025-10-01 22:56:53 +02:00
Thaddeus Crews 09609c1320
Merge pull request #111043 from HolonProduction/rm-import-path
Remove unused `import_path` member from `Node`
2025-09-30 20:10:44 -05:00
Thaddeus Crews e5bf31b170
Merge pull request #107369 from Ivorforce/node-iter-children
Core: Add `Node::iterate_children` as a fast way to iterate a node's children
2025-09-30 18:35:21 -05:00
Ryan 6ebef31b3c Make Node::orphan_node_count thread-safe 2025-09-29 17:54:41 -04:00
HolonProduction 743e0edfd7 Remove unused `import_path` member from `Node` 2025-09-29 21:40:01 +02:00
Thaddeus Crews 685c7e92e5
Merge pull request #100437 from KoBeWi/ruaninstancequestionmark
Add `is_instance()` helper method to Node
2025-09-23 12:08:48 -05:00
Thaddeus Crews 89c51cb183
Merge pull request #110571 from WhalesState/get-children
Improve `Node::get_children` performance.
2025-09-22 13:28:46 -05:00
Thaddeus Crews 149a4b4ca1
Merge pull request #107868 from lawnjelly/quick_ancestry4
Provide quick access to `Object` ancestry
2025-09-20 13:41:39 -05:00
Mounir Tohami 3335708ce0 Refine children cache invalidation to skip more special cases. 2025-09-18 18:28:59 +03:00
Mounir Tohami 7dc6df3051 Optimize `Node::get_children`.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-09-17 13:31:23 +03:00
Pāvels Nadtočajevs 7b47f5e8db
[Accessibility] Process non-focusable windows (popups, menus) as part of the parent window tree. 2025-08-17 12:15:08 +03:00
Adam Simpkins 254fa6c642 fix releasing the old unique name when renaming a Node
This fixes `Node::set_name()` to release the old unique name before
performing the rename.  #76560 changed the code to update `data.name`
before calling `_release_unique_name_in_owner()`, causing to incorrectly
try releasing the new name instead of the old name.

Fixes #108683
2025-07-16 14:21:50 -07:00
kobewi 11adf408ab Add is_instance() helper method to Node 2025-07-08 20:42:52 +02:00
Aleksander Litynski 78f1543e35 Add an ObjectDB Profiling Tool
A new tab is added to the debugger that can help profile a game's memory usage.

Specifically, this lets you save a snapshot of all the objects in a running
game's ObjectDB to disk. It then lets you view the snapshot and diff two
snapshots against each other. This is meant to work similarly to Chrome's
heap snapshot tool or Unity's memory profiler.
2025-07-08 16:39:24 +02:00
lawnjelly 2d3dedb12d FTI - Add reset on setting `top_level` 2025-06-29 17:01:51 +01:00
lawnjelly 14a814586a Provide quick access to `Object` ancestry 2025-06-23 07:11:11 +01:00
Dimitri Sukhankin 6e650163da Add a proper error message when trying to add node to a group with an empty name 2025-06-21 13:58:31 +04:00
Lukas Tenbrink 175c38d0dc Core: Add `Node::iterate_children` as a fast way to iterate a node's children, without needing allocations or `get_child`.
Adds `Iterable` class to templates.
2025-06-13 17:01:51 +02:00
Lukas Tenbrink e2931a5c19 Make conversions from `NodePath` to `String` explicit. 2025-06-11 16:50:27 +02:00
Haoyu Qiu 4e20e33e21 Expose `Node.can_auto_translate()` 2025-06-11 11:26:43 +08:00
Thaddeus Crews 6427343ec8
Merge pull request #106660 from bruvzg/ac_node_to_ctl
Move some accessibility properties from Node to Control
2025-06-09 12:31:32 -05:00
Pāvels Nadtočajevs 40665addbc
Bitpack node auto translation values. 2025-06-09 00:03:53 +03:00
Pāvels Nadtočajevs aff5b413aa
Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +03:00
Thaddeus Crews b0f3c3fa22
Merge pull request #106966 from bruvzg/ac_trans_simpl
[Accessibility] Always auto-translation mode for names/descriptions.
2025-06-02 18:51:49 -05:00
Pāvels Nadtočajevs 3198b7bea2
[Accessibility] Always auto-translation mode for names/descriptions. 2025-05-30 17:55:27 +03:00
kobewi 34152b3f39 Remove redundant data.inside_tree 2025-05-28 15:27:59 +02:00
Thaddeus Crews 91b3a26438
Merge pull request #106848 from Faless/mp/rpc_config_revert
Expose `get_rpc_config` and `get_node_rpc_config`
2025-05-27 09:39:32 -05:00
Thaddeus Crews 63dff62948
Merge pull request #100673 from RandomShaper/res_duplicate
Overhaul resource duplication
2025-05-27 09:39:25 -05:00
Haoyu Qiu 8d93b6a54c Add translation preview in editor 2025-05-27 07:59:28 +08:00
Fabio Alessandrelli b73ec1fa9b Expose get_rpc_config and get_node_rpc_config 2025-05-27 00:43:21 +02:00
Thaddeus Crews f3f76df0cd
Merge pull request #103504 from lawnjelly/fti_warn_physics_non_interp4
Physics Interpolation - Add editor configuration warnings
2025-05-26 11:24:39 -05: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
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
Rémi Verschelde c4c28f8f62
Merge pull request #106281 from KoBeWi/false
Fix wrong children range when duplicating node
2025-05-13 01:05:23 +02:00
kobewi 258062e312 Fix wrong children range when duplicating node 2025-05-12 20:21:40 +02:00
lawnjelly 795ed8fd12 Faster `Node::get_child_count()`
There is no need to update the children cache when including internal nodes in the count.
2025-05-10 11:35:59 +01:00
Aaron Franke a404b668a1
Change Node set_name to use StringName 2025-05-01 15:15:19 -07:00
Thaddeus Crews 70ff5770c9
Merge pull request #83757 from HauntedBees/master
Add `Node.get_orphan_node_ids`, edit `Node.print_orphan_nodes`
2025-04-29 11:24:08 -05:00
Haunted Bees 0ccdcb4a16 added list_orphan_nodes, edited print_orphan_nodes
print_orphan_nodes now prints the script file attached to the node.
list_orphan_nodes was created to return the same data as print_orphan_nodes in a dictionary format for users who wish to process this data differently than the print_orphan_nodes behavior.
2025-04-28 20:33:01 -07:00
Thaddeus Crews b7d4426fff
Merge pull request #104269 from lawnjelly/fti_scene_tree4
Physics Interpolation - Move 3D FTI to `SceneTree`
2025-04-28 10:01:34 -05:00
lawnjelly ae04a3a5dd Physics Interpolation - Move 3D FTI to `SceneTree`
Moves 3D interpolation from server to the client code (`SceneTree`).
Complete rework of 3D physics interpolation, but using the same user API.
2025-04-26 14:13:30 +01:00
lawnjelly 40c05c69f9 Physics Interpolation - Add editor configuration warnings
* For physics bodies that are on non-interpolated branches
2025-04-20 10:03:04 +01:00