Commit graph

13050 commits

Author SHA1 Message Date
kleonc
edba45ec8b Fix click-selecting Sprites with repeated texture 2023-06-22 16:37:08 +02:00
dinoplane
e11e9d2b9a Use cached saturation for color picker when value is 0 2023-06-21 15:18:20 -07:00
jeana helver
5ec1b698d2
Fix missing enum value for Window.initial_position
Reorder the properties in a possibly more intuitive order.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-06-21 22:39:43 +02:00
Markus Sauermann
890fdd56df Code simplifications
CPPcheck found most of them.

no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects

variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler

same if clause:
- ItemList

clearing an empty bitfield has no effect:
- Viewport
2023-06-21 22:37:26 +02:00
clayjohn
8a5af8183a Add warnings and fallbacks for particles sub emitters when using the GL Compatibility rendering backend
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-06-21 12:56:52 -07:00
Dawid Marzec
9abbdea95e Fix cursor behaviour in Tree while holding CTRL 2023-06-21 20:44:29 +02:00
Rémi Verschelde
ee41b2097c
Merge pull request #78509 from MewPurPur/redraw-code-edit-on-mouse-exit
Hide breakpoint indicator when mouse leaves CodeEdit
2023-06-21 12:43:01 +02:00
MewPurPur
6e182d41f4 Hide breakpoint indicator when mouse leaves CodeEdit 2023-06-21 11:30:40 +02:00
Yuri Sizov
ebd44641c5
Merge pull request #78492 from KoBeWi/too_slow
Update indices after removing custom data layers
2023-06-21 11:19:36 +02:00
Rémi Verschelde
5025d95d41
Merge pull request #69027 from Uxeron/AudioListener2DRotationFix
Fix AudioListener2D ignoring rotation for positional audio
2023-06-21 10:17:37 +02:00
Uxeron
20ceba9e82 Fix AudioListener2D ignoring rotation 2023-06-21 08:10:01 +03:00
kobewi
c1c5b0a435 Update indices after removing custom data layers 2023-06-21 03:12:53 +02:00
Nickolai Korshunov
83f065c0ef Ensure that SceneTree is initialized and finalized at correct time
SceneTree should be fully initialized before any tree operation with any node and finalized only after all nodes exited tree.
2023-06-20 23:47:02 +03:00
Bauke Conijn
47e63bc55f Fix Camera3D project_* methods not accounting for frustum offset
This does not fix Camera3D::project_ray_normal().
Adds Camera3D::get_camera_projection() and exposes it to GDScript
2023-06-20 20:45:50 +02:00
Markus Sauermann
a12627765f Embedded Popups store their safe_rect in their embedder
Storing it in the DisplayServer didn't make sense in this case,
because the embedded window is unknown to the DisplayServer.
2023-06-20 18:06:26 +02:00
Gilles Roudière
c54d407fa5 Fixes TileSet set as local to scene 2023-06-20 17:48:56 +02:00
Rémi Verschelde
159f1ec301
Merge pull request #78398 from Sauermann/fix-immediate-focus-out
Fix that the focus-out notification got sent deferred
2023-06-20 13:14:10 +02:00
Rémi Verschelde
73ac33342f
Merge pull request #78442 from smix8/navmesh_bake_geo_errors_4.x
Fix potential crashes in navmesh bake geometry functions
2023-06-20 09:22:03 +02:00
Rémi Verschelde
94a4da9de6
Merge pull request #78236 from AThousandShips/nine_tex_fix
Make `NinePatchRect` listen to texture changes
2023-06-20 09:21:15 +02:00
Rémi Verschelde
0653f7a5b0
Merge pull request #77722 from ApplecrispEric/drag-drop-autocomplete
Cancel autocomplete after initiating drag
2023-06-20 09:20:52 +02:00
Rémi Verschelde
ca3283b22b
Merge pull request #77278 from davthedev/stylebox-flat-polys-optimize
Remove useless polygons from StyleBoxFlat drawing
2023-06-20 09:20:27 +02:00
Ninni Pipping
4492f7ff97 Make NinePatchRect listen to texture changes 2023-06-20 08:40:35 +02:00
Eric Brown
42bc437615 Changed autocomplete to cancel when the user begins a drag 2023-06-19 15:44:13 -07:00
Rémi Verschelde
217a20a8a0
Merge pull request #78448 from akien-mga/black-23.3.0
CI: Update static checks to black 23.3.0
2023-06-20 00:05:39 +02:00
Rémi Verschelde
75ef6e486c
Merge pull request #77735 from AThousandShips/node_array_fix
Fix export of `Array[Node]`
2023-06-20 00:04:01 +02:00
Rémi Verschelde
243c8e0b40
Merge pull request #77465 from lyuma/ik_skeleton_reference_bug
SkeletonIK3D: Avoid holding hard pointers to Skeleton3D
2023-06-20 00:02:47 +02:00
Rémi Verschelde
e4deaa2727
Merge pull request #76787 from RedworkDE/avoid-localvector-copy
Avoid making unnecessary copies of `LocalVector`
2023-06-20 00:01:55 +02:00
Rémi Verschelde
c9c941e339
CI: Update static checks to black 23.3.0
And apply it to the codebase, removing empty lines at the start of blocks.
2023-06-19 23:33:02 +02:00
Ninni Pipping
bbd4873eea Fix index in loading of Array[Node] 2023-06-19 23:19:38 +02:00
Rémi Verschelde
cce100a840
Merge pull request #75459 from kleonc/node-fix-find-children
Fix recursive `Node.find_children`
2023-06-19 22:33:46 +02:00
smix8
f3a6e04f8b Fix potential crashes in navmesh bake geometry functions
Fixes potential crashes in navmesh geometry functions.
2023-06-19 20:58:36 +02:00
Rémi Verschelde
ea5d02b582
Merge pull request #78438 from smix8/navagent_debug_z__4.x
Fix NavigationAgent2D path debug hidden behind canvas items
2023-06-19 15:51:16 +02:00
smix8
e3f9994d54 Fix NavigationAgent2D path debug hidden behind canvas items
Fixes NavigationAgent2D path debug hidden behind canvas items.
2023-06-19 15:43:35 +02:00
Dominik 'dreamsComeTrue' Jasiński
6e6e296502
Set correct RW locks in AnimatedTexture 2023-06-19 15:21:52 +02:00
Markus Sauermann
8cdab04d7f Fix that the focus-out notification got sent deferred
Currently the window receives a focus-out notification, directly after
it popup, because currently the signal is sent deferred.
The original intention was that the previously focused window must
receive a focus-out notification.
This change makes the notification more precise by only sending the
focus-out to the previously focused window.
2023-06-18 23:06:07 +02:00
Raul Santos
5373b67e2a
Respect returned bool from virtual process methods in SceneTree
SceneTree overrides the virtual `process` and `physics_process` methods
that it inherits from MainLoop. These methods return a boolean that
determines if the main loop should end.
The SceneTree was ignoring the returned boolean, so scripts inheriting
from SceneTree that override these methods and return true didn't exit
the main loop. Now the boolean is checked.
2023-06-18 20:45:58 +02:00
Rémi Verschelde
e125af0d05
Merge pull request #78363 from Sauermann/fix-simplify-acceptdialog
Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`
2023-06-18 16:32:40 +02:00
Rémi Verschelde
d63794d466
Merge pull request #77629 from GameDevLlama/bugifx/issue-50813
Fix non-functional Node3D `top_level` property
2023-06-18 16:30:42 +02:00
Christian Ringshofer
20e8189f5d Fix non functional Node3D op_level property
Fixes #50813.
2023-06-18 15:01:01 +02:00
smix8
ae9dd47d0c Add agent pause mode to NavigationServer
Adds agent pause mode to NavigationServer.
2023-06-18 12:37:03 +02:00
Ninni Pipping
75b355ee99 Add ability to set the tooltip text of a TreeItem button 2023-06-18 11:14:32 +02:00
Markus Sauermann
5b2a5cd2e0 Fix Physics Picking captured Object initialization
Initialize variables when a captured object is known.
2023-06-18 00:45:49 +02:00
Markus Sauermann
7f547fcf09 Fix focusloss of non-exclusive AcceptDialog with close_on_escape
Fix, that a non-exclusive AcceptDialog with `close_on_escape == true`
gets closed, when the parent window of the parent window receives focus.

There is no need to rely on the focus of the parent visible window.
Instead check if the AcceptDialog loses focus.
2023-06-17 11:05:36 +02:00
Rémi Verschelde
1d22e040cb
Merge pull request #78336 from smix8/st_debug_avoidance_hint_4.x
Remove SceneTree debug avoidance hint
2023-06-16 20:16:12 +02:00
smix8
f1d8ddd9bd Remove SceneTree debug avoidance hint
Removes SceneTree debug avoidance hint.
2023-06-16 17:18:47 +02:00
Rémi Verschelde
2d90f66ac1
Merge pull request #78323 from kleonc/tile-compat-transposed-transform-fix
Fix transform for transposed tiles in compatibility mode (from 3.x)
2023-06-16 16:52:51 +02:00
Rémi Verschelde
c65aba7aff
Merge pull request #78321 from ajreckof/fix-wrong-alphabetical-order-in-autocompletion-sorting
Fix wrong order in autocompletion sorting with empty string to complete.
2023-06-16 16:52:27 +02:00
Rémi Verschelde
ce60395b4a
Merge pull request #78293 from Sauermann/fix-button-unpress
Fix ButtonGroup unpressing
2023-06-16 16:52:01 +02:00
ajreckof
e9a2060b27 Fix wrong alphabetical order in autocompletion sorting.
Co-Authored-By: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-06-16 14:04:07 +02:00
kleonc
735e7d67ca Fix transform for transposed tiles in compatibility mode (from 3.x) 2023-06-16 13:31:01 +02:00
Rémi Verschelde
c6d9139f16
Merge pull request #78280 from raulsntos/path-follow-3d-clamp
Clamp `PathFollow3D` progress when not looping
2023-06-16 10:20:43 +02:00
Rémi Verschelde
2ebe692ccc
Merge pull request #78276 from smix8/remove_old_navdebug_materials_4.x
Remove legacy navigation debug materials
2023-06-16 10:20:20 +02:00
Rémi Verschelde
014b395ef3
Merge pull request #78262 from bruvzg/ds_window_focus
[DisplayServer] Add method to check if native window is focused.
2023-06-16 10:19:33 +02:00
Rémi Verschelde
d101244d1b
Merge pull request #74641 from dalexeev/fix-bitfield-enum-warnings
Display `BitField[Enum]` in docs to distinguish from `Enum`
2023-06-16 10:18:46 +02:00
bruvzg
28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
Rémi Verschelde
6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Markus Sauermann
390aa2a565 Fix ButtonGroup unpressing
It was possible to unpress a button group that had `allow_unpress = false`
using shortcuts.
Adjust `BaseButton::shortcut_input` to use the same logic as
`BaseButton::on_action_event`.
2023-06-16 00:15:37 +02:00
Raul Santos
0b4ec4027c
Clamp PathFollow3D progress when not looping 2023-06-15 16:59:14 +02:00
smix8
1b506cd49c Remove legacy navigation debug materials
Removes legacy navigation debug materials.
2023-06-15 16:33:55 +02:00
Danil Alexeev
eb391d3302
Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
Rémi Verschelde
a48285db7b
Merge pull request #78269 from Sauermann/fix-menubutton-popup-position
Fix position and size of MenuButton popup
2023-06-15 16:08:40 +02:00
Rémi Verschelde
95a9089fdd
Merge pull request #74813 from bruvzg/text_edit_autowrap
[TextEdit] Expose all auto-wrap modes.
2023-06-15 16:08:21 +02:00
Markus Sauermann
d41665eb5e Fix position and size of MenuButton popup
Use the same logic as in OptionButton::show_popup
2023-06-15 15:29:50 +02:00
Rémi Verschelde
6587a81910
Merge pull request #78268 from Sauermann/fix-remove-unused-variable
Remove unused variable `PopupMenu::parent_rect`
2023-06-15 15:26:36 +02:00
Rémi Verschelde
f9e0c64905
Merge pull request #78241 from bruvzg/rtl_mt_resize
[RTL] Fix multithreaded resizing.
2023-06-15 15:26:27 +02:00
Markus Sauermann
840e2b14f3 Remove unused variable PopupMenu::parent_rect
This private variable is not read anywhere.
Remove it and all places, where it is set.
2023-06-15 12:08:47 +02:00
smix8
84647ab09e Add NavigationRegion function to change navigation map
Adds NavigationRegion function to change navigation map.
2023-06-15 12:04:57 +02:00
Rémi Verschelde
7734146060
Merge pull request #78256 from Calinou/animatedtexture-fix-property-hint
Fix outdated usage of `or_lesser` in AnimatedTexture property hint
2023-06-15 10:50:53 +02:00
Rémi Verschelde
41b34e3e56
Merge pull request #78240 from KoBeWi/nothing_valid_here,_keep_scrolling
Safe-guard against missing node arrays
2023-06-15 10:50:45 +02:00
Rémi Verschelde
0da20d019e
Merge pull request #77412 from smix8/fix_threaded_navmesh_baking_4.x
Fix for threaded NavigationMesh baking under new thread guards
2023-06-15 10:49:58 +02:00
Rémi Verschelde
b1d3070648
Merge pull request #77175 from smix8/region_refactor_4.x
Refactor NavigationRegion internals
2023-06-15 10:39:53 +02:00
smix8
4c970f1a67 Refactor NavigationRegion internals
Refactors NavigationRegion internals.
2023-06-15 09:52:14 +02:00
Hugo Locurcio
7b4fd528ab
Fix outdated usage of or_lesser in AnimatedTexture property hint
The property hint was renamed to `or_less` in 4.0, so it had no effect.
2023-06-15 07:46:33 +02:00
Hugo Locurcio
f683230a8b
Tweak VehicleBody3D and VehicleWheel3D property hints
These property hints are better aligned with the documentation
and typical use cases, while still allowing values to go outside
those ranges (except for steering, where steering above 180° doesn't
make sense).
2023-06-15 07:45:55 +02:00
bruvzg
cda9cd7587
[RTL] Fix multithreaded resizing. 2023-06-14 23:15:16 +03:00
kobewi
4d4fe94cf0 Safe-guard against missing node arrays 2023-06-14 22:02:39 +02:00
kleonc
77b8e0fcb7 Allow setting negative WorldBoundaryShape2D.distance through the editor 2023-06-14 14:54:00 +02:00
smix8
ee14b010ac Fix for threaded NavigationMesh baking under new thread guards
Fixes threaded NavigationMesh baking under new SceneTree thread guards that blocked the process.
2023-06-14 01:53:37 +02:00
smix8
180a5cded1 Fix cell_height for navigation meshes
Fixes `cell_height` for navigation meshes.
2023-06-13 23:24:32 +02:00
bruvzg
38b8e23206
[RTL] Fix parsing tags with multiple features. 2023-06-13 15:24:30 +03:00
Rémi Verschelde
ad935c4d93
Merge pull request #78172 from smix8/navpoly_cell_size_4.x
Add NavigationPolygon `cell_size` property
2023-06-13 13:53:06 +02:00
Rémi Verschelde
ad85ecef8d
Merge pull request #77750 from RandomShaper/tidy_shader_data_items
Let editor workaround a case of inconsistency in compound scenes
2023-06-13 13:52:51 +02:00
kobewi
06eff95d64 Fix missing UID handling in Dependency Editor 2023-06-13 11:09:56 +02:00
Pedro J. Estébanez
96c469a138 Let editor workaround a case of inconsistency in compound scenes 2023-06-13 11:05:57 +02:00
smix8
9c8626bfd8 Add NavigationPolygon cell_size property
Adds NavigationPolygon cell_size property.
2023-06-13 10:53:07 +02:00
bruvzg
75e6ec8874
[TextEdit] Expose all auto-wrap modes. 2023-06-13 10:28:27 +03:00
Rémi Verschelde
e00e4a8696
Merge pull request #78143 from YuriSizov/particles-fall-far-from-tree
Avoid error spam when (un)pausing GPUParticles out of tree
2023-06-12 22:56:00 +02:00
bruvzg
488626701d
Fix editor log flicker. 2023-06-12 20:15:23 +03:00
Yuri Sizov
991f4d5183 Avoid error spam when (un)pausing GPUParticles out of tree 2023-06-12 18:18:51 +02:00
Rémi Verschelde
e208cdb170
Merge pull request #78081 from smix8/obstacle_api_update_4.x
Update NavigationObstacle API
2023-06-12 17:10:28 +02:00
Rémi Verschelde
fa536571a4
Merge pull request #77667 from RedworkDE/text-edit-selection-crash
Fix crash when selecting lines in text edit
2023-06-12 17:10:04 +02:00
Rémi Verschelde
c3e5e4ed4b
Merge pull request #68599 from Rindbee/update-edited_scene_root-in-time
Update the edit scene root in time after it is replaced
2023-06-12 17:08:50 +02:00
Rindbee
eb74079dfb Update the edit scene root in time after it is replaced
When changing the type of the edited scene root node, it may be necessary
to update edited scene root in time for the child nodes to work properly.
2023-06-12 21:49:30 +08:00
smix8
c1fc331b88 Update navigation obstacle API
Updates navigation obstacle API.
2023-06-12 14:26:45 +02:00
Rémi Verschelde
b02dd1c2a3
Merge pull request #78092 from KoBeWi/must_protecc_selection
Preserve selection when focusing SpinBox
2023-06-12 14:14:44 +02:00
Rémi Verschelde
1b5620d2a9
Merge pull request #78009 from YuriSizov/gui-gently-massage-minimal-size
Ensure that controls update all their sizing information when required
2023-06-12 14:14:20 +02:00
Rémi Verschelde
9fca498647
Merge pull request #78110 from Sauermann/fix-nofocus-focus
Fix Tooltip getting removed instantly in embedded Window
2023-06-12 11:55:58 +02:00
Rémi Verschelde
9fdce6635b
Merge pull request #77880 from AThousandShips/get_node_fix
Use `get_node_or_null` when null checks are present
2023-06-12 11:39:54 +02:00
dinoplane
a374c7d519
Use cached hue for color picker when saturation is 0
Fixes #76968.
2023-06-12 10:59:33 +02:00
Markus Sauermann
9d40f99290 Fix Tooltip getting removed instantly in embedded Window
Tooltips are unfocusable Windows. This case was not handled correctly in
`Viewport::_sub_window_register`.
2023-06-11 12:22:59 +02:00
kobewi
e22319ced3 Use S, V in hue bar of ColorPicker 2023-06-11 01:37:29 +02:00
kobewi
968c5f6247 Preserve selection when focusing SpinBox 2023-06-10 21:29:24 +02:00
Ninni Pipping
0c16082e1e Use get_node_or_null when null checks are present
Avoids duplicate or unnecessary errors
2023-06-10 13:22:56 +02:00
Rémi Verschelde
37d1dfef9d
Merge pull request #78000 from RandomShaper/let_users_mess_up
Let user scripts disable thread safety checks
2023-06-10 12:12:13 +02:00
Rémi Verschelde
65969dd51a
Merge pull request #77945 from AThousandShips/null_check
Use NULL instead of COND checks when appropriate
2023-06-10 12:11:48 +02:00
Rémi Verschelde
fe0ee24533
Merge pull request #77779 from KoBeWi/emit_changed()
Use `emit_changed()` consistently
2023-06-10 12:11:25 +02:00
Markus Sauermann
37a96d3957 Fix that _drop_physics_mouseover only happens when necessary
Previously the call was executed every time, because in the
`_drop_mouse_over();` a few lines above, `gui.mouse_over = nullptr;`
was set.
2023-06-10 09:33:16 +02:00
Ninni Pipping
dcd2b883eb Use NULL instead of COND checks when appropriate
Restricted to scene
2023-06-10 08:56:30 +02:00
Pedro J. Estébanez
2b001db76e Let user scripts disable thread safety checks 2023-06-09 18:24:01 +02:00
Rémi Verschelde
8acf6b41a4
Merge pull request #77209 from Rindbee/ViewportTexture-not-change-RID
Don't change `RID` when changing `viewport_path` in `ViewportTexture`
2023-06-09 15:10:39 +02:00
Rindbee
7532b2d259 Don't change RID when changing viewport_path in ViewportTexture
When changing `viewport_path`, the `proxy`'s target is changed to a new placeholder.

Add a flag `vp_changed` to prevent calling `setup_local_to_scene` (mainly called by toggling `resource_local_to_scene`) when the target viewport has not changed.
2023-06-09 19:50:26 +08:00
Rémi Verschelde
300748e52c
Merge pull request #78044 from RandomShaper/fix_node_prio_ignored
Fix node idle process priority being ignored
2023-06-09 13:45:15 +02:00
Rémi Verschelde
2a8e83ccad
Merge pull request #78017 from Sauermann/fix-physics-passive-hovering
Fix passive mouse hovering for physics
2023-06-09 13:44:05 +02:00
Pedro J. Estébanez
8bbc713ebf Fix node idle process priority being ignored 2023-06-09 13:05:07 +02:00
Markus Sauermann
543fdc1490 Fix passive mouse hovering for physics
Currently mouse hovering doesn't update the state, when collision objects
or the camera move.
This PR fixes this problem by taking the mouse position from the viewport
and not from a nonexistent previous event.

Since previous events could potentially be a long time ago, their
modifier-key state might be outdated. This PR fetches the current
status of modifier-keys from `Input`.

These changes allow the removal of some class-variables and making
additional simplifications.
2023-06-09 12:51:10 +02:00
Rémi Verschelde
0cee1e0d4f
Merge pull request #77923 from Sauermann/fix-mouse-position-with-screen-transform
Fix mouse position with screen transform
2023-06-09 12:15:56 +02:00
Rémi Verschelde
4d05edd75d
Merge pull request #77901 from bruvzg/rtl_canvas
Fix incorrect node placement in RTL layout when parent is non-Control canvas item.
2023-06-09 12:15:32 +02:00
Rémi Verschelde
37fc598ee1
Merge pull request #77899 from bruvzg/emb_center
Use initial position property for embedded windows to center on parent window.
2023-06-09 12:15:07 +02:00
bruvzg
b23f259e67
[Label] Add support for tab stops. 2023-06-09 12:59:37 +03:00
Markus Sauermann
d1fa284e65 Fix mouse position with screen transform
When a Viewport is not directly attached to the screen, the
function `Viewport::get_mouse_position` can't rely on
`get_screen_transform`, because that function is ambiguous in
these situations.
In these cases it is necessary to use the mouse position from
the most recent mouse IputEvent.
2023-06-09 11:29:43 +02:00
Rémi Verschelde
da68c707f2
Merge pull request #78025 from lyuma/skeleton3d_rest_dirty
Skeleton3D: Only reset rest_dirty after ALL bone transforms have finished update
2023-06-09 11:07:42 +02:00
Rémi Verschelde
082cfd501a
Merge pull request #78021 from clayjohn/Particles-size-rot-reset
Correctly reset particle size and rotation in ParticlesProcessMaterial
2023-06-09 11:07:13 +02:00
Rémi Verschelde
fd2f33942b
Merge pull request #78019 from Sauermann/fix-remove-child-inconsistency
Fix parent inconsistency in `Node::remove_child`
2023-06-09 11:06:49 +02:00
Rémi Verschelde
b083c1dbf5
Merge pull request #78005 from Sauermann/fix-some-simplifications
Some code simplifications
2023-06-09 11:06:26 +02:00
Rémi Verschelde
166643df32
Merge pull request #74937 from bitsawer/fix_uniform_storage
Fix shader uniform storage conversions and crash
2023-06-09 11:04:16 +02:00
Lyuma
c567d46a2f Skeleton3D: Only reset rest_dirty after ALL bone transforms have finished update 2023-06-08 19:23:14 -07:00
Raffaele Picca
353a4e1e09 Correctly reset particle size and rotation in ParticlesProcessMaterial
Co-authored-by: clayjhn <claynjohn@gmail.com>
2023-06-08 14:39:14 -07:00
Markus Sauermann
7561e176e8 Fix parent inconsistency in Node::remove_child
`NOTIFICATION_CHILD_ORDER_CHANGED` could be triggered, while there
was an inconsistent state:
- parent node no longer had child listed as child
- child node still had parent node listed as parent

Bring these two in sync, before emitting the notification.
2023-06-08 22:51:07 +02:00
Rémi Verschelde
e188d61922
Merge pull request #78010 from Sauermann/fix-parameter-order
Fix `CanvasItem::draw_string_outline` parameter order
2023-06-08 19:41:56 +02:00
Rémi Verschelde
1e39eb0711
Merge pull request #78007 from kdiduk/fix_add_triangle_fan
Fix parameters passing to `add_triangle_fan` method.
2023-06-08 19:41:53 +02:00
Markus Sauermann
302a10e809 Fix CanvasItem::draw_string_outline parameter order
Switch `p_font_size` with `p_size` in header, because in all
other locations, `p_font_size` comes before `p_size`.
2023-06-08 18:15:38 +02:00
Rémi Verschelde
577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Kirill Diduk
566f78bc1e Fix parameters passing to add_triangle_fan method.
Pass `p_uvs` parameter properly (instead of passing `p_uv2s` twice).

This commit fixes #77542
2023-06-08 17:45:26 +02:00
Yuri Sizov
ccaab0e590 Ensure that controls update all their sizing information when required 2023-06-08 17:41:03 +02:00
Rémi Verschelde
3a19d81691
Merge pull request #77842 from Sauermann/fix-unfocusable-subwindow
Fix input handling for unfocusable embedded windows
2023-06-08 17:38:33 +02:00
Markus Sauermann
5ddab1f363 Some code simplifications
AnimationNodeBlendSpace2DEditor:
- `!tree` is always false, because it is checked a few lines above

CurveEdit:
- grabbing != GRAB_NONE is redundant

GradientTexture2DEdit:
- grabbed != HANDLE_FROM is redundant
- grabbed != HANDLE_TO is redundant

Viewport:
- index is not used afterwards
- In these cases `gui.mouse_focus` is always valid. Move check to a DEV_ASSERT
- simplify `stopped` calculation
2023-06-08 16:15:22 +02:00
Rémi Verschelde
a440f0d2d7
Merge pull request #77971 from aaronfranke/col-shape-obj-name
Internally rename `parent` to `collision_object` in CollisionShape(2D/3D)
2023-06-08 09:11:30 +02:00
Rémi Verschelde
fad61679cc
Merge pull request #77969 from clayjohn/Material-ORM-key
Hash ORM flag in BaseMaterial to differentiate between ORM and Standard materials
2023-06-08 09:11:06 +02:00
Rémi Verschelde
42e4c41e77
Merge pull request #77888 from Calinou/node-improve-thread-guard-errors
Display the node path in Node thread guard errors
2023-06-08 09:10:18 +02:00
Aaron Franke
ec09cff7f3
Internally rename parent to collision_object in CollisionShape(2D/3D) 2023-06-07 12:02:27 -05:00
clayjohn
86550ea3c5 Hash ORM flag in BaseMaterial to differentiate between ORM and Standard materials 2023-06-07 09:31:34 -07:00
Rémi Verschelde
803ad98303
Merge pull request #77958 from Calinou/editor-particle-damping-increase-step-precision
Increase precision in particle damping properties in the editor
2023-06-07 16:06:59 +02:00
Hugo Locurcio
bd468cdec7
Display the node path or name in Node thread guard errors
This makes it easier to diagnose which node is the source of the issue.
2023-06-07 16:06:53 +02:00
Rémi Verschelde
27b402bf73
Merge pull request #77902 from dalexeev/doc-unify-deprecations
Documentation: Unify deprecations
2023-06-07 16:06:50 +02:00
Danil Alexeev
b433020aa6
Documentation: Unify deprecations 2023-06-07 16:34:03 +03:00
Hugo Locurcio
fc4ec42a09
Increase precision in particle damping properties in the editor 2023-06-07 15:26:02 +02:00
Rémi Verschelde
ea6a141fff
Merge pull request #77939 from MewPurPur/optimize-default-theme-svg
Optimize and fix the default theme SVGs
2023-06-07 13:32:01 +02:00
Rémi Verschelde
bd9b24d391
Merge pull request #77933 from KoBeWi/do_not_the_tooltip
Cancel tooltip when mouse leaves viewport
2023-06-07 11:02:16 +02:00
Rémi Verschelde
bd62d8ee10
Merge pull request #77802 from dalexeev/tree-add-autowrap-mode
Tree: Add ability to configure text autowrap mode for individual cells
2023-06-07 11:02:02 +02:00
VolTer
995880e60b Optimize and fix the default theme SVGs 2023-06-07 05:40:58 +02:00
kobewi
807431c49a Cancel tooltip when mouse leaves viewport 2023-06-07 00:56:36 +02:00
Yuri Sizov
df26066ce9 Revert "Make sure that data.last_minimum_size is consistent with get_combined_minimum_size() at the same time"
This reverts commit 594852caf1.
2023-06-06 20:55:03 +02:00
Rémi Verschelde
2a1bc05901
Merge pull request #77469 from lyuma/skeleton_ik_roll_fix
Fix for SkeletonIK3D interpolation and bone roll
2023-06-06 20:39:46 +02:00
Rémi Verschelde
46c4068821
Merge pull request #77170 from lawnjelly/scu_build_master
Add support for single compilation unit builds
2023-06-06 17:58:09 +02:00
Markus Sauermann
f00f4a0209 Fix input handling of unfocusable embedded Windows
InputEvents get in some cases sent to the wrong Window.
fix `Viewport::_sub_windows_forward_input`- console error spam
2023-06-06 17:51:19 +02:00
lawnjelly
b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Rakka Rage
6dbae30000 Add tile_animation_mode option:
- to tile animation properties
- when "Default" each animation starts at time 0.
- when "Random Start Times" each animation starts at random time.
2023-06-06 09:31:18 -04:00
Yuri Sizov
b99a02387d
Merge pull request #77856 from kinami-imai/videostreamplayer_seamless_loop
Fix VideoStreamPlayer seamless loop
2023-06-06 12:36:48 +02:00
Yuri Sizov
2e728e02cc
Merge pull request #77763 from RedworkDE/warning-dialog-crash
Prevent crashes when removing Viewport from scene tree in event handler
2023-06-06 12:19:25 +02:00
bruvzg
66ea0006e0
Fix incorrect node placement in RTL layout when parent is non-Control canvas item. 2023-06-06 11:49:05 +03:00
bruvzg
e5b312a1e8
Use initial position property for embedded windows to center on parent window. 2023-06-06 09:29:13 +03:00
Lyuma
9aa46bf3f5 Fix for SkeletonIK3D interpolation and bone roll
Fix bug in internal Basis::rotate_to_align function (also used with identity Basis in scene/resources/curve.cpp)
Use ChainItem children rather than local bone rest to determine IK bone roll to match Godot 3.x behavior
2023-06-05 20:44:45 -07:00
今井きなみ
15719e278b Add loop property to VideoStreamPlayer 2023-06-05 21:37:11 +02:00
今井きなみ
e3da9176a0 Expose VideoStreamPlayer video length 2023-06-05 21:30:38 +02:00
今井きなみ
270bc93b95 Fix VideoStreamPlayer seamless loop 2023-06-05 21:17:48 +02:00
Hugo Locurcio
70e6c3cbb0
Add a [pulse] built-in effect to RichTextLabel
In games, blinking text is one of the more frequently used animations.
It can be (sparingly) used to bring attention to important messages
in a chat log or inventory tooltip, for instance.

This effect accepts the following options:

- `freq`: How fast text blinks (higher is faster).
- `color`: The target color multiplier for blinking.
  The default mostly fades out text, but not entirely (for better accessibility).
- `ease`: The easing function exponent to use.
  Negative values provide in-out easing, which is why `-2.0` is the default.
2023-06-05 18:45:00 +02:00
Rémi Verschelde
e7d2e49688
Merge pull request #77765 from Sauermann/fix-acceptdialog-event-handled
Fix that button presses don't set event as handled in AcceptDialog
2023-06-05 18:27:33 +02:00
Rémi Verschelde
d046c5099a
Merge pull request #77874 from detomon/clear-bone-name-index-after-clear-bones
Fix adding bones with the same name after calling `Skeleton3D.clear_bones()`
2023-06-05 18:05:06 +02:00
Rémi Verschelde
f00c971b81
Merge pull request #63168 from Levrault/master
Fix: InputEventJoypadMotion should trigger only once on a vslider
2023-06-05 18:04:39 +02:00
Luc-Frédéric Langis
166ca77f20 feat(gamepad): improve gamepad behavior with slider and popup_menu 2023-06-05 10:20:46 -04:00
Rémi Verschelde
85c908654c
Merge pull request #77867 from Sauermann/revert-move-child-update
Don't update mouse cursor state on child order changed
2023-06-05 13:43:11 +02:00
Rémi Verschelde
d7a0170971
Merge pull request #77757 from aaronfranke/fix-spinbox-remove-crash
Fix crash when removing SpinBox during text submit
2023-06-05 13:42:50 +02:00
detomon
ea80213eee Fix adding bones with the same name after calling Skeleton3D.clear_bones() 2023-06-05 11:55:09 +02:00
Markus Sauermann
15ee292664 Don't update mouse cursor state on child order changed
Partially Revert "Create a virtual mouse move event after moving child nodes"
This reverts parts of commit ce10ca6979.

The problem was that the the mouse-move event interacted in unexpected ways.
2023-06-05 10:28:55 +02:00
RedworkDE
c4db212870 Prevent crashes when removing Viewport from scene tree in event handler 2023-06-03 23:37:31 +02:00
Danil Alexeev
010829f962
Tree: Add ability to configure text autowrap mode for individual cells 2023-06-03 15:17:35 +03:00
kobewi
5b85dabcc8 Use emit_changed() consistently 2023-06-02 22:45:18 +02:00
Aaron Franke
8b42297d7c
Make Viewport::gui_get_focus_owner const 2023-06-02 12:36:10 -05:00
Aaron Franke
d3e4db4a7b
Fix crash when removing SpinBox during text submit 2023-06-02 10:29:22 -05:00
JoNax97
b998f7ceb7 Gradient: Check if interpolation mode and color space are different before firing notifications. 2023-06-02 10:40:13 -03:00
Yuri Sizov
ca1b4eb225
Merge pull request #77651 from Rindbee/fix-update-minimum-size
Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time
2023-06-02 14:02:04 +02:00
Yuri Sizov
6a1d3198d1
Merge pull request #76854 from CapitaineCookie/fix-change-type
Fix crash when changing node type from PopupMenu to ItemList
2023-06-02 13:03:55 +02:00
João Pedro Braz
670b7bec9a Add the "inner_item_margin" Theme constant to the Tree control
This PR adds the "inner_item_margin" Theme constant to the Tree Control.
It behaves like a horizontal padding (in CSS), but only in the active
writing direction (So on LTR it'll apply a left padding and on RTL right
padding).

The Editor Theme has been updated to make use of this and a result items
in Trees and ItemLists no longer "hugs" their border, expressing a proper
spacing instead.
2023-06-02 11:32:40 +02:00
Markus Sauermann
dc434ef849 Fix that button presses don't set event as handled in AcceptDialog 2023-06-02 11:06:41 +02:00
Pedro J. Estébanez
4412c1d989 Fix external resource ids lost 2023-06-01 22:34:49 +02:00
Rémi Verschelde
2e273f0e35
Merge pull request #77724 from RandomShaper/remove_red_th_cond
Remove redundant check from thread guards
2023-06-01 15:52:16 +02:00
Rindbee
594852caf1 Make sure that data.last_minimum_size is consistent with get_combined_minimum_size() at the same time
Move the code for switching `data.minimum_size_valid` in `Control::update_minimum_size()`
to `Control::_update_minimum_size()`, make sure to switch `data.minimum_size_valid` to
`false` only before updating `data.last_minimum_size` , so that it will remain consistent
with `get_combined_minimum_size()`.
2023-06-01 19:02:42 +08:00
Pedro J. Estébanez
8c288918a0 Remove redundant check from thread guards 2023-06-01 11:08:14 +02:00
Rémi Verschelde
d998323ab4
Merge pull request #77452 from Sauermann/fix-deprecate-push-unhandled-input
Deprecate push_unhandled_input
2023-06-01 00:40:44 +02:00
Rémi Verschelde
f77dee90a6
Merge pull request #76389 from ajreckof/editor-property-nodepath-for-node
Fix typed array export
2023-06-01 00:40:40 +02:00
Markus Sauermann
6d490ce8de Deprecate push_unhandled_input
The functionality of `push_unhandled_input` has changed so that it no
longer propagates input events to SubViewports.
This makes it less predictable and it should be deprecated in favor of
`push_input` which provides the same functionality and more.

Also this deprecation simplifies the Viewport-API by reducing the methods
for pushing input events, so that users don't need to worry about when
to use which function in order to insert input events.
2023-05-31 19:07:04 +02:00
Yuri Sizov
c3e512eda4
Merge pull request #77692 from RandomShaper/fix_th_material_load
Fix materials' shaders not updated if loaded on a non-main thread
2023-05-31 14:35:05 +02:00
Yuri Sizov
5598fec7c0
Merge pull request #77446 from YuriSizov/gui-treeitem-add-child
Implement `TreeItem.add_child`
2023-05-31 13:02:19 +02:00
Pedro J. Estébanez
197b54370a Fix materials' shaders not updated if loaded on a non-main thread 2023-05-31 12:50:27 +02:00
Yuri Sizov
943e5b9019
Merge pull request #77631 from KdotJPG/issue-77491-fix-turbulence-noise-scale
Fix `turbulence_noise_scale` for Particle Turbulence
2023-05-31 12:49:49 +02:00
Yuri Sizov
3ed7bdc26f Implement TreeItem.add_child 2023-05-31 11:36:23 +02:00
KdotJPG
9332a091e1 Fix turbulence_noise_scale regression.
Fixes #77491
2023-05-30 23:58:01 -04:00
RedworkDE
6b7008b73b Fix crash when selecting lines in text edit 2023-05-30 20:32:44 +02:00
Yuri Sizov
c0ee762f46
Merge pull request #77655 from bitsawer/fix_strange_fragments
Fix suspicious code related to text rendering
2023-05-30 16:03:44 +02:00
Yuri Sizov
6dd5ccdedd
Merge pull request #66625 from Sauermann/fix-move-child-update
Create a virtual mouse move event after moving child nodes in tree
2023-05-30 15:57:21 +02:00