Mikael Hermansson
3528e83ff3
Various fixes and style nitpicks
2025-07-09 14:27:48 +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
Rindbee
5e2396e001
Add a flag to make the connection automatically emit the source object.
...
Mainly used to improve the connection dialog.
Not implemented in `emit_signalp()`, append the source object when a PackScene is instantiated.
2025-05-27 20:19:03 +08:00
Lukas Tenbrink
e57427900f
Use BinaryMutex instead of Mutex for StringName.
2025-04-28 17:13:26 +02:00
Quentin Quaadgras
23ffdd79e8
fix gdextension Object/Node::to_string to check is_valid before returning the result
...
at best, this results in an empty string, at worst, the result is never
initialised when is_valid is false.
2025-04-19 10:45:12 +12: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
36991aba34
Merge pull request #104264 from YYF233333/layout/gdvirtual
...
Optimize gdvirtual function layout
2025-04-08 12:32:51 -05:00
Lukas Tenbrink
e7f087b91a
Fix caching of objects' class name pointer in Object instances.
...
Use `get_class_name` for `get_class` calls. Merge `get_parent_class_static` into `get_class_static`.
2025-04-07 21:05:21 +02:00
Thaddeus Crews
78922d756a
Core: Decouple GDCLASS from ClassDB
2025-04-04 16:21:30 -05:00
Yufeng Ying
057858a0fb
Optimize gdvirtual layout.
...
Co-authored-by: David Snopek <dsnopek@gmail.com >
2025-04-04 22:54:42 +08:00
Thaddeus Crews
d0b3e0b474
Merge pull request #104921 from Ivorforce/no-get-valid-parents
...
Remove unused `get_valid_parents_static` functions from `GDCLASS`.
2025-04-03 09:27:54 -05:00
Lukas Tenbrink
be82731f99
Removed unused get_valid_parents_static functions from GDCLASS.
2025-04-02 13:50:47 +02:00
Yufeng Ying
4f4031a675
Replace size() == 0 with is_empty().
2025-04-02 19:18:43 +08:00
Lukas Tenbrink
8a76e31547
Remove bool from Object::notification virtual function; replace with separate functions to avoid branching.
2025-04-01 15:26:32 +02:00
Yyf2333
22b5ec17fb
Using iterator pattern instead of List::Element *.
...
Co-authored-by: Adam Scott <ascott.ca@gmail.com >
2025-03-28 13:29:15 +08:00
Thaddeus Crews
b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
...
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Yufeng Ying
bebe037abf
Add ConstIterator to Dictionary.
2025-03-13 01:28:46 +08:00
A Thousand Ships
d9721954e6
[Core] Use Vector for MethodInfo::arguments
2025-03-10 13:57:53 +01:00
kobewi
c6c1a49bea
Don't edit objects when loading folding
2025-03-06 15:04:00 +01:00
David Snopek
696285f23a
Use MethodInfo::get_compatibility_hash() to generate the hash for MethodBind::get_hash() and other GDExtension hash clean up
2025-01-11 15:57:42 -06:00
Rémi Verschelde
6a8ca81789
Merge pull request #100674 from dsnopek/gdextension-virtual-method-compat
...
GDExtension: Add compatibility system for virtual methods
2025-01-11 22:29:38 +01:00
David Snopek
39f16e70f8
GDExtension: Add compatibility system for virtual methods
2025-01-10 16:00:05 -06:00
Adam Scott
6db599232e
Fix Script metadata usage
2025-01-03 11:12:37 -05:00
Thaddeus Crews
3c304ab7cc
Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
...
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Yufeng Ying
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
A Thousand Ships
ec650a2f09
[Core,Drivers] Improve use of Ref.is_null/valid
...
Use `is_null` over `!is_valid` and vice versa.
2024-11-01 16:50:11 +01:00
A Thousand Ships
38f9769bc6
[Core] Improve error messages with vformat
2024-10-30 15:55:51 +01: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
818acb4290
Make editor use translation domains
...
How editor plugins use this feature:
1. Pick a unique translation domain name.
2. `_enter_tree()`: load translations into that translation domain.
3. Call `set_translation_domain()` for its root UI node.
4. `_exit_tree()`: remove that translation domain.
Plugins can also set the translation domain to `godot.editor` for
nested nodes that should use editor translations. `EditorFileDialog`
automatically does this.
2024-09-17 13:09:44 +08:00
Haoyu Qiu
c5d147b9b5
Allow configuring which translation domain Object.tr uses
2024-09-17 13:09:44 +08:00
Rémi Verschelde
f7daa0fb2f
Merge pull request #96856 from RandomShaper/selfdestruct_correctness
...
Object: Let debug lock handle callee destruction within call chain gracefully
2024-09-16 13:35:06 +02:00
Pedro J. Estébanez
10e2318bde
Object: Let debug lock handle callee destruction within call chain gracefully
...
Co-authored-by: lawnjelly <lawnjelly@gmail.com >
2024-09-12 08:51:24 +02:00
rune-scape
0dde931bc9
StringName: Fix empty hash
...
+Fixed compat hashes
2024-09-09 13:30:02 -07:00
Rémi Verschelde
58b3481eaf
Merge pull request #89649 from dalexeev/core-bind-and-doc-iter-virtual-methods
...
Core: Bind and document iterator API virtual methods
2024-09-06 11:10:58 +02:00
Rémi Verschelde
13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
...
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
Danil Alexeev
49bcdf78a7
Core: Сheck r_error after calling callp()
2024-08-30 21:09:30 +03:00
Rémi Verschelde
a5830f6eb9
Merge pull request #96317 from Chaosus/objectdb_write_path_instead_of_name_at_cleanup
...
Write path instead of name at verbose output of leaked instances
2024-08-30 11:43:13 +02:00
Rémi Verschelde
909629d9f9
Merge pull request #96166 from AThousandShips/more_lock_raii
...
Use `MutexLock` in more places
2024-08-30 09:59:19 +02:00
Chaosus
75055a8278
Write path instead of name at verbose output of leaked instances
2024-08-30 10:58:50 +03:00
rune-scape
154049ce17
StringName Dictionary keys
...
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
demolke
c409e6d722
Import/export GLTF extras to node->meta
...
This is useful for custom tagging of objects with properties (for example in Blender) and having this available in the editor for scripting.
- Adds import logic to propagate the parsed GLTF extras all the way to the resulting Node->meta
- Adds export logic to save Godot Object meta into GLTF extras
- Supports `nodes`, `meshes` and `materials` (in GLTF sense of the words)
2024-08-29 19:17:04 +02:00
A Thousand Ships
e33fdb4296
Use MutexLock in more places
2024-08-29 14:12:59 +02:00
Danil Alexeev
be5068d44b
Core: Bind and document iterator API virtual methods
2024-08-27 21:57:22 +03:00
Haoyu Qiu
8bf4ecc026
Add String.is_valid_unicode_identifier()
...
- Adds `is_valid_unicode_identifier()`
- Adds `is_valid_ascii_identifier()`
- Deprecates `is_valid_identifier()`
- Renames `validate_identifier()` to `validate_ascii_identifier()`
2024-08-27 11:34:08 +08:00
Daylily-Zeleen
3d575801ce
Allow ClassDB to create a Object without postinitialization for GDExtension.
2024-08-20 20:19:02 +08:00
Pedro J. Estébanez
32b7f835d8
Avoid potential crash on signal disconnection
2024-08-19 12:18:04 +02:00
Haoyu Qiu
7343dc3a5d
Split TranslationServer into its own file
2024-08-15 15:00:47 +08:00
Pedro J. Estébanez
76bfe8e0fd
Make errors on RefCounted.free() more accurate
2024-07-15 08:51:42 +02:00
rune-scape
ca916a536a
Object: use correct GDExtensionConstStringNamePtr
2024-06-17 19:06:40 -07:00
Raul Santos
29bf60cc02
Use GDExtension to_string in Node
...
Matches the `Object::to_string` implementation.
2024-06-11 17:40:51 +02:00