Commit graph

220 commits

Author SHA1 Message Date
David Snopek
2c707a911f GDExtension: Prevent breaking compatibility for unexposed classes that can only be created once 2025-09-30 14:48:06 -05:00
Thaddeus Crews
a20ca7bbfe
Merge pull request #110459 from YeldhamDev/let_the_poor_ints_slide
Allow to use sliders for integers in `EditorSpinSlider`
2025-09-22 13:28:52 -05:00
Michael Alexsander
f16ff829f0
Allow to use sliders for integers in EditorSpinSlider 2025-09-22 11:23:15 -03:00
Lukas Tenbrink
96619d46a1 Use AncestralClass to speed up Object::cast_to when possible. 2025-09-22 13:21:51 +02: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
Thaddeus Crews
555e7ad073
Core: Handle disabled class detection in ClassDB 2025-08-26 09:31:14 -05: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
Michael Alexsander
454e4f817c
Make build profile project detection also set build options 2025-06-03 11:11:33 -03: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
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
Lukas Tenbrink
621a8d14fa Move compatible functionality from GDCLASS to GDSOFTCLASS. 2025-05-26 17:41:15 +02: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
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
Lukas Tenbrink
e57427900f Use BinaryMutex instead of Mutex for StringName. 2025-04-28 17:13:26 +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
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
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
5edb235018
CI: Bump various pre-commit hooks 2025-04-07 08:23:35 -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
057858a0fb Optimize gdvirtual layout.
Co-authored-by: David Snopek <dsnopek@gmail.com>
2025-04-04 22:54:42 +08:00
Lukas Tenbrink
e6d166344b Remove unused get_inheritance_list_static from GDCLASS. 2025-04-03 17:18:28 +02:00
Lukas Tenbrink
be82731f99 Removed unused get_valid_parents_static functions from GDCLASS. 2025-04-02 13:50:47 +02: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
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
A Thousand Ships
d9721954e6
[Core] Use Vector for MethodInfo::arguments 2025-03-10 13:57:53 +01:00
Thaddeus Crews
324512e11c
Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
kobewi
c6c1a49bea Don't edit objects when loading folding 2025-03-06 15:04:00 +01:00
David Snopek
39f16e70f8 GDExtension: Add compatibility system for virtual methods 2025-01-10 16:00:05 -06:00
Thaddeus Crews
e06d83860d
Style: Enforce AllowShortFunctionsOnASingleLine 2025-01-02 10:09:41 -06:00
Hugo Locurcio
7a04d85ec3
Only allow valid types in Decal, Light3D projector, PointLight2D texture and CSGMesh3D mesh
If an invalid type is supplied (which can still be done from a script),
a warning is printed (along with a workaround for ViewportTexture).

This also adds support for "negative" resource hints such as
"Texture2D,-ViewportTexture" to exclude one or more subclasses
from a class hint.

Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-12-17 20:41:12 +01:00
Rémi Verschelde
08508d2e01
Merge pull request #99700 from hpvb/scene_tree_editor_performance
Improve Scene Tree editor performance
2024-12-16 17:16:00 +01: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
Rémi Verschelde
2153a60425
Revert "Avoid duplicating signals from scene instances into packed scenes"
This partially reverts commit 8a42e3d3ef.

Comment improvements and the test case were kept, with one part commented out.
2024-12-10 10:42:58 +01:00