Commit Graph

430 Commits

Author SHA1 Message Date
654cfb81b7 Renamed NavigationRegion2D back to NavigationPolygonInstance, as I think it fits the engine better. 2023-06-05 18:09:53 +02:00
68b9f4c90e Ported from godot4: Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
- smix8
c394ea518e
2023-06-05 18:05:15 +02:00
cfa4384ad4 Backported from godot4: Fix NavigationMesh baking AABB Editor handling and visuals
Fixes handling and visuals for Navigation Mesh baking AABB in the Editor.
- smix8
2023-06-05 14:33:55 +02:00
b7892d6baf Backported from godot4: Implement NavigationMesh bake area.
Adds two new properties to NavigationMesh resources to restrict the navmesh baking to an area enclosed by an AABB with volume.
- smix8
0c4d99f4fd
2023-06-05 14:24:42 +02:00
6589d075bb Ported the improvements to the NavigationPolygon from the aforementioned pull request. 2023-06-05 14:13:02 +02:00
712eb8eb8a Removed the Polygon struct from NavigationPolygon. 2023-06-05 12:48:57 +02:00
0bfa40bb09 Reorganize NavigationPolygon. 2023-06-05 12:44:49 +02:00
54ae614941 Make sure that the new classes are registered to the ClassDB. Also added in the docs for them. 2023-06-03 20:39:56 +02:00
8cbb1bb879 Started porting pull request from godot 4: Rework NavigationMeshGenerator
Reworks NavigationMeshGenerator and navigation mesh parse and bake process. Adds navigation mesh baking for 2D.
- smix8
https://github.com/godotengine/godot/pull/70724
38699a8259
2023-06-03 18:22:12 +02:00
2114b2239b Split NavigationPolygon and NavigationPolygonInstance into 2 files. Also renamedNavigationPolygonInstance to NavigationRegion2D. 2023-06-03 16:54:48 +02:00
6b15eb053c Fix property bind inconsistency. 2023-06-02 12:17:16 +02:00
f4a4956b7a Ported: Fix Polygon2D skinned bounds (for culling)
The bound Rect2 was previously incorrect because bone transforms need to be applied to verts in bone space, rather than local space. This was previously resulting in skinned Polygon2Ds being incorrectly culled.
- lawnjelly
dd6c213dac
2023-05-01 13:34:35 +02:00
BimDav
ad6e504a5b Add option in VisibilityEnabler2D to hide the parent for better performance 2023-05-01 12:22:39 +02:00
Fredia Huya-Kouadio
0947677049 Make tab's close button responsive to touch taps 2023-05-01 12:10:43 +02:00
3a1b2954f1 Ported: [3.x] Don't apply scale to autohide theme property
- AThousandShips
1c66257568
2023-04-20 23:47:14 +02:00
dd5ad408e8 Ported: SurfaceTool - efficiency improvements
Changed to use LocalVector rather than linked lists.
- lawnjelly
ff714fbe02
2023-04-20 23:44:12 +02:00
1263101396 Ported: Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.

- lawnjelly

910ddd13c4
2023-04-20 23:09:37 +02:00
kobewi
381aa1a140 Add set_value_no_signal() to Range 2023-04-15 10:56:26 +02:00
Richard Adenling
689a7340f3 Fix for 2D viewport not updating in the editor when the camera moves
This fixes a problem with 2D viewports not taking the camera position
into consideration when previewed in the editor.

Fixes #40441
2023-04-15 10:44:38 +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
Ninni Pipping
e8216d9ad1 Backport Tree::set_selected
Backport function from godotengine#68448

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-03-12 14:25:47 +01:00
smix8
90f81c0013 Add error messages for collision exception functions
Adds error messages to collision exception functions when used with the wrong object/node instead of failing silently.
2023-03-12 14:24:56 +01:00
stmSi
9b65e9df6a Fix Editor hanging if audiostream's pitch_scale is NaN 2023-03-12 14:14:29 +01:00
Marius Hanl
1be818c478 Fix RichTextLabel: BBCode [color] tags are not counting in font char spacing
Each BBCode tag is drawn individually, so we have to add the character spacing manually.
2023-03-12 13:11:00 +01:00
Brian Semrau
2b7327e014 Fix Line2D UVs when using BOX end cap mode 2023-03-12 12:45:31 +01: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
e42c604bc3 Ported: Switch from recursion to iterative for backfilling colour regions.
- Paulb23
ee4a1c99a7
2023-02-21 13:11:37 +01:00
a79792ee67 Ported: Fix color region end key seach and start key order.
- Paulb23
6cdcdbc242
2023-02-21 13:08:49 +01:00
6ea9b581d7 Ported: Fix colour region continuation over blank lines, issue 41120
- Paulb23
5cf2cf8646
2023-02-21 12:53:41 +01:00
634bdfbb69 Ported: Changed line_edited_from(from) to lines_edit_from(from, to)
- Paulb23
907f9f2a84
2023-02-21 12:37:52 +01:00
0016b64316 Fix inconsistent overrides warning. 2023-02-21 01:34:30 +01:00
c356806ebf Ported: Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
- Paulb23
bc4cee4458
2023-02-21 01:30:59 +01:00
0edf8fe956 Ported: Convert syntax highlighters into a resource
- Paulb23
2f1080be9b
2023-02-20 14:51:10 +01:00
Jóhannes Gunnar Þorsteinsson
d19c1fedfb Add independent spinbox arrow step precision
Backported from the `master` branch, with a property hint added.
2023-02-07 02:51:05 +01:00
db67fa53ea Ported: Add a theme usability setting which updates the touch area of UI elements (e.g: scrollbar) for the editor on touchscreen devices
- m4gr3d
8170b7ae1e
2023-02-07 02:50:11 +01:00
1f20512f8c Ported: Improve error messages and classref for occluders and portals
Misused functions would previously produce no error messages which was confusing for users.
- lawnjelly
5a0cb54b3a
2023-02-07 02:28:29 +01:00
3bd027f068 Ported: Add dumb theme item cache to Control
- YuriSizov, jordo
1647f4d85e
2023-02-07 02:11:52 +01:00
19baf2133a Ported: PopupMenu rework and enhancements
Many scrolling behaviour improvements and the ability to limit popup size.
- EricEzaM, rsubtil
6a5992c9f1
2023-02-07 01:59:27 +01:00
stmSi
a872971e46 Fixed: Save Branch as Scene not workking in Remote Tree (only work when u pause) 2023-02-07 01:08:29 +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
Haoyu Qiu
dc27330752 Make CollisionShape selection box use shape AABB 2023-01-16 14:19:35 +01:00
OsakiTsukiko
536884aa68 Fix RichTextLabel discards appended BBCode text on window resize when using DynamicFont 2023-01-16 13:54:31 +01:00
Haoyu Qiu
71c28de437 Fix Tree overflow without scrolling being enabled 2023-01-16 13:53:12 +01:00
Hugo Locurcio
04338a5018 Tweak particles animation offset property hint to allow more precise values 2023-01-16 13:47:55 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00