1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00
Commit Graph

303 Commits

Author SHA1 Message Date
Thaddeus Crews
6a3d1f1fa1 Merge pull request #57121 from KoBeWi/noddeganger
Add `DUPLICATE_INTERNAL_STATE` flag
2025-11-13 17:42:47 -06:00
Thaddeus Crews
72925d756f Merge pull request #112076 from kevinlam508/custom-node-reference-duplication
Fix duplicating node references of custom node type properties
2025-11-11 16:07:53 -06:00
Kevin Lam
b9cc82df40 Fix duplicating node references of custom node type properties
Script assignment must be complete for the subtree in order to correctly assign into properties set to a script type.
2025-10-27 16:00:45 -05:00
Mike Precup
abfc63b483 Speed up signal disconnects in the editor 2025-10-22 22:27:25 -07:00
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
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
abbe792575 Merge pull request #111067 from HolonProduction/rm-multiplayer
Remove unused `multiplayer` member from `Node`
2025-10-01 17:54:20 -05: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
HolonProduction
a9673e2bfc Remove unused multiplayer member from Node 2025-09-30 14:02:00 +02: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
Lukas Tenbrink
96619d46a1 Use AncestralClass to speed up Object::cast_to when possible. 2025-09-22 13:21:51 +02:00
Mounir Tohami
3335708ce0 Refine children cache invalidation to skip more special cases. 2025-09-18 18:28:59 +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
kobewi
25f0e0ac91 Add DUPLICATE_INTERNAL_STATE flag 2025-07-12 22:18:59 +02:00
kobewi
11adf408ab Add is_instance() helper method to Node 2025-07-08 20:42:52 +02:00
lawnjelly
583c72f999 FTI - Change SceneTree global setting to static
Also fixup FTI configuration warnings so that they only output when the project is using FTI.
2025-06-23 10:19:24 +01: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
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
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
Fabio Alessandrelli
b73ec1fa9b Expose get_rpc_config and get_node_rpc_config 2025-05-27 00:43:21 +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
lawnjelly
c7764ef26b FTI - Optimize SceneTree traversal 2025-05-24 17:38:33 +01:00
lawnjelly
cbd6c8d561 SceneTreeFTI faster access to Node children 2025-05-21 17:19:10 +01:00
Aaron Franke
a404b668a1 Change Node set_name to use StringName 2025-05-01 15:15:19 -07: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
Juan
2f39d8ebef Add thread safety to Object signals
* It turns out the majority of this work was done already by AThousandShips as part of #89451. This allows to do lock-less emitting of signals.
* This means, that only the signal map needs to be protected, making the task simple and without risk of deadlocks, or affecting performance.
* Objects can choose to not protect signals for performance (as example Node uses thread guards for protection, so these signals are not thread safe).
2025-04-16 17:14:44 +02:00
Thaddeus Crews
0d267e7b1e Core: Add dedicated BitField template 2025-04-11 11:53:26 -05:00
Priahoud
bf963e767e Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words
- refactored String::to_snake_case to work with the refactored String::_separate_compound_words
- created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion
- created String::to_kebab_case using the new String::_separate_compound_words
- created corresponding Documentation in String and StringName
- simplified both switch statements in EditorNode and ProjectDialog
- added new kebab-casing Option for Node Names in ProjectSettings
- added missing camelCase Options to Scene- and Node-Names in ProjectSettings
- simplified Mono RuntimeInterop Functions
- hooked up the ConnectionsDialog
- created additional Unit Tests
2025-04-10 21:22:21 +02:00
Pāvels Nadtočajevs
b106dfd4f9 Base accessibility API. 2025-04-08 20:14:28 +03:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
kobewi
92ab92114e Don't duplicate internal nodes 2025-03-07 16:08:53 +01:00
Yufeng Ying
73d85f46c9 Remove unused headers in scene.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
Hilderin
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
HP van Braam
6f7525c396 Improve Scene Tree editor performance
We now cache the Node*<>TreeItem* mapping in the SceneTreeEditor. This
allows us to make targeted updates to the Tree used to display the scene
tree in the editor.

Previously on almost all changes to the scene tree the editor would
rebuild the entire widget, causing a large number of deallocations an
allocations. We now carefully manipulate the Tree widget in-situ saving
a large number of these allocations.

In order to know what Nodes need to be updated we add a
editor_state_changed signal to Node, this is a TOOLS_ENABLED,
editor-only signal fired when changes to Node happen that are relevant
to editor state.

We also now make sure that when nodes are moved/renamed we don't check
expensive properties that cannot contain NodePaths. This saves a lot of
time when SceneTreeDock renames a node in a scene with a lot of
MeshInstances. This makes renaming nodes go from ~27 seconds to ~2
seconds on large scenes.

SceneTreeEditor instances will now also not do all of the potentially
expensive update work if they are invisible. This behavior is turned off
by default so it won't affect existing users. This change allows the
editor to only update SceneTreeEditors that actually in view. In
practice this means that for most changes instead of updating 6
SceneTreeEditors we only update 1 instantly, and the others only when
they become visible.

There is definitely more that could be done, but this is already a
massive improvement. In complex scenes we see an improvement of 10x,
things that used to take ~30 seconds now only take 2.

This fixes #83460

I want to thank KoBeWi, TokisanGames, a-johnston, aniel080400 for
their tireless testing. And AeioMuch for their testing and providing a
fix for the hover issue.
2024-12-12 22:47:05 +01:00
Michael Alexsander
16524a8a01 Add "Game" editor for better runtime debugging 2024-10-30 11:42:17 -03:00
Haoyu Qiu
210810bacb Fix atr_n() behavior when auto translation is disabled 2024-09-29 22:59:33 +08:00
A Thousand Ships
203d3be200 [Core] Add way to check if a signal has any connections
Added to `Object` and `Signal`
2024-09-20 16:39:09 +02:00
Haoyu Qiu
c5d147b9b5 Allow configuring which translation domain Object.tr uses 2024-09-17 13:09:44 +08:00
Rémi Verschelde
8ebfd89359 Merge pull request #96024 from Ryan-000/expose_get_rpc_config
Expose `get_rpc_config` and `get_node_rpc_config`
2024-09-16 13:34:34 +02:00
Ryan
8835f326b1 Expose get_rpc_config and get_node_rpc_config
add documentation

Update doc/classes/Node.xml

change name of get_node_rpc_config to get_rpc_config

Co-Authored-By: moondog <159832633+dog-on-moon@users.noreply.github.com>
Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
2024-09-04 15:45:22 -04:00
Rémi Verschelde
e98aaf1caa Merge pull request #94477 from RedMser/typos-batch-1
Fix various typos
2024-08-28 00:12:12 +02:00