Commit Graph

118 Commits

Author SHA1 Message Date
4637f73099 Backported the shortcut context system from godot4. 2023-09-07 12:57:34 +02:00
9a2bf73280 Backported _shortcut_input() virtual from godot4. 2023-09-07 09:56:16 +02:00
66e080d766 Fix typo. 2023-09-07 07:55:48 +02:00
7fcc653a0e Backported the CallInputType parameter for SceneTree::_call_input_pause() from godot4. 2023-09-07 07:40:45 +02:00
6be43d2ec6 Backported SceneTree::get_first_node_in_group() from godot4. 2023-09-06 08:54:55 +02:00
1e5f9895e7 Backported from godot4: Remove SceneTree debug avoidance hint
Removes SceneTree debug avoidance hint.
- smix8
f1d8ddd9bd
2023-09-04 21:43:06 +02:00
62c5bfbc36 Backported from godot4: Remove legacy navigation debug materials
Removes legacy navigation debug materials.
- smix8
1b506cd49c
2023-09-02 13:18:16 +02:00
8467cf9e94 Backported from godot4: Keep NavigationServer active while SceneTree is paused.
- smix8
4b0dee080e
2023-09-02 12:57:35 +02:00
eb8943a4f6 Backported from godot4: Add Path2D/3D debug options
- smix8
e12e239ab4
2023-09-02 11:38:01 +02:00
d977ed360e Ported: 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
- lawnjelly
5162efbfe9
2023-08-27 18:48:25 +02:00
87b91721da Ported: Physics interpolation - Move out of Scenario
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.

Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
- lawnjelly
d2b1d29634
2023-08-27 17:25:38 +02:00
5861ad6485 Fix typos in _rpc_id_bind and _rpc_unreliable_id_bind. 2023-08-15 23:42:34 +02:00
01c3cd88d5 Make sure rpc binds can take both Strings and StringNames as method names. 2023-08-15 10:24:30 +02:00
5b869f8b54 Ported from godot: Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).
Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
- lawnjelly
b777a9e5f9
2023-06-28 20:25:48 +02:00
decade59c8 Implemented a new ProcessGroup Node. It can be used to multithread scenes updates.
It was insipred by godot 4's ProcessGroup system, however while Godot 4's implementation tries to hide threaded processing as much as possible, this implementation focuses on making it explicitly known and obvious to the user, in a (hopefully) almost bolierplate free way.

Also with the available options this node can be used for other purposes, like multi threaded cron job like method calls when paired with a Timer in manual mode.
2023-06-13 15:08:35 +02:00
d4175f9676 Ported parts of : Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.
This is the first steps towards implementing godotengine/godot-proposals#6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
- reduz
98c655ec8d
- Only got the smaller improvements, and the thread safety for Node and SceneTree. I'm planning to implement a similar system, but I have a different way of doing it in mind.
2023-06-12 21:13:26 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
25078b1437 Ported from godot4: Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
- smix8
d7f75fab60
2023-06-05 18:56:41 +02:00
40a9b72afb Ported from godot-plus: 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.
- lawnjelly
cedb01fb84
2023-04-10 19:42:23 +02:00
8ab1998fcb Ported from godot 4: Optimize Node::add_child validation
Adding 10k nodes is almost twice as fast.
- reduz
223ce4fcb9
2023-04-10 18:10:22 +02:00
a14b058dc4 Ported from godot 4: Optimize Node children management
* Adding and removing child nodes is now constant time, speed up should be huge.
* Searching for node paths as in ("path/to/node") should be far faster too.
This changes the children management and makes it a hashmap, optimizing most StringName based operations.
Most operations should be severe speed up without breaking compatibility.
This should fix many issues regarding to node access performance, and may also speed up editor start/end, but benchmarks are needed. So if you want to test, please make some benchmarks!
- reduz
ab5fc22f67
2023-04-10 17:32:42 +02:00
32e9927ac8 Ported from godot 4: Remove NOTIFICATION_MOVED_IN_PARENT
* This notification makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILDREN_CHANGED (and children_changed signal).
* Changed Canvas code (and similar) to use the above signal, to perform more efficiently.
This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
It is required for the changes in #75627 to be entirely effective.
- reduz
Note that I removed NOTIFICATION_MOVED_IN_PARENT, as keeping it, but making it just not work is worse in my opinion.
104392ef4e
2023-04-10 15:55:34 +02:00
7d2667830d Ported from godot 4: Fix Viewport root order after Node2D raise
- Sauermann
022d24a9ae
2023-04-10 11:42:15 +02:00
15bf4aefd0 Ported: Rework how current Camera2D is determined
7e2a8afb57
- KoBeWi
and
Fix Camera2D crashes
724d6581d6
- KoBeWi
From godot4.
Also fixed issues with active Camera2D switching.
2023-03-04 21:29:49 +01:00
8c9d7bc567 Ported: Set touch input as handled only after _gui_call_input - necrashter
147de75e52
2023-01-16 14:46:29 +01:00
lawnjelly
85a4c5369b Faster queue free
Calling queue_free() for large numbers of siblings could previously be very slow, with the time taken rising exponentially with number of children. This looked partly due to ordered_remove from the child list and notifications.

This PR identifies objects that are nodes, and sorts the deletion queue so that children are deleted in reverse child order. This minimizes the costs of reordering.
2023-01-16 14:24:25 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
ce5e82d910 Ported: Include the follow-viewport-transform into CanvasLayer transform calculations
The follow-viewport-transform was missing from several calculations
3.x version of #59682
- Sauermann
608cbd8296
2022-12-22 19:06:10 +01:00
8aa456b4c4 Ported: Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- SpatialMaterial.uv1_scale
- SpatialMaterial.uv2_scale
- fire-forge and timothyqiu
0d602ce881
2022-12-22 18:52:47 +01:00
Haoyu Qiu
520f6d19f6 Fix possible Tween leak on exit
(cherry picked from commit e173710963c3316833ac2e2c26ab3830551fd790)
2022-12-22 14:06:21 +01:00
c7809991b2 Fixed an another issue with touch gui input handling. 2022-12-12 18:30:35 +01:00
37961b1990 Fix regression in touch input handling. 2022-12-12 14:26:54 +01:00
Haoyu Qiu
5e3a86aea6 Fix CanvasLayer visibility toggle can only run once per frame 2022-12-11 19:08:52 +01:00
Markus Sauermann
fc7038b073 Update root order on layer change
When the layer of a CanvasLayer changes, the order of roots needs to be recalculated.

(cherry picked from commit 8d60e8b5d4120d9f9a4868bfb8f0059e733d6d5f)
2022-12-11 18:35:56 +01:00
Lyuma
6eb0adced6 Make Node editable_instance methods available to GDScript
(cherry picked from commit 7eb6ae279848e8300431cfe925be70fa7ffd7299)
2022-12-11 18:34:17 +01:00
Fredia Huya-Kouadio
4759ad6517 Fix the logic used to route InputEventScreenDrag events to Control nodes. 2022-12-11 18:30:58 +01:00
Haoyu Qiu
095d8c1fef Fix crash of queue_free() when main loop is not SceneTree
(cherry picked from commit 3b08d0e85233a594b016ae27e06b5f21536a6176)
2022-11-30 18:59:25 +01:00
Haoyu Qiu
34260f2bff Fix get_path() error when calling get_node() 2022-11-13 00:35:22 +01:00
Micky
6ca2dc959b Rename set_indexed & get_child's params to be clearer
3.x backport of #67300 and #64463.
2022-11-13 00:27:45 +01:00
lawnjelly
98c32bb3e7 Improve signal already connected error message
The signal already connected message is improved to provide the names of the objects involved.
2022-10-08 16:34:51 +02:00
kobewi
b5b6d14d37 Fix Viewport size change not updating textures
(cherry picked from commit 3a4a4aeadec36324da394238cf0f86dbac345e93)
2022-09-16 23:13:40 +02:00
98039d80f6 Fix include. 2022-09-16 23:12:05 +02:00
kobewi
65e1217d59 Allow to change the Stop shortcut used at runtime
(cherry picked from commit 409613ba7ba50e6cc985c61f6dcc482bac68746e)
2022-09-16 22:59:29 +02:00
6a317fbe15 Fix build. 2022-09-16 22:42:11 +02:00
Atlinx
561aab3227 Remove HDR warning if on low end 2022-09-16 22:34:05 +02:00
Michael Alexsander
bce30062a5 Fix some corner cases in the Menu/OptionButton item auto-highlight 2022-09-16 22:04:23 +02:00
Yuri Sizov
211cd1e46a Remove Inspector tooltip hack that never actually worked 2022-09-16 21:57:00 +02:00
27316923d3 Moved ThreadPool to core. Also it can change it's thread count now when it has time for it. 2022-09-10 04:16:50 +02:00