Commit Graph

12233 Commits

Author SHA1 Message Date
Rémi Verschelde 44ad635505
Merge pull request #73261 from smix8/fix_tilemap_invalid_rid_error_4.x
Fix TileMap NavigationServer 'Invalid ID' error
2023-02-14 11:05:05 +01:00
bruvzg 39b69e6f76
[Editor] Fix editor progress dialog auto closing on ESC press, and on application focus loss. 2023-02-14 09:23:40 +02:00
smix8 fef6ffabe5 Fix TileMap NavigationServer 'Invalid ID' error
Fixes NavigationServer 'Invalid ID' error of the TileMap.
The issue was not caused directly by the TileMap but with the late call to get_world_2d()->get_navigation_map() while everything is shut down abruptly e.g. game window closed or Editor "Reload Saved Scene" function.
2023-02-14 01:39:21 +01:00
Hugo Locurcio 8b1de103a8
Clamp Decal size to positive values
This prevents using negative size, while also preventing
error messages from being spammed if one of the decal's dimensions
is set to exactly 0.
2023-02-13 22:01:49 +01:00
QbieShay 7881422901 make particle billboard take into account non-uniform scale 2023-02-13 21:18:55 +01:00
bruvzg a000c64eea
Cleanup Window callbacks before destroying in to avoid callback calls with invalid object. 2023-02-13 20:39:17 +02:00
Pedro J. Estébanez 3ccabee9ae Fix blank non-autowrapping labels 2023-02-13 18:46:56 +01:00
Rémi Verschelde 848c910227
Merge pull request #73018 from smix8/fix_multilayered_tilemap_navigation_4.x
Fix navigation support for multilayered TileMaps
2023-02-13 12:58:39 +01:00
Rémi Verschelde c144919a74
Merge pull request #73208 from smix8/fix_navigationregion2d_debug_4.x
Fix 2D navigation debug visuals ignoring half the ProjectSettings
2023-02-13 12:58:09 +01:00
Rémi Verschelde 98d5e0b72f
Merge pull request #73191 from KoBeWi/some_color_picker_stuff
Fix HSV Rectangle Wheel values
2023-02-13 12:56:32 +01:00
smix8 2b19c70664 Fix 2D navigation debug visuals ignoring half the ProjectSettings
Fixes that NavigationRegion2D and TileMap debug visuals ignored more or less half the ProjectSetting. E.g. random color could not be disabled, edges did not display.
2023-02-13 11:42:23 +01:00
Rémi Verschelde b7723a01d9
Merge pull request #66745 from EricEzaM/66453-popupmenu-shortcut-shape-fix
Ensure PopupMenu item is shaped when the shortcut is set.
2023-02-13 09:29:41 +01:00
Rémi Verschelde a90bbc3544
Merge pull request #72225 from MinusKube/shaped_text_invalidated_bug
Mark dirty flags when shaped texts are invalidated
2023-02-13 09:13:27 +01:00
Rémi Verschelde 428bf1188d
Merge pull request #72387 from RandomShaper/avoid_infinite_2
Enhance label sizing algorithm (a.k.a. prevent infinite GUI re-layout)
2023-02-13 09:13:00 +01:00
Silc Renew ae5dadc8d1 Refactor NodeTransition/OneShot to handle seek/filter correctly 2023-02-13 10:04:51 +09:00
kobewi 3542d24fda Fix HSV Rectangle Wheel values 2023-02-13 01:18:44 +01:00
kobewi 17fe5c2b23 Fix tween_method() type validation 2023-02-12 22:08:25 +01:00
Rémi Verschelde 77b415ab6d
Fix SurfaceTool crash with invalid bone/weight count
Fixes #53191.
2023-02-12 14:14:03 +01:00
Rémi Verschelde de31545f64
Merge pull request #73137 from Geometror/graphedit-hotzone-snapping-fix
Fix GraphEdit port hotzone snapping
2023-02-12 10:43:25 +01:00
Rémi Verschelde c3a04f71fd
Merge pull request #73136 from clayjohn/LightmapGI-exr
Set Default compression to VRAM uncompressed for LightmapGI
2023-02-12 10:35:58 +01:00
Hendrik Brucker 3aab79914c Fix GraphEdit port hotzone snapping 2023-02-12 01:31:58 +01:00
clayjohn 340c3b84fd Set Default compression to VRAM uncompressed for LightmapGI
This increases the speed to be near instant and removes the perceived lightmap bake speed regression

We need to investigate the speed and quality issues with BPTC and re-enable compression when we can
2023-02-11 16:26:09 -08:00
Rémi Verschelde 9075d5e932
Merge pull request #73120 from TokageItLab/fix-transition-reset-fade
Fix remaining fade doesn't clear when reset in AnimationNodeTransition
2023-02-11 22:03:35 +01:00
Silc Renew 7bf83a8603 Fix NodeOneShot fade-out doesn't blend animations correctly 2023-02-12 04:32:40 +09:00
Silc Renew 2a0beb1ef3 Fix remaining fade doesn't clear when reset in AnimationNodeTransition 2023-02-12 04:12:15 +09:00
Rémi Verschelde beab9a7cf2
Merge pull request #73069 from brianwinterpixel/bugfix/linebuilder_box_uvs
Fix Line2D UVs when using BOX end cap mode
2023-02-11 14:40:09 +01:00
Rémi Verschelde ab2952580c
Merge pull request #73040 from Rindbee/popup_centered_consider_current_size
Calling popup_center* with the default size will use the current size
2023-02-11 14:37:54 +01:00
Rémi Verschelde 38d7583f86
Merge pull request #73063 from KoBeWi/it_exited_the_tree_but_changed_its_mind_and_broke_instead
Fix camera reparenting
2023-02-11 14:36:41 +01:00
Rémi Verschelde f7c177b972
Merge pull request #73083 from timothyqiu/nav-agent-debug-properties
Strip name prefix of navigation agent debug properties in the inspector
2023-02-11 14:36:17 +01:00
Rindbee 593598c592 Calling popup_center* with the default size will use the current size 2023-02-11 18:53:53 +08:00
Haoyu Qiu 65223e98de Strip name prefix of navigation agent debug properties in the inspector 2023-02-11 16:34:08 +08:00
Aaron Franke be916233f9
Check for CanvasItem instead of Control and Node2D 2023-02-11 02:18:10 -06:00
Brian Semrau 53b4d85072 Fix Line2D UVs when using BOX end cap mode 2023-02-10 20:44:39 -05:00
kobewi 3f31c64300 Fix camera reparenting 2023-02-10 23:46:55 +01:00
smix8 f2c31965c0 Fix navigation support for multilayered TileMaps
Fixes support for multilayered TileMaps by creating dedicated navigation maps for each layer.
2023-02-10 17:13:40 +01:00
Rémi Verschelde cac4cda89b
Merge pull request #73024 from TokageItLab/fix-transtition-first-frame
Fix broken first frame of `NodeTransition`/`NodeOneShot` when xfade is 0
2023-02-10 15:08:34 +01:00
Rémi Verschelde 008cafc103
Merge pull request #72378 from maximkulkin/line-edit-consume-events
Fix LineEdit not consuming events
2023-02-10 15:08:28 +01:00
Rémi Verschelde 29d89caafe
Merge pull request #72714 from DarkMessiah/fix-unlimited-text-in-tree
Fix unlimited text rendering in Tree if width <= 0
2023-02-10 15:07:18 +01:00
Rémi Verschelde 97afa41da3
Merge pull request #73000 from Sauermann/fix-editor-viewport-size-zero-crash
Fix crash in editor when setting `SubViewport.size` to zero
2023-02-10 15:06:57 +01:00
Haoyu Qiu 26581ca574 Add some missing translatable editor strings 2023-02-10 16:55:50 +08:00
Silc Renew 836d62f0c6 Fix broken first frame of NodeTransition/NodeOneShot when xfade is 0 2023-02-10 13:57:11 +09:00
Markus Sauermann d249370cd7 Fix crash in editor when setting `SubViewport.size` to zero
`Viewport::_set_size` now verifies, that the minimum size is at least 2x2.
Also fix `RendererViewport::viewport_set_size` fail condition.
2023-02-10 00:25:45 +01:00
Rémi Verschelde 929ee61170
Merge pull request #72931 from TokageItLab/improve-root-motion-for-rot-and-pos
Add root motion accumulator to fix broken RootMotionView
2023-02-09 23:43:08 +01:00
Markus Sauermann 88f4e5cc94 Fix that `popup_centered` didn't take the window's size into consideration 2023-02-09 22:05:39 +01:00
Silc Renew 7b18ad7d98 Add root motion accumulator to fix broken RootMotionView 2023-02-10 01:22:00 +09:00
Rémi Verschelde 5c1295dc20
Merge pull request #72884 from groud/fix_trackpad_viewpanner
Fix panning via InputEventPanGesture
2023-02-09 16:44:56 +01:00
Rémi Verschelde b12bf7ff02
Merge pull request #69550 from Rindbee/fix-script-editor-not-reload-via-lsp
Fix internal editor not updating when using external editor via LSP
2023-02-09 14:01:33 +01:00
Haoyu Qiu a40ccc2d7e Improve some editor strings for localization 2023-02-09 19:32:02 +08:00
Rémi Verschelde d69809cab6
Merge pull request #72947 from DarkKilauea/nav-fix-avoidance-callback
Fix missing avoidance updates when using same velocity
2023-02-09 10:13:35 +01:00
Rémi Verschelde edae21f3aa
Merge pull request #72897 from Geometror/graphedit-set-deprecated
Update configuration warning for `GraphEdit` and mark it as experimental
2023-02-09 09:29:27 +01:00
Rémi Verschelde ea274af71a
Merge pull request #72922 from smix8/fix_debug_binding_rb_4.x
Fix NavigationAgent debug functions bindings in release builds
2023-02-09 09:28:38 +01:00
Josh Jones 097f8a5fdb Fix missing avoidance updates when using same velocity
When using avoidance, if you set the same velocity for the agent, you won't get an update from the avoidance system.

This changes both the `set_target_position` and `set_velocity` setters to always accept user provided values, even if they are the same. This ensures that repathing and avoidance logic is always run when the user expects.
2023-02-08 23:18:53 -08:00
Hendrik Brucker 4601acbaf4 Update GraphEdit configuration warning, mark GraphNode/GraphEdit as experimental 2023-02-09 02:39:55 +01:00
Markus Sauermann 888add8418 Fix Color Picking
With the 4.x-introduction of Windows the previous method for
color picking was no longer working.

This PR uses the following approach to reintroduce color-picking.
When the Color-Picking-Button is pressed, a quasi-screenshot of the
Window-content is created and displayed in a new Popup-Window.
This new Window allows selecting colors by Mouse-Click.
A Preview of the targeted Color is also displayed.
2023-02-09 01:00:54 +01:00
clayjohn 04a9933f2e Mark fma function as high end so it isn't used with the gl_compatibility renderer 2023-02-08 12:56:15 -08:00
smix8 820b841fcb Fix NavigationAgent debug functions bindings in release builds
Fixes that certain NavigationAgent debug functions bindings were not available in release builds.
2023-02-08 21:49:04 +01:00
Gilles Roudière ca4bc8de81 Fix panning via InputEventPanGesture
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-02-08 12:01:20 +01:00
Danil Alexeev b8eda519d0
Optimize `draw_dashed_line()` and `draw_rect()` 2023-02-08 10:44:12 +03:00
Rémi Verschelde 929333fe26
Merge pull request #62179 from Rindbee/fix-popup_center-off-center
Use min_size/max_size to limit window size and position while popup center
2023-02-07 16:30:41 +01:00
Rémi Verschelde 743e26d4f9
Merge pull request #72829 from Sauermann/fix-code-simplifications
Some code simplifications
2023-02-07 16:30:22 +01:00
Rémi Verschelde 7ebd8b502d
Merge pull request #71768 from Sauermann/fix-vp-mouse-position
Fix Viewport::get_mouse_position for SubViewports
2023-02-07 16:30:13 +01:00
Markus Sauermann 826e54fa73 Some code simplifications
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
2023-02-07 14:30:16 +01:00
Rindbee c73844f117 Use min_size/max_size to limit the window size and the position while popup center 2023-02-07 21:28:26 +08:00
kobewi 095c805079 Fix sub-resource IDs resetting when preloaded 2023-02-07 14:13:22 +01:00
Markus Sauermann 5312d83f3b Fix Viewport::get_mouse_position for SubViewports
SubViewports don't have a cached mouse position available.
This PR calculates the mouse position from the screen position of
the mouse cursor.
2023-02-07 13:54:47 +01:00
Rémi Verschelde 3f02cf7ced
Merge pull request #72722 from TokageItLab/animtree-map
Fix AnimationNodeTransition initialization and AnimationNode remapping method
2023-02-07 08:36:00 +01:00
Rémi Verschelde cd0f1e9b10
Merge pull request #72740 from Sauermann/fix-event-device-id
Fix mouse/drag/touch InputEvents having no device id
2023-02-06 23:51:26 +01:00
Rémi Verschelde bea2dea15d
Merge pull request #71677 from Sauermann/fix-emulate-touch-passthrough
Fix MOUSE_FILTER_STOP not affecting emulated mouse events
2023-02-06 22:52:01 +01:00
Rémi Verschelde fe2cd2e6b1
Merge pull request #72770 from Kabiirk/Control-has-point-doc-update
Fix description and argument name in `Control._has_point`
2023-02-06 22:50:47 +01:00
Markus Sauermann 8748f4dcaa Fix mouse/drag/touch InputEvents having no device id
Some internally created emulated/instantiated events didn't have a
device id. This PR sets for these cases a device id.

Also rename `DEVICE_ID_TOUCH_MOUSE` to the more generic
`DEVICE_ID_EMULATION`.
2023-02-06 22:49:42 +01:00
Rémi Verschelde e0619a658e
Merge pull request #69185 from Sauermann/fix-optionpopup-screentransform
Fix Screen-Transform missing in Button Size in OptionButton::show_popup
2023-02-06 22:49:34 +01:00
Markus Sauermann 262d84fa90 Fix MOUSE_FILTER_STOP not affecting emulated mouse events
Touch and Drag events are now stopped by MOUSE_FILTER_STOP
2023-02-06 22:31:03 +01:00
Kabiir 17ee6fcf03 Fix description and argument name in Control._has_point 2023-02-07 02:29:28 +05:30
Yuri Sizov 5964e4c202
Merge pull request #72727 from TokageItLab/fix-audio-retrieve
Fixed animation audio to play considering time when seeking
2023-02-06 23:15:48 +03:00
Markus Sauermann 084a4addc4 Fix Screen-Transform missing in Button Size in OptionButton::show_popup
The button size is affected by the screen transform, which was previously
not taken into consideration.
2023-02-06 20:58:57 +01:00
Rémi Verschelde 82ff7b4bce
Merge pull request #68492 from Sauermann/fix-picking-sort
Fix propagation order for 2D physics picking events
2023-02-06 15:38:38 +01:00
Yuri Sizov 9d3b4b0b40
Merge pull request #72204 from MinusKube/anchorable_rect_editor_bug
Fix get_parent_anchorable_rect() not returning the correct size in some cases
2023-02-06 16:28:19 +03:00
Pedro J. Estébanez 5131b81a4d Enhance label sizing algorithm 2023-02-06 14:12:29 +01:00
Patrick Dawson 80ae3feca7 Avoid returning self from `_get_base_font_or_default()` 2023-02-05 04:37:59 +01:00
Markus Sauermann 6e855e3820 Fix propagation order for 2D physics picking events
This patch adds a viewport-configuration-option for sorting
physics-picking events by the Z-Index and the scene tree position
of the collision objects.
2023-02-04 22:44:36 +01:00
Silc Renew fff3ae1d89 Fix NodeTransition initialization and AnimationNode remapping method 2023-02-05 06:24:14 +09:00
Silc Renew b9b8130432 Fixed animation audio to play considering time when seeking 2023-02-05 03:57:52 +09:00
Stanislav Labzyuk 0c766ef271 Fix unlimited text rendering in Tree if width <= 0 2023-02-04 16:17:42 +01:00
Rémi Verschelde ea5cf7d4b8
Merge pull request #72655 from smix8/navigationmesh_bake_aabb_fix_4.x
Fix NavigationMesh baking AABB Editor handling and visuals
2023-02-04 00:21:33 +01:00
Yuri Sizov e14cacb8da
Merge pull request #71862 from RedMser/splitcontainer-fixes
Fix SplitContainer rendering and theming
2023-02-03 23:09:18 +03:00
Maxim Kulkin 5adc7e397e Fix LineEdit not consuming events
The most important issue is LineEdit not consuming
"ui_text_submit" event which makes pressing Enter after
editing escape to other components causing unwanted
interactions.

Also fix handling mouse button interactions not consuming
some events.

Also implement early return in case we know which event
type it is and there is no point in checking other event
types.

PS I'm also suspicious that mouse motion events also need
to be consumed, but haven't explored those cases.
2023-02-03 14:38:12 -05:00
Rémi Verschelde ecbf087324
Merge pull request #72665 from KoBeWi/sneaky_ParallaxBackground_destroys_the_world
Fix Camera2D crash due to ParallaxBackground node
2023-02-03 15:45:33 +01:00
Rémi Verschelde c09445de2a
Merge pull request #72660 from Chaosus/vs_fix_instance_previews
Prevent preview error for the instance parameter in visual shader
2023-02-03 15:43:11 +01:00
kobewi 7331750618 Fix Camera2D crash due to ParallaxBackground node 2023-02-03 15:36:08 +01:00
Rémi Verschelde 388e3eb8b7
Merge pull request #72570 from DarkKilauea/nav-cleanup-agent
Improve consistency of NavigationAgent setters
2023-02-03 15:35:49 +01:00
Yuri Rubinsky c0a3129210 Prevent preview error for the instance parameter in visual shader 2023-02-03 15:28:04 +03:00
smix8 7caf08ec75 Fix NavigationMesh baking AABB Editor handling and visuals
Fixes handling and visuals for Navigation Mesh baking AABB in the Editor.
2023-02-03 11:54:13 +01:00
Danil Alexeev fb107e04d3
Fix `RichTextLabel` context menu not customizable 2023-02-03 12:07:36 +03:00
Josh Jones 20fdfd466b Improve consistency of NavigationAgent setters 2023-02-02 22:51:37 -08:00
Markus Sauermann e3e9da78e8 Remove `Viewport::_get_input_pre_xform`
This function is only relevant for `Window`. So this PR moves
the functionality to the `Window`-class.
2023-02-02 22:03:52 +01:00
Rémi Verschelde a16b0fec40
Merge pull request #72618 from Sauermann/fix-simplify-set-size
Simplify Viewport::_set_size
2023-02-02 21:05:51 +01:00
Rémi Verschelde d1589a9492
Merge pull request #72601 from Calinou/primitivemesh-uv2-padding-add-property-hint
Add a property hint for PrimitiveMesh's `uv2_padding`
2023-02-02 21:05:02 +01:00
Markus Sauermann 6743ac34d3 Simplify Viewport::_set_size
`Viewport.to_screen_rect` is used only in a single location to compare it
to `Rect2i()`.

When called from `SubViewport`, `to_screen_rect` is always equal to `Rect2i()`.
When called from `Window`, `to_screen_rect` is always different from `Rect2i()`.

So the comparison `to_screen_rect != Rect2i()` can be replaced by
`Object::cast_to<Window>(this)`.

This allows the removal of `Viewport.to_screen_rect` and the simplification of
`Viewport::_set_size`.
2023-02-02 19:09:14 +01:00
Yuri Sizov 18e827ee46
Merge pull request #72613 from Sauermann/fix-toplevel-top-level
Fix toplevel nomenclature
2023-02-02 20:49:20 +03:00
Markus Sauermann 3bc426c9d8 Fix toplevel nomenclature
toplevel was 3.x
top_level is 4.x
2023-02-02 17:37:41 +01:00