957 Commits

Author SHA1 Message Date
lawnjelly
758bc38071 FTI - Fix SceneTreeFTI depth limit behaviour
Fixes off by one bug, and increases the limit slightly.
2025-10-09 10:38:10 +01:00
lawnjelly
cd9713e890 Fast child iteration in Node, Spatial, CanvasItem 2025-07-16 03:08:26 +01:00
lawnjelly
2163855d6e Merge pull request #108117 from lawnjelly/fti_toplevel_resets3
[3.x] `FTI` - Add reset on setting `toplevel`
2025-07-01 18:23:22 +01:00
lawnjelly
67ef4127b1 Merge pull request #108132 from lawnjelly/fti_clear_all3
[3.x] `FTI` - Clear all when enabling / disabling `SceneTreeFTI`
2025-07-01 18:22:09 +01:00
lawnjelly
0718852d2c Add EditorSettings EDITOR_GET_CACHED 2025-07-01 17:00:08 +01:00
lawnjelly
50a684cf88 FTI - Clear all when enabling / disabling SceneTreeFTI 2025-06-30 08:15:20 +01:00
lawnjelly
e13227419f FTI - Add reset of setting toplevel 2025-06-29 18:23:01 +01:00
lawnjelly
a298f63924 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 11:44:27 +01:00
Lukas Tenbrink
aa63595b83 Use ancestral classes to speed up Object::cast_to when possible. 2025-06-22 16:21:42 +02:00
lawnjelly
84f761ba54 Merge pull request #107493 from lawnjelly/remove_vi_visible
[3.x] Remove `vi_visible` flag from `Spatial`.
2025-06-22 13:11:54 +01:00
lawnjelly
ae786bd43a Provide quick access to Object ancestry 2025-06-19 11:04:50 +01:00
lawnjelly
e208003378 Change Node children to use LocalVector
There is no need for COW, it will only slow `Node` down.
2025-06-18 14:39:38 +01:00
lawnjelly
e430053b16 Remove _is_vi_visible()
Can be replaced by `is_visible_in_tree()`.
2025-06-16 17:55:49 +01:00
lawnjelly
5ff65c880e Merge pull request #107178 from lawnjelly/scenetreefti_fix_hidden_forced
[3.x] `SceneTreeFTI` - Fix `force_update` flag for invisible nodes
2025-06-12 10:40:49 +01:00
lawnjelly
d164443cd3 Add ability to mute AudioServer.
Adds the option to change the audio driver to the Dummy driver and back at runtime, with a set of MuteState flags - Disabled (user control), Silence (period of silence), Focus Loss (when app is not in focus), and Paused (when app is paused).

Control for the flags is added for the editor in EditorSettings, and for the project in ProjectSettings.

Editor defaults to muted (Dummy driver) when there is no audio output, and automatically switches to active on output. This significantly reduces CPU usage.
2025-06-10 16:53:58 +01:00
lawnjelly
f99c6b3ecd SceneTreeFTI - Fix force_update flag for invisible nodes 2025-06-05 19:59:45 +01:00
lawnjelly
65eb3a2e31 FTI - Optimize SceneTree traversal 2025-05-24 18:26:25 +01:00
Haoyu Qiu
87f9b06f52 Expose some helper methods on Viewport
Expose gui_release_focus and gui_get_focus_owner to Viewport
Expose a method to get hovered Control in Viewport

Co-Authored-By: Gilles Roudiere <gilles.roudiere@gmail.com>
Co-Authored-By: Claire Blackshaw <evilkimau@gmail.com>
2025-05-20 07:55:55 +08:00
lawnjelly
1222ef8682 Merge pull request #95978 from jadoc/tooltips-outside-window-3.x
[3.x] Cancel tooltips when the mouse leaves the window
2025-05-17 19:22:32 +01:00
lawnjelly
958a7c9ca6 Merge pull request #103355 from lawnjelly/fti_warn_physics_non_interp
[3.x] Physics Interpolation - Add editor warning for non-interpolated `PhysicsBody`
2025-05-17 18:15:12 +01:00
lawnjelly
0a07a9a668 FTI - Fix SceneTreeFTI behaviour on exit tree 2025-05-01 08:14:01 +01:00
lawnjelly
9ad73062e8 Physics Interpolation - Add editor warning for non-interpolated physics body 2025-04-20 09:56:13 +01:00
lawnjelly
a2a8bef10f FTI - Fix 3D auto-resets
* Ensure NOTIFICATION_RESET_PHYSICS_INTERPOLATION is sent to derived classes
* Add deferred auto-resets for all `Spatials` on entering the tree
2025-04-16 19:43:13 +01:00
lawnjelly
36e1329a4c Physics Interpolation - Fix disable_scale bug in 3D 2025-04-15 10:00:48 +01:00
lawnjelly
2bb32734cf Physics Interpolation - Fix non-interpolated resting xforms
Ensure servers are updated for non-interpolated Spatials, either during the scene tree update or a final pass.
Ensure properties and xforms are given a final server update in the final resting positions after removal from tick lists.
Fixes dirty local xform bug.
2025-04-09 07:41:00 +01:00
lawnjelly
18c01b21e5 Physics Interpolation - Add InterpolatedProperty
And add some basic interpolated properties to Camera.
2025-04-07 08:19:00 +01:00
lawnjelly
a39897953d Make changes for simplified ObjectDB::get_instance() casting 2025-03-31 07:42:34 +01:00
lawnjelly
5155fe5a4f Merge pull request #103685 from lawnjelly/fti_scene_tree
[3.x] Physics Interpolation - Move 3D FTI to `SceneTree`
2025-03-30 15:46:13 +01:00
lawnjelly
0758ad0612 Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-03-18 16:28:40 +00:00
lawnjelly
66a2efe491 Physics Interpolation - Move 3D FTI to SceneTree
Moves 3D interpolation from `VisualServer` to the client code (`SceneTree`).
Complete rework of 3D physics interpolation, but using the same user API.
2025-03-17 17:55:26 +00:00
lawnjelly
a4349590c5 Merge pull request #102184 from lawnjelly/fti_fix_client_ticking
[3.x] Physics Interpolation - fix client interpolation pump
2025-02-10 19:07:27 +00:00
lawnjelly
7e9be93338 Physics Interpolation - fix client interpolation pump
Client interpolation pump is moved AFTER the physics tick, after physics objects have been moved.
This is necessary because the `current` transform is also updated during the pump.
2025-01-30 11:44:16 +00:00
lawnjelly
7c824d1fa5 Physics Interpolation - Auto-reset on set_physics_interpolation_mode()
Fixes historical bug where auto-reset wasn't working correctly.
Also fixes process modes on Cameras when mode is changed.
2025-01-23 08:51:47 +00:00
Alex Docauer
bea070235c Cancel tooltips when mouse leaves window
This is a backport of 807431c49a.
2024-08-22 22:12:35 -07:00
lawnjelly
49d3161ce0 Physics Interpolation - Fix behaviour on pause 2024-06-20 10:50:30 +01:00
lawnjelly
d80b206643 Physics Interpolation - refactor client interpolation pump
* Move client interpolation pump to earlier in the iteration before 3D physics synced
* Allow `get_global_transform_interpolated()` to prime the client interpolation inside a physics tick
2024-06-19 08:44:33 +01:00
lawnjelly
0b30d77384 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-06-09 12:08:27 +01:00
lawnjelly
0f5cadfb56 Fix Viewport interpolation mode
Viewport interpolation mode is a special case, which should be set to ON instead of INHERIT.
2024-05-20 10:28:58 +01:00
kleonc
b045a7c92e Always look for unique node names in owner if not found in owned nodes
(cherry picked from commit 95ced4bbdc)
2024-05-01 12:04:27 +02:00
lawnjelly
a73715cf55 Merge pull request #58577 from pfertyk/issue_58543_audio_not_paused
[3.x] Fix AudioStreamPlayer not paused on pause mode change
2024-04-20 09:18:46 +01:00
lawnjelly
d56d1ff4d2 Deprecate NOTIFICATION_MOVED_IN_PARENT
* NOTIFICATION_MOVED_IN_PARENT makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILD_ORDER_CHANGED (and children_changed signal).
* Most of the previous tasks carried out by NOTIFICATION_MOVED_IN_PARENT are now done not more than a single time per frame.

This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
2024-04-20 07:52:05 +01:00
Haoyu Qiu
33043c63d5 Fix SceneTree not respecting virtual process methods
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-04-16 18:49:02 +08:00
Haoyu Qiu
fe65682937 Add Node.is_node_ready 2024-04-08 17:44:23 +08:00
Paweł Fertyk
90cf873979 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-05 14:20:44 +02:00
Ansraer
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
lawnjelly
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
Rémi Verschelde
721eba5d5d Merge pull request #87539 from SysError99/3.x-get_first_node_in_group
[3.x] Add `SceneTree::get_first_node_in_group` following 4.x
2024-01-29 23:29:04 +01:00
Rémi Verschelde
6f3c5e63f3 Merge pull request #82584 from lawnjelly/lightcull_23
[3.x] Shadow volume culling and tighter shadow caster culling
2024-01-29 23:27:56 +01:00
Rémi Verschelde
4e741ec2ba Merge pull request #64493 from Mickeon/3.x-editor-group
[3.x] Add Node editor description group
2024-01-29 23:27:07 +01:00
SysError99
99284482bc [3.x] Add SceneTree::get_first_node_in_group following 4.x 2024-01-26 21:26:40 +07:00