WinnerWind
976016b701
Revert "Prevent crashing if `max_threads` is zero."
...
This reverts commit a1788e09bf .
2025-08-27 09:02:34 +05:30
Thaddeus Crews
555e7ad073
Core: Handle disabled class detection in ClassDB
2025-08-26 09:31:14 -05:00
Yarvin
b2e4c4f334
Fix typo - is_deprecated was being set twice, skipping is_experimental.
2025-08-19 13:54:41 +02:00
Thaddeus Crews
f5152699bc
Merge pull request #108768 from WinnerWind/fix-zero-threadcount
...
FIX: Prevent crashing if `max_threads` is zero.
2025-08-18 08:29:04 -05:00
WinnerWind
a1788e09bf
Prevent crashing if `max_threads` is zero.
...
Adds a note in the docs that a thread count of 0 has the same effect as a thread count of -1.
Change language of WorkerThreadPool in ProjectSettings
Co-Authored-By: Tomasz Chabora <kobewi4e@gmail.com>
2025-08-17 20:12:41 +05:30
David Snopek
3eed53686b
Don't use `alloca()` in `Object::emit_signalp()` to prevent stack overflow
2025-08-14 09:54:59 -05:00
Pāvels Nadtočajevs
9fd98410df
Automatically unregister loggers when script language is deinitialized.
2025-08-02 18:29:00 +03:00
clayjohn
2a8ac1c05b
Allow processing low priority threads on calling thread in the WTP.
...
This fixes a recent regression. In theory, low priority tasks should always go to the queue and never be executed on the calling thread. However, when using NO_THREADS build, all tasks need to execute on the calling thread.
2025-07-30 23:15:38 -07:00
clayjohn
782b9e328c
Ensure that threads only process one pump task.
...
This is necessary because we will always deadlock if a thread takes on multiple pump tasks since pump tasks never return.
This means when using separate threads for certain systems (like physics or rendering), we need to be sure that there are enough threads to have at least one per system (to ensure forward progress).
2025-07-29 07:15:34 -07:00
kobewi
188e313dd8
Fix Variant properties losing value upon script update
2025-07-12 20:29:19 +02:00
Mike Precup
047edb8933
Avoid unnecessary copy in get_property_list
2025-07-10 17:06:13 -07:00
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
lawnjelly
14a814586a
Provide quick access to `Object` ancestry
2025-06-23 07:11:11 +01:00
Haoyu Qiu
a7ab249a2a
Make `PROPERTY_HINT_GROUP_ENABLE` hide properties by default
2025-06-16 20:03:49 +08:00
Rémi Verschelde
22702244f8
Merge pull request #105414 from KoBeWi/disable_uid_here
...
Add `@export_file_path` to export raw paths (no UID)
2025-06-13 01:30:24 +02:00
Lukas Tenbrink
df7dab4946
Use idiomatic templating vargs in a few places to reduce code.
2025-06-08 12:24:07 +02:00
Pāvels Nadtočajevs
b6461a3bd5
Add `WorkerThreadPool.get_caller_group_id`
2025-06-05 14:23:26 +03:00
Rémi Verschelde
8862d4c9b5
Merge pull request #107029 from mhilbrunner/expose-workerthreadpool-gettaskid
...
Expose `WorkerThreadPool.get_caller_task_id()`
2025-06-05 13:12:48 +02:00
Rémi Verschelde
0518bd5fee
Merge pull request #106683 from dalexeev/gds-remove-leftmost-rightmost-column
...
GDScript: Remove `leftmost_column` and `rightmost_column` fields
2025-06-05 13:12:02 +02:00
Thaddeus Crews
57bf364f36
Merge pull request #107058 from mihe/script-backtrace-deadlock
...
Fix various race conditions with capturing of script backtraces
2025-06-03 15:30:16 -05:00
Michael Alexsander
454e4f817c
Make build profile project detection also set build options
2025-06-03 11:11:33 -03:00
Max Hilbrunner
7ef1cf3c2e
Expose WorkerThreadPool.get_caller_task_id()
2025-06-02 22:00:24 +02:00
Mikael Hermansson
6929823838
Fix various race conditions with capturing of script backtraces
2025-06-02 19:46:19 +02:00
Thaddeus Crews
f619ca2519
Merge pull request #60143 from Rindbee/better-connection-dialog
...
Add a flag to make the connection automatically emit the source object.
2025-05-27 09:39:34 -05: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
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
Fabio Alessandrelli
b73ec1fa9b
Expose get_rpc_config and get_node_rpc_config
2025-05-27 00:43:21 +02:00
Thaddeus Crews
06301bee3e
Merge pull request #106775 from Ivorforce/gdsoftclass-expand
...
Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`.
2025-05-26 11:24:26 -05:00
Thaddeus Crews
506417fe43
Merge pull request #105623 from lodetrick/section-feature-hide
...
Allow Inspector Section Checkboxes to hide features, Add "On" text to checkboxes
2025-05-26 11:24:25 -05:00
Lukas Tenbrink
621a8d14fa
Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`.
2025-05-26 17:41:15 +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
Yufeng Ying
3545e945f6
Simplify implementation of errarray.
2025-05-23 23:14:59 +08:00
kobewi
42249bb659
Add @export_file_path to export raw paths (no UID)
2025-05-22 13:25:17 +02:00
Logan Detrick
1a427d3dec
Add feature hint string and "On" text for checkable groups
2025-05-21 14:56:55 -07:00
Danil Alexeev
7aafa6ef18
GDScript: Remove `leftmost_column` and `rightmost_column` fields
2025-05-21 18:16:20 +03:00
Thaddeus Crews
2bf7ac76cf
Merge pull request #106456 from Repiteo/style/remove-DEBUG_METHODS_ENABLED
...
Style: Remove redundant `DEBUG_METHODS_ENABLED` macro
2025-05-19 08:01:35 -05:00
Yufeng Ying
1384e82c2c
Improve ScriptLanguage get keyword API.
2025-05-17 18:43:19 +08:00
Thaddeus Crews
d237e31a89
Style: Remove redundant `DEBUG_METHODS_ENABLED`
...
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Thaddeus Crews
1c4b660312
Merge pull request #96611 from Dynamic-Pistol/master
...
Add `PROPERTY_HINT_INPUT_NAME` for use with `@export_custom` to allow using input actions
2025-05-13 16:22:25 -05:00
Mikael Hermansson
31b90246e7
Fix empty lines being added for errors with no script backtrace
2025-05-05 13:27:21 +02:00
Thaddeus Crews
01fc9aee6c
Core: Modernize C headers with C++ equivalents
2025-05-02 08:23:01 -05:00
Pierre-Thomas Meisels
e8c036beeb
Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension
2025-04-29 09:43:20 +02:00
Lukas Tenbrink
e57427900f
Use `BinaryMutex` instead of `Mutex` for `StringName`.
2025-04-28 17:13:26 +02:00
Thaddeus Crews
74fc4dae15
Merge pull request #95585 from HolonProduction/remove-cache
...
ScriptEditor: Remove obsolete completion cache
2025-04-27 19:21:30 -05:00
Thaddeus Crews
df78d4a866
Merge pull request #105546 from Splizard/fix_gdextension_tostring
...
Fix GDExtension `Object/Node::to_string` to check `is_valid` before returning the result
2025-04-27 19:21:24 -05:00
HolonProduction
56bad11517
ScriptEditor: Remove obsolete completion cache
2025-04-26 22:59:10 +02:00
Thaddeus Crews
28089c40c1
Merge pull request #91006 from reduz/live-backtrace
...
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
reduz
d1dcb40d56
Ability to print and log script backtraces
...
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
Dynamic-Pistol
c8fed1e1d0
Add PROPERTY_HINT_INPUT_NAME
...
Added PROPERTY_HINT_INPUT_NAME for StringName based off https://github.com/godotengine/godot-proposals/discussions/7559
2025-04-23 22:23:44 +02:00
Lukas Tenbrink
91fe434a86
Always use `String` as `StringName` backing internally.
2025-04-23 14:57:03 +02:00
Thaddeus Crews
0cc292f880
Merge pull request #105272 from lodetrick/add_section_toggle
...
Add enable checkboxes to editor sections
2025-04-21 08:24:20 -05: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
cier
ebe9370724
Add enable checkboxes to editor sections
...
Fixes https://github.com/godotengine/godot-proposals/issues/4173
2025-04-15 13:49:41 -07:00
Thaddeus Crews
f56a4d4fe4
Merge pull request #105138 from stuartcarnie/fix_hangs
...
Renderer: Reduce scope of mutex locks to prevent common deadlocks
2025-04-14 19:39:47 -05:00
Stuart Carnie
09282c316a
Renderer: Reduce scope of mutex locks to prevent common deadlocks
...
Fixes #102877
2025-04-13 06:56:13 +10: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
Thaddeus Crews
fc1dbda769
Merge pull request #105164 from stuartcarnie/apple_pthread
...
Apple: Add pthread implementation of `Thread` class
2025-04-10 10:18:12 -05:00
Stuart Carnie
8c8d6de3e7
Apple: Add pthread implementation of `Thread` class
...
This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.
This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
2025-04-10 09:35:40 +10:00
Lukas Tenbrink
fbe64ffb45
Change `get_class_static` to return `StringName`.
...
Use that static `get_class_static` for `_get_class_namev` to avoid duplication.
2025-04-08 23:25:05 +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
Thaddeus Crews
5dc7d56b92
Merge pull request #105099 from Ivorforce/object-classname-cache
...
Fix caching of objects' class name pointer in `Object` instances.
2025-04-08 12:32:40 -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
45a64319e1
Merge pull request #104771 from Repiteo/ci/pre-commit-bump
...
CI: Bump various pre-commit hooks
2025-04-07 08:43:27 -05:00
Thaddeus Crews
5edb235018
CI: Bump various pre-commit hooks
2025-04-07 08:23:35 -05:00
Thaddeus Crews
8a93218aab
Core: Natively convert enum/BitField with Variant
2025-04-05 12:35:34 -05:00
Thaddeus Crews
4b36c0491e
Merge pull request #105020 from YYF233333/opt_get_inheriters
...
Optimize `ClassDB::get_inheriters_from_class`
2025-04-04 17:40:59 -05:00
Thaddeus Crews
046c9f540c
Merge pull request #105030 from Ivorforce/class-is-enabled-object
...
Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed.
2025-04-04 17:40:58 -05:00
Lukas Tenbrink
aa5ca4f1a2
Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed.
2025-04-04 23:45:35 +02:00
Thaddeus Crews
78922d756a
Core: Decouple `GDCLASS` from ClassDB
2025-04-04 16:21:30 -05:00
Yufeng Ying
4029051bb1
Change ClassDB::get_inheriters_from_class.
2025-04-04 23:47:19 +08: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
21db8487a2
Merge pull request #104664 from tomfull123/missing-typed-dictionary-initializer-list
...
Add missing `initializer_list` constructor to TypedDictionary
2025-04-03 16:50:23 -05:00
Thaddeus Crews
6bd249a4c2
Merge pull request #104850 from Repiteo/core/warning-macros
...
Core: Integrate warning suppression macro helpers
2025-04-03 16:50:22 -05:00
Lukas Tenbrink
e6d166344b
Remove unused `get_inheritance_list_static` from `GDCLASS`.
2025-04-03 17:18:28 +02:00
Thaddeus Crews
207a2b6472
Core: Integrate warning suppression macro helpers
2025-04-03 10:13:46 -05: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
Thaddeus Crews
e5c5cb4ce2
Merge pull request #104906 from Daylily-Zeleen/daylily-zeleen/allow_instantiate_unexposed_editor_plugin_from_gdextension
...
Allow instantiating unexposed `EditorPlugin` from GDExtension.
2025-04-03 09:27:50 -05:00
Tom
8a3f9846c5
Add missing initializer_list constructor for TypedDictionary
2025-04-03 00:17:44 +01:00
Daylily-Zeleen
1cc879afc0
Allow instantiate unexposed EditorPlugin form GDExtension.
2025-04-02 23:52:14 +08: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
Thaddeus Crews
1f1b1c56e7
Merge pull request #104381 from Ivorforce/object-notification-nobool
...
Optimize `Object::notification` by avoiding runtime branches
2025-04-01 19:53:37 -05: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
Thaddeus Crews
abd565eb19
Merge pull request #104844 from Ivorforce/gdsoftclass
...
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 19:02:03 -05:00
Lukas Tenbrink
fa0a3c9c6e
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 20:49:50 +02:00
Thaddeus Crews
8f6bb119f4
Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
...
Add templated version of `ObjectDB::get_instance()`
2025-03-31 12:03:47 -05:00
Thaddeus Crews
f704113abe
Merge pull request #104649 from Ivorforce/move-semantics-ref-array-dict
...
Add move semantics to `Ref`
2025-03-31 12:03:44 -05:00
Rémi Verschelde
d8a81e416e
Merge pull request #104668 from monxa/redundant-lock-declaration
...
Remove redundant `ClassDB::locker` declaration
2025-03-28 14:33:45 +01:00
Rémi Verschelde
d01ffe4ad2
Merge pull request #103708 from Ivorforce/linear-casts-fast-virtual-casts-bad
...
Optimize `Object::cast_to` by assuming no virtual and multiple inheritance, gaining 7x throughput over `dynamic_cast`.
2025-03-28 14:32:04 +01:00
Rémi Verschelde
666edb3f76
Merge pull request #102440 from dsnopek/classdb-cannot-instantiate-unexposed-classes
...
Prevent instantiating classes that aren't exposed
2025-03-28 14:31:46 +01: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
kobewi
bc9d0c7835
Add templated version of ObjectDB::get_instance()
2025-03-27 15:43:23 +01:00
Lukas Tenbrink
dd9dc75a83
Optimize `Object::cast_to` by assuming no virtual and multiple inheritance, gaining 8x throughput over `dynamic_cast`.
...
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
2025-03-27 15:39:53 +01:00
Alexander Montag
b79a6ca3e7
Remove redundant ClassDB::locker declaration
2025-03-26 21:14:11 +01:00
Lukas Tenbrink
28d6cf859a
Add move semantics to `Ref`.
2025-03-26 15:23:38 +01:00
Pedro J. Estébanez
2d885a3163
Sanitize ClassDB locking
2025-03-25 16:50:46 +01:00
Thaddeus Crews
8f331ebd9c
Merge pull request #103099 from YeldhamDev/build_res_loader_disable
...
Disable `ResourceFormatLoader/Saver`s of disabled classes
2025-03-23 19:04:01 -05:00
Thaddeus Crews
fd45f42464
Merge pull request #101361 from Repiteo/core/isolate-ref-logic
...
Core: Isolate `Ref` forward declare logic
2025-03-23 19:03:54 -05:00