Commit graph

7302 commits

Author SHA1 Message Date
Rémi Verschelde
78a9d21da3
Merge pull request #61185 from okla/3.x 2022-05-19 12:02:14 +02:00
Sergey Pershenkov
46ab2512b8 Return -1 from get_selected_id() when not selected
Partial cherry pick from 3b146c5eaa
2022-05-19 12:42:54 +03:00
Rémi Verschelde
b7523a953f Revert invalid PopupMenu breaking change from #61102
Fixes #61179.
2022-05-19 10:02:02 +02:00
Haoyu Qiu
b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
Rémi Verschelde
b0a2b34d48
Merge pull request #61150 from smix8/navigation_region2d_update_navpoly_3.x 2022-05-18 14:36:55 +02:00
smix8
37530b0871 Update NavigationPolygonInstance when polygons of NavigationPolygon change
Updates NavigationPolygonInstance polygons on the NavigationServer2D when the NavigationPolygon Resource emits its changed signal due to e.g. polygons altered by script.
2022-05-18 13:53:46 +02:00
Yuri Rubinsky
32b9818965 Add node list param to GraphEdit::delete_nodes_request signal 2022-05-18 12:36:00 +03:00
Rémi Verschelde
281c5c9a56
Merge pull request #61102 from okla/3.x
[3.x] Make various improvements to OptionButton
2022-05-16 23:51:55 +02:00
Sergey Pershenkov
431c032d8c Make various improvements to OptionButton
- Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor.
- Reset OptionButton selection to -1 when the selected item has been removed.
- Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.

(cherry picked from commit 3b146c5eaa)
2022-05-16 22:47:46 +03:00
Haoyu Qiu
96b1b1991b Fix AnimatedSprite doesn't emit animation_finished when changing playback direction
(cherry picked from commit d5f5e96e11)
2022-05-16 21:12:21 +02:00
Markus Sauermann
ff52becb47 Distribute remaining pixel to expanding childs of GridContainer
(cherry picked from commit 6b3207644b)
2022-05-16 21:12:21 +02:00
FireForge
67e6fc8e43 Fix Theme type group naming in the inspector
(cherry picked from commit 197be78bc5)
2022-05-16 21:12:21 +02:00
smix8
3e01d32b4c Clamp NavigationMesh sample_distance above zero
While default ReCast library has support for 0.0 'sample_distance' the Godot implementation does not an crashes.
Previously Godot would set all sample_distance values below 0.9 to 0 which causes the crashes.

This limits the sample_distance range selection to 0.1 - 16.0 and also clamps sample_distance that are below 0.1 before ReCast receives them.

(cherry picked from commit e33fa9d833)
2022-05-16 21:10:36 +02:00
smix8
c3b39ca1e9 Disable threaded NavigationMesh bake on unsupported OS
Automatically disables threaded NavigationMesh bake when OS does not support threads.

(cherry picked from commit 49c603e127)
2022-05-16 17:52:07 +02:00
smix8
b11708c50d Expose NavigationObstacle2D/3D get_rid() and add config warning
Exposes get_rid() function for scripting.
Adds configuration warning when obstacle is used with not intended static body parent.

(cherry picked from commit 001d89223f)
2022-05-16 17:52:07 +02:00
smix8
847fab6272 Fix NavigationObstacle2D/3D get_global_transform() error
Fixes NavigationObstacle2D/3D reporting a 'get_global_transform: Condition "!is_inside_tree()" error when estimating the agent radius.

The collisionshapes that are lower in the SceneTree order than the obstacle node are not loaded in the SceneTree yet so the global_transform function fails.

Also adds warning message when this happens.

(cherry picked from commit cc707412e9)
2022-05-16 17:52:07 +02:00
Hendrik Brucker
7a4187495d Fix button icon expansion calculation with empty text
(cherry picked from commit c09a5e2774)
2022-05-16 17:14:43 +02:00
Rémi Verschelde
5e693b6d84 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2022-05-16 16:38:26 +02:00
kobewi
bdbbc78da4 Mention that Area2D doesn't support one_way_collision
(cherry picked from commit c836bdf5b1)
2022-05-16 16:27:51 +02:00
kobewi
5fa7ed7686 Rescue orphan nodes in inherited scenes
(cherry picked from commit 2b53826ee6)
2022-05-16 15:59:55 +02:00
kobewi
93482809e5 Fix error spam when tweened node leaves tree
(cherry picked from commit 45e4cb2bbf)
2022-05-16 15:57:41 +02:00
FireForge
f17c5fa7bd Add interpolation modes to Gradient
- Linear, Constant, and Cubic interpolation modes
- Partial backport of #53321
2022-05-12 14:24:04 -05:00
lawnjelly
a4c0e2ecce Physics Interpolation - add warnings to RESET_PHYSICS_INTERPOLATION
Adds warnings when NOTIFICATION_RESET_PHYSICS_INTERPOLATION is called and has no effect due to the node being hidden or not interpolated.
2022-05-10 11:17:58 +01:00
Rémi Verschelde
16abb7f471
Merge pull request #60858 from lawnjelly/fti_add_mode_property
Physics Interpolation - add interpolation mode property to node
2022-05-10 08:42:41 +02:00
Rémi Verschelde
cf6dce2c1e
Merge pull request #60876 from timothyqiu/outline-size-hint
[3.x] Fix mismatched font outline size hint
2022-05-09 22:20:16 +02:00
Rémi Verschelde
20c72e8275
Merge pull request #60891 from YeldhamDev/pm_sep_font 2022-05-09 13:57:02 +02:00
Haoyu Qiu
20d3632268 Fix tree button icon not centered vertically 2022-05-09 10:53:02 +08:00
Michael Alexsander
2e4e76b2e3 Add font_separator to PopupMenu 2022-05-08 14:11:59 -03:00
Haoyu Qiu
b277390267 Fix mismatched font outline size hint 2022-05-08 10:01:38 +08:00
Michael Alexsander
4f70201fbe Fix separator height influencing labeled variation in PopupMenu 2022-05-07 21:15:57 -03:00
lawnjelly
0ab077fcef Physics Interpolation - add interpolation mode property to node
Exposes the "interpolated" flag on nodes via a property, physics_interpolation_mode.

Mode can be INHERIT, OFF and ON. This makes it easy to turn off interpolation for nodes in the editor, versus via code.
2022-05-07 13:51:49 +01:00
Hugo Locurcio
8682874419
Rename profiler "Idle Time" to "Process Time"
References to "idle time" are progressively being replaced by
"process time" throughout the engine to avoid confusion.

This also changes some debug prints to be printed only when verbose
mode is enabled (like in `master`).
2022-05-06 19:31:31 +02:00
kobewi
72e1088df6 Fix tscn not listed as Resource extension
(cherry picked from commit e3511dd9d7)
2022-05-05 13:47:48 +02:00
kobewi
ce36f2f699 Improve Tween infinite loop detection
(cherry picked from commit f473aab00d)
2022-05-05 13:47:23 +02:00
ScottVMariotte
25ef0aaf3e Replaced loops_current with end_loop
(cherry picked from commit c526ee6683)
2022-05-05 13:42:54 +02:00
Rémi Verschelde
13bb7c6c35
Merge pull request #60763 from lawnjelly/fti_physics_flush 2022-05-05 11:59:15 +02:00
Haoyu Qiu
0f7f3d08ba Add autocompletion for AnimatedSprite.play() 2022-05-05 09:04:40 +08:00
Pawel Lampe
505ace250d Add ability to bake_navigation_mesh off thread.
This feature makes it possible to workaround problems such as:
 - long baking time due to heavy synchronization when parsing geometry
   from mesh instances
 - crash when freeing `NavigationMeshInstance` while baking
 - errors when actively baking node tree is being detached from the
   scene tree
2022-05-04 22:41:38 +02:00
lawnjelly
df7fab51a3 Physics Interpolation - Flush transforms after physics tick
Leftover transforms from the physics tick were being flushed during idle, which was causing problems for physics interpolation.

This PR flushes the transforms at the end of the physics tick when physics interpolation is active.
2022-05-04 20:30:46 +01:00
Rémi Verschelde
815f7fe636
Merge pull request #49952 from Calinou/spatialmaterial-depth-triplanar-print-warning
Print warning in SpatialMaterial when depth and triplanar are active
2022-05-02 23:59:52 +02:00
Rémi Verschelde
4b6e5f5da6
Merge pull request #60530 from timothyqiu/theme-validation-3.x 2022-05-02 10:49:27 +02:00
Rémi Verschelde
6ee64331db
Merge pull request #60527 from KoBeWi/unique_names_demastered 2022-05-02 10:48:27 +02:00
Rémi Verschelde
8835654578 Merge pull request #60656 from akien-mga/tilemap-methods-const-ref-vector2 2022-05-02 09:51:51 +02:00
Rémi Verschelde
e61c4dd787
Merge pull request #60282 from YeldhamDev/backwards_relationships_are_even_harder 2022-05-02 09:49:09 +02:00
smix8
ebcbbec563 Add get_region_rid() to NavigationPolygonInstance and NavigationMeshInstance
Add get_region_rid() to NavigationPolygonInstance and NavigationMeshInstance
2022-04-30 15:54:12 +02:00
Rémi Verschelde
2834332591 TileMap: Use const ref for all Vector2 parameters 2022-04-30 14:05:57 +02:00
Haoyu Qiu
153dc4d57e Backport the new Tween system as SceneTreeTween
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2022-04-29 20:01:12 +08:00
bruvzg
ff381f6e84
Fixed implementation of RTL remove_line()
Co-authored-by: Eric M <itsjusteza@gmail.com>
2022-04-29 10:59:31 +03:00
Rémi Verschelde
73e6b7c145
Merge pull request #60592 from Calinou/styleboxflat-add-skew-3.x 2022-04-28 22:29:56 +02:00
Hugo Locurcio
4b399b2285
Add a Skew property to StyleBoxFlat
This makes it possible to create more aesthetically pleasing
styleboxes for GUI theming, especially in games that have
a futuristic appearance (where skewed buttons and progress bars
are common).
2022-04-28 20:40:01 +02:00