Commit Graph

7130 Commits

Author SHA1 Message Date
e4e3f7d157 Add a signal to notify when children nodes enter or exit tree
-Allows more fine grained notifications (hence better performance) than using the global scene tree signals (node added and removed).
-Required for #55950

(cherry picked from commit fbd9599b04)
2022-02-11 09:50:58 +01:00
8231303dec Backport FlowContainer 2022-02-11 14:48:40 +08:00
f49ffe4bb0 Backport CanvasLayer visibility 2022-02-11 01:00:35 +08:00
0c7c640112 Merge pull request #57643 from YeldhamDev/smarter_pm_focus_port 2022-02-10 16:52:08 +01:00
c27b05febb use exact match when checking focus next / previous 2022-02-09 10:18:58 -06:00
f0af29346b ProjectSettings add dirty flag and project_settings_changed signal
Most frames there will be no change in project settings, and it makes no sense to read settings every frame in case of changes, as a large number of string compares are involved.

This PR adds a signal to ProjectSettings that can be subscribed to in order to keep local settings up to date with ProjectSettings.

In addition a function `ProjectSettings::has_changes()` is provided for objects outside the signal system (e.g. Rasterizers).
2022-02-09 11:20:25 +00:00
a3f6033513 Improve TreeItem button API 2022-02-08 23:56:19 +08:00
74a4795fb1 Fix RayCast{,2D}.clear_exceptions clears parent 2022-02-08 16:22:10 +08:00
1d3de163dc Add alignment options to icons on buttons.
They can now be centered and right-aligned.

Co-authored-by: jitspoe <jitspoe@yahoo.com>
2022-02-07 21:29:37 +01:00
689f59dca0 Merge pull request #53463 from lawnjelly/vital_redraws
Add editor vital redraws only option
2022-02-04 21:42:49 +01:00
f63bea9ef2 Make popup menus focus items automatically when not using the mouse 2022-02-04 17:20:26 -03:00
10eb9564ca Portals - Improve mesh merging
Some improvements to robustness to account for more properties.
Addition of an "allow merging" flag in the cull instance.
2022-02-04 08:40:46 +00:00
80306cc88a EditorProperty: Fix range hint parsing with optional step
This could lead to have a step of 0 when parsing e.g. "1,10,is_greater".
2022-02-03 12:33:37 +01:00
6c6e50bf0c Fix navigation merge errors, fixes #56786
- improved `detail/sample_max_error` default value
- improved floating point precision handling in cell key calculations
- improved `merge error` error message
- exposed `cell_height` of `nav_map` to the `Navigation`
- fixed cell key `y` calculation
2022-02-02 23:52:29 +01:00
78f230885b Merge pull request #57475 from snailrhymer/look-at-update 2022-02-02 23:07:20 +01:00
821a1a1882 Merge pull request #57546 from lawnjelly/portals_fix_dynamic_particles 2022-02-02 14:57:21 +01:00
d86061d7ae Portals - fix DYNAMIC particle systems
A regression had occurred whereby particle systems in DYNAMIC mode weren't added to the room correctly.
This PR recognise the case and bypasses the function to retrieve geometry, as retrieving the geometry is not necessary for DYNAMIC objects as they should not affect the room bound. Their AABB will be retrieved during gameplay rather than once off at level conversion.
2022-02-02 12:54:35 +00:00
621cf7d8d5 Update the minimum size of ViewportContainer 2022-02-02 13:21:03 +01:00
a0c6d16c90 Add editor vital redraws only option
When editor continuous redraws is switched off, the editor only redraws when a redraw_request was issued by an element in the scene. This works well in most situations, but when scenes have dynamic content they will continuously issue redraw_requests.

This can be fine on high power desktops but can be an annoyance on lower power machines.

This PR splits redraw requests into high and low priority requests, defaulting to high priority. Requests due to e.g. shaders using TIME are assigned low priority.

An extra editor setting is used to record the user preference and an extra option is added to the editor spinner menu, to allow the user to select between 3 modes:

* Continuous
* Update all changes
* Update vital changes
2022-02-02 11:26:45 +00:00
b6dbff7621 Merge pull request #57361 from lawnjelly/occ_poly_only 2022-02-01 14:04:24 +01:00
8ea20f5fdd Add OccluderShapePolygon
Add OccluderShapePolygon, glue to Occluder and gizmos etc.
2022-02-01 11:31:06 +00:00
32d83053c4 TextureButton Fix logic for drawing only the focus texture
(cherry picked from commit 078b8c25ce)
2022-01-31 22:54:25 +01:00
b5eef640e1 Merge pull request #57390 from Pineapple/scene-tree-get-window-size 2022-01-31 18:23:36 +01:00
83298da9b8 Backport improved look_at docs and errors
Take extra constraint info and function description from Node3D.look_at to improve Spatial.look_at docs.
Add an explicit error for up == 0
2022-01-31 11:52:15 +00:00
a118837af4 Fix button icon_color_disabled alpha channel 2022-01-30 13:15:05 -05:00
9cdd110cc3 Merge pull request #56600 from Scony/fix-navigation-obstacle-errors-3.x 2022-01-28 23:18:57 +01:00
94ddd4168d Simplify usage of OS::get_window_size() in SceneTree methods 2022-01-28 23:02:48 +01:00
c6890c6d12 Fix "mass" and "weight" properties of the RigidBody (and RigidBody2D) in the Inspector view 2022-01-27 19:58:51 +07:00
6b68d2f177 Merge pull request #57183 from timothyqiu/shape-owner-3.x 2022-01-26 13:27:16 +01:00
797bb1d97e Ensure that NavMesh baking updates the inspector 2022-01-26 01:16:50 +03:00
941879f601 Expose BitMap's convert_to_image and resize methods to GDScript
(cherry picked from commit 453912d48d)
2022-01-25 18:55:52 +01:00
58191c4b7e Make sure MeshLibrary shape array has correct number of elements
(cherry picked from commit 5f8b292ad3)
2022-01-25 18:55:52 +01:00
6340e4c83f Expose AnimationNodeOneShot::mix_mode as a property
Fixes #23458.

(cherry picked from commit f16c483c9d)
2022-01-25 18:55:51 +01:00
d3473b2a95 Rework Node::get_node to omit is_absolute() check in best case scenario
(cherry picked from commit e2792cc71c)
2022-01-25 18:13:42 +01:00
fa96505418 Store ObjectID instead of raw pointer for Shape Owners 2022-01-25 17:16:02 +08:00
36c7110c1b Fixed accessing a null MeshInstance object in BakedLightmap instead of the GeometryInstance 2022-01-24 06:59:48 +00:00
67cf622935 Improve Navigation2D default settings, fixes #56852
This commit reduces `cell_size` and `edge_connection_margin` default
values so that `Navigation2D` behaves more like in Godot <= `3.4` by default.
2022-01-23 14:07:31 +01:00
40a348bce2 Merge pull request #57013 from Killfrra/3.x
[3.x] Backport method `get_rid` for NavigationAgent
2022-01-21 18:35:19 +01:00
1c3d3af6ef backported method get_rid for NavigationAgent 2022-01-21 00:15:16 +03:00
adf14bfdde Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 17:28:31 +00:00
f8f83f05f2 Fix RichTextLabel uninitialized content height value. 2022-01-20 13:53:52 +02:00
58c460b3b7 Removed redundant ClassDB::is_class_enabled() and moved second dynamic_cast inside worst case if
(cherry picked from commit b6cfc55113)
2022-01-19 16:04:16 +01:00
08af6e0407 Replicate load-as-placeholder state on node duplication
(cherry picked from commit 6aecf91e4f)
2022-01-19 16:01:04 +01:00
3fcc31eea7 Merge pull request #56934 from timothyqiu/color-preset-overbright 2022-01-19 10:17:07 +01:00
99cebb30dd Merge pull request #54827 from timothyqiu/watch-your-step
[3.x] Fix AnimationTree function call track loop
2022-01-19 08:15:16 +01:00
342035b635 Fix ColorPresetButton's overbright indicator in default theme 2022-01-19 14:31:10 +08:00
c938104a88 Merge pull request #56630 from Pineapple/replace-find-last 2022-01-18 16:36:52 +01:00
365486543d Improve Colorpicker presets 2022-01-17 15:21:47 +01:00
64fcf7ee77 Fix LineEdit center and right alignment 2022-01-16 20:39:11 +08:00
5bad0778b6 Dont set elapsed to 0 when a tween is finished. 2022-01-15 08:00:43 -06:00