Commit graph

1742 commits

Author SHA1 Message Date
Pedro J. Estébanez
44cc0d2ec2 Let calls through thread guards in resource loading contexts 2023-05-17 01:43:28 +02:00
Rémi Verschelde
755c61b57a
Merge pull request #77064 from brno32/push-input-null-check
Check for null event in Viewport::push_input
2023-05-16 11:04:08 +02:00
Rémi Verschelde
12b7a56202
Merge pull request #76713 from KoBeWi/TODO_is_now
Fix 2D audio in multiple viewports
2023-05-16 11:00:45 +02:00
Rémi Verschelde
508a5bf16e
Merge pull request #76025 from YuriSizov/editor-reparentable-windows
Expose dialog parent-and-popup logic to the API
2023-05-16 10:49:09 +02:00
Rémi Verschelde
59c19a7172
Merge pull request #75250 from bruvzg/lbl_rtl_jst_flags
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification.
2023-05-16 10:48:45 +02:00
Rémi Verschelde
8cfa19a078
Merge pull request #77000 from reduz/make-more-base-nodes-thread-safe
Make more base nodes thread safe
2023-05-16 00:31:56 +02:00
Alex Drozd
a5a1c3a03c check for null event in Viewport::push_input 2023-05-15 20:16:15 +02:00
Yuri Sizov
17f492fb82 Expose dialog parent-and-popup logic to the API 2023-05-15 19:49:28 +02:00
bruvzg
9163d8c336
Expose TextServer justification flags to Label, Label3D, TextMesh and RTL. Add flags to control last/single line justification. 2023-05-15 19:23:54 +03:00
Juan Linietsky
0a9f72d5a8 Make more base nodes thread safe
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +02:00
Rindbee
1eb250e17d Avoid crash when adjusting a node tree that is not in the tree
When node tree `A` is not in the tree, `remove_child(B)` will not
automatically clean up the owners of `B` and `B`'s child nodes.
This is convenient for implementing operations like `replace_by()`,
but may have hidden dangers when manipulating the rest of the tree
`A`.

This commit makes it safe to manipulate the rest of `A` after freeing
`B`.
2023-05-11 08:57:39 +08:00
Rémi Verschelde
5271186f2f
Merge pull request #75901 from reduz/refactor-node-processing
Refactor Node Processing to allow Scene Multithreading
2023-05-10 12:46:44 +02:00
Rémi Verschelde
31fc7a8525
Merge pull request #62378 from trollodel/gsoc_2022_multiwindow
Add multi window code and shader editors (GSOC'22 Project)
2023-05-10 12:46:19 +02:00
Rémi Verschelde
3b8c828159
Merge pull request #69988 from smix8/navigation_rvo_rework_4.x
Rework Navigation Avoidance
2023-05-10 10:19:12 +02:00
Rémi Verschelde
8e608e9467
Merge pull request #64388 from Rindbee/improve-ViewportTexture
Improve the UX of ViewportTexture in the editor
2023-05-10 10:18:43 +02:00
trollodel
b4d6b47c17 Add multi window code and shader editors 2023-05-10 09:14:21 +02:00
smix8
a6ac305f96 Rework Navigation Avoidance
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
Rindbee
af58f1e854 Improve the UX of ViewportTexture in the editor
The associated `ViewportTexture`s will update the `viewport_path`
in time when the `Viewport`'s nodepath is changed (caused by renaming
the node names or moving in the SceneTree dock).

If the target `Viewport` is changed by resetting the `viewport_path`,
the `ViewportTexture`s will be re-setup and emit `changed` signal in
time.
2023-05-10 09:13:43 +08:00
Juan Linietsky
98c655ec8d 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 https://github.com/godotengine/godot-proposals/issues/6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
2023-05-09 19:17:51 +02:00
Rémi Verschelde
72323a57d0
Merge pull request #57894 from Sauermann/fix-subviewport-1
Fix unrestricted mouse-event propagation to SubViewports for Physics-Picking
2023-05-09 10:43:49 +02:00
Rémi Verschelde
15f9ac9458
Merge pull request #75751 from KoBeWi/eradicate_ViewportTexture_errors_entirely_and_surely
Prevent errors when using ViewportTexture
2023-05-08 16:40:10 +02:00
Rémi Verschelde
bbe05b60c8
Merge pull request #57179 from spacechase0/notify-world2d-changed-master
Propagate previously unused NOTIFICATION_WORLD_2D_CHANGED, make CanvasItem/CollisionObject2D use it
2023-05-08 16:40:00 +02:00
kobewi
1b9802fa8c Prevent errors when using ViewportTexture 2023-05-08 15:56:16 +02:00
Michael Alexsander
8118d0d2f5 Add more uses of appropriate cursors when resizing/moving some UI nodes 2023-05-07 11:14:57 -03:00
Max Hilbrunner
fa451ead91
Merge pull request #74883 from dalexeev/fix-thin-multiline-colors 2023-05-05 14:26:37 +02:00
kobewi
8a41eefb97 Fix 2D audio in multiple viewports 2023-05-03 23:09:40 +02:00
Chase Warrington
46e06ee1e6 Propogate previously unused NOTIFICATION_WORLD_2D_CHANGED, make CanvasItem/CollisionObject2D use it 2023-05-01 18:26:55 -04:00
Samuele Panzeri
4aaa2e6477 Fix wait for thread not started 2023-04-27 20:28:22 +02:00
Rémi Verschelde
6aac8af6f1
Merge pull request #69318 from Sauermann/fix-refresh-gui-events
Fix scene reload crash related to mouse cursor update
2023-04-25 15:36:26 +02:00
Aaron Franke
290b09b36c
Expose determinant in Transform2D, rename internal method 2023-04-22 13:44:14 -05:00
Rémi Verschelde
3695dfb357
Merge pull request #75509 from KoBeWi/In_physics,_the_observer_effect_is_the_disturbance_of_an_observed_system_by_the_act_of_observation._A_common_example_is_checking_CanvasItem's_global_position,_which_causes_its_transform_to_be_re-calculated-
Fix invalid global position when read outside tree
2023-04-19 10:13:48 +02:00
bruvzg
520a8d8ed2
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method. 2023-04-19 08:54:53 +03:00
kobewi
727a4ed79a Fix invalid global position when read outside tree 2023-04-18 22:14:01 +02:00
Yuri Sizov
377d8845da
Merge pull request #75890 from YuriSizov/gui-remember-window-state
Always cache parent visibility in `CanvasItem`
2023-04-18 13:07:41 +02:00
Chris Hutchinson
97712b3f50 Clamp minimum value of time_left to 0.0 2023-04-17 16:49:04 +02:00
Yuri Sizov
b8b494a16c
Merge pull request #68397 from aaronfranke/get-child
Make `Node::get_children()` public
2023-04-17 14:28:37 +02:00
angel-721
e347d7d64d Rename internal root canvas group to start with underscore 2023-04-16 17:42:21 -06:00
Aaron Franke
8eb9986dc5
Make Node::get_children() public 2023-04-15 21:59:25 -05:00
Rémi Verschelde
347a8e20ae
Merge pull request #69324 from RedMser/advanced-settings-errors
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
Yuri Sizov
c48219f51e
Merge pull request #73658 from smix8/do_not_stop_the_entire_server_cause_you_want_to_pause_4x
Keep NavigationServer active while SceneTree is paused
2023-04-10 16:24:26 +02:00
Yuri Sizov
fd6a743823 Always cache parent visibility in CanvasItem 2023-04-10 16:18:46 +02:00
smix8
4b0dee080e Keep NavigationServer active while SceneTree is paused
Keep NavigationServer active while SceneTree is paused.
2023-04-10 15:30:22 +02:00
Juan Linietsky
ab5fc22f67 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!

Further performance improvements will be done in the future by removing NOTIFICATION_MOVED_IN_PARENT and replacing by something less laborious.
2023-04-08 10:54:28 +02:00
Rémi Verschelde
c151d3231f
Merge pull request #75760 from reduz/optimize-node-add-child-validation
Optimize Node::add_child validation
2023-04-07 18:20:28 +02:00
Juan Linietsky
223ce4fcb9 Optimize Node::add_child validation
Adding 10k nodes is almost twice as fast.
2023-04-07 13:18:47 +02:00
Samuele Panzeri
404f24b5c4 Update sibling indices after a node is removed.
With change 104392e the code to update node indices on removal was erronously removed.
The out of date indices would cause crashes while selecting nodes in a graph editor (e.g. animation tree) and selected nodes are oftern pushed to beginning or end of the child list for the parent.
2023-04-06 20:47:57 +02:00
Juan Linietsky
104392ef4e 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.
2023-04-06 13:57:13 +02:00
Yuri Sizov
91ff34b5b5 Add a warning when trying to access theme items too early 2023-04-03 18:01:10 +02:00
Rémi Verschelde
b85fc4aa6d
Merge pull request #73646 from KoBeWi/squish
Prevent off-screen controls in editor
2023-04-03 17:07:54 +02:00
RedworkDE
aa604c5c47 Do not clamp non-embedded window size to embedder 2023-03-29 22:35:07 +02:00