Commit Graph

12501 Commits

Author SHA1 Message Date
kobewi c8d64e8580
Fix another collision shape editor crash
(cherry picked from commit 01c32dffaf)
2023-05-12 12:06:59 +02:00
kobewi fdf66b3472
Fix CollisionShape2D editor crash
(cherry picked from commit e5d0bb1605)
2023-04-28 17:16:53 +02:00
kobewi 37c89f78ac
Improve reliability of 2D shape editor redrawing
(cherry picked from commit d8e39912f8)
2023-04-27 08:42:54 +02:00
Haoyu Qiu 389045c691 Fix inconsistent file dialog settings usage
* Project Manager ignores display mode settings.
* EditorFileDialog's default display mode and show hidden files settings
  are not updated when corresponding editor settings change.

(cherry picked from commit 2ccc9e1456)
2023-04-26 14:48:18 +02:00
Rindbee 112677c39e Fix `line_spacing` in code editor will not take effect immediately on change
Previously, in CodeTextEditor, `line_spacing` was forgotten to update
when the editor setting property changed.

(cherry picked from commit 23d6225c1e)
2023-04-26 14:32:22 +02:00
VolTer 75a33fd647 Add missing PhysicalBone2D icon
(cherry picked from commit 048f94f662)
2023-04-26 14:32:22 +02:00
Samuele Panzeri 12969aadbd Fix editor spin slider remaining editable if set read_only during an edit and fix related animation player crash
(cherry picked from commit b6abb34759)
2023-04-26 14:32:21 +02:00
Haoyu Qiu 9336866de0 Fix layout list not resizing in editor layout dialog
(cherry picked from commit dfc628bc54)
2023-04-26 14:32:21 +02:00
Fredia Huya-Kouadio bceb910f3a Make `EditorPropertyLayersGrid` responsive to touch taps
(cherry picked from commit aa7a4d56f0)
2023-04-26 14:32:20 +02:00
clayjohn c8ed59ba41 Validate renderer selection in project manager and change default renderer editor setting to expose an enum to users
(cherry picked from commit 48ebae7812)
2023-04-26 14:31:53 +02:00
kobewi cce2ffda1b Remove wrong Ctrl from 2D editor tooltip
(cherry picked from commit 75f2d7f5c4)
2023-04-26 14:14:06 +02:00
bruvzg 357e2ec05d [Image Font] Fix fractional ascent for font with odd height.
(cherry picked from commit 41f7bb2025)
2023-04-26 14:14:06 +02:00
kleonc 6ac70ff5da TileMap Fix rendering odd-sized tiles
(cherry picked from commit c49a7feae3)
2023-04-26 14:14:05 +02:00
kobewi f39f354313 Add missing LineEdit constants in editor theme
(cherry picked from commit f462efd7f1)
2023-04-24 17:08:55 +02:00
Michael Alexsander af0dd6591b Remove unnecessary zero multiplications
(cherry picked from commit f057d755ab)
2023-04-24 17:07:09 +02:00
bruvzg 9c1ea28092 Improve line BiDi handling, prevent crash on recursive log updates.
(cherry picked from commit 282e4231c2)
2023-04-24 17:03:55 +02:00
Pedro J. Estébanez 3a5bc7455e Make EditorToaster's handler thread-safe
(cherry picked from commit 84183f89e6)
2023-04-24 16:52:26 +02:00
kleonc ebcc7b4b98 Fix OBJ mesh importer smoothing handling
(cherry picked from commit e8900a2cac)
2023-04-24 16:52:25 +02:00
Hakim 756d809ef1 Change cursor consistently when panning in the 2D Editor
(cherry picked from commit f4edbe6341)
2023-04-24 16:52:25 +02:00
Ricardo Subtil b5ff677381 Poll LSP/DAP clients for connection status updates
(cherry picked from commit 4be4eeea3a)
2023-04-24 14:16:37 +02:00
Haoyu Qiu e7f7de0044 Set font sizes for various styles in editor output panel
(cherry picked from commit 2c0db8222a)
2023-04-24 14:16:37 +02:00
kobewi 51fdbf6ac7 Adjust size of some dialogs
(cherry picked from commit 71011e0855)
2023-04-24 14:16:16 +02:00
kobewi 8c372f4109 Fix method dialog label
(cherry picked from commit c399d4f26c)
2023-04-24 14:04:19 +02:00
Haoyu Qiu d0c50d820b Fix connect signal dialog not allowing Unicode method name
(cherry picked from commit 936c9e83b4)
2023-04-24 14:04:19 +02:00
fuzzy@notepc 08b825396f Fix #75790, where creating Ceil(Vector2) node in Visual Shader Editor
crashes engine due to index out of bounds.

(cherry picked from commit c6a45f1031)
2023-04-24 14:04:18 +02:00
Rémi Verschelde 90b4ca2e50
i18n: Sync translations with Weblate 2023-04-20 13:26:36 +02:00
kobewi 177be9bd37 Initialize editor values on first launch
(cherry picked from commit b0eadcfbce)
2023-04-10 11:32:28 +02:00
Lyuma ba9f2981f1 gltf: Remove obsolete hack to embed gltf textures in advanced import
(cherry picked from commit bd020b7d92)
2023-04-07 17:44:39 +02:00
Yuri Sizov cacc6c5ed5 Prevent color conversion of the big Godot logo
Use an off-white color from the palette that we explicitly don't convert.

(cherry picked from commit ce741df43d)
2023-04-07 17:44:38 +02:00
Marius Hanl 817da41d55 Fix some theme values affect the editor by setting a default value for the theme constant 'h_separation' for MenuBar and Button and a default value for the theme color 'background_color' for TextEdit
(cherry picked from commit c0905bc0af)
2023-04-07 17:44:38 +02:00
kobewi 87a9d2c87e Improve editor state initialization
(cherry picked from commit 13c8a9890d)
2023-04-07 17:44:38 +02:00
kobewi 03827485d7 Properly remember snapping options per-project
(cherry picked from commit 45b47d5584)
2023-04-07 17:44:38 +02:00
James Buck 861399fbe5 Re-enable script editor File menu shortcuts when the menu is hidden
(cherry picked from commit de49bec30e)
2023-04-07 17:44:37 +02:00
Jean-Michel Bernard 1aa5fce321 Fix commenting collapsed function issue
(cherry picked from commit 68ad3338ef)
2023-04-07 17:44:37 +02:00
Ron B. Yeh bcf991d3ec Fix off-by-one issue where Go to Line dialog shows the incorrect line
number (one less than the actual current line).

(cherry picked from commit 1e9fd10f68)
2023-04-07 17:44:37 +02:00
ajreckof 62dbd512cc Fix descriptions not showing for theme properties
(cherry picked from commit 14140eb2d9)
2023-04-07 17:44:37 +02:00
kobewi f8517e1c4b Remember directory when installing templates file
(cherry picked from commit 551b6965ec)
2023-04-07 17:44:36 +02:00
Hakim b17f0f593e Use physical shortcuts for freelook navigation in the editor
(cherry picked from commit 52de40310a)
2023-04-07 17:44:36 +02:00
Rémi Verschelde 9099ac39cf
i18n: Sync translations with Weblate 2023-04-04 00:33:24 +02:00
smix8 1deda0f003 Add navigation renames to 3to4 converter
Adds navigation renames to 3to4 converter.

(cherry picked from commit 0c1e585a1d)
2023-04-03 18:37:44 +02:00
Ninni Pipping 1e94881484 Exposing more project settings for documentation
(cherry picked from commit bd30847e59)
2023-03-30 19:26:05 +02:00
Haoyu Qiu d6b36e800d Improve POT Generation dialog
* Avoid "property not found" warnings when adding a file for the first
  time.
* When no file is added, disable the Generate POT button instead of
  printing a warning.

(cherry picked from commit 584136271c)
2023-03-30 19:24:52 +02:00
Rémi Verschelde fe71d33033 Project converter: Remove Tween properties/signals from renames
The Tween class in Godot 3 is fully incompatible with Godot 4, there's no point
doing these renames. It also makes it harder to use Threen, my (currently WIP)
forward-port of the Godot 3 Tween to Godot 4.

(cherry picked from commit 0171037e0a)
2023-03-30 19:20:36 +02:00
kobewi 74a35c9ca2 Don't allow selecting nodes without owner
(cherry picked from commit 2fcfef15da)
2023-03-30 19:18:35 +02:00
kleonc 47c4044d03 TileSet editor AtlasMergingDialog crash fix
(cherry picked from commit c72b09639a)
2023-03-30 19:16:33 +02:00
Hugo Locurcio 6fedc728f6 Use 8×8 default grid size for TextureRegion and 2D polygon editors
Power-of-two grid sizes are more suited to most game assets.

(cherry picked from commit 0f73ef1df9)
2023-03-27 18:04:25 +02:00
Haoyu Qiu 2ea8dd7232 More i18n improvements
* Make placeholder in editor layout dialog translatable.
* Make messages in scene import settings dialog translatable.
* Mark theme override property categories for translation.

(cherry picked from commit 5a5fd33e42)
2023-03-27 18:02:14 +02:00
Haoyu Qiu 5e9e95c34c Make Add Scene button the same height as scene tabs
(cherry picked from commit 8ab11127bc)
2023-03-27 18:00:35 +02:00
Haoyu Qiu 50ea0951fe Fix height of subresource button in Inspector
(cherry picked from commit 66b325b728)
2023-03-27 18:00:28 +02:00
kobewi 65c52087c2 Remove disabled plugins from active plugins
(cherry picked from commit 0b8b37c35d)
2023-03-27 17:58:34 +02:00
nikitalita 7a827f979e Fix ResourceImporterLayeredTexture::import() high_quality type
(cherry picked from commit 68a6505f41)
2023-03-27 17:48:02 +02:00
kleonc 8575010e88 TileMapEditor Fix preview rendering and transform calculations
(cherry picked from commit 224c66324b)
2023-03-27 17:32:48 +02:00
Fahad Shihab e99b184b6c Added drag and drop support for shaderinclude
Dragging and dropping now works for shader include file.

(cherry picked from commit e5601b517e)
2023-03-27 17:26:36 +02:00
Yuri Sizov 636d7905b0 Update property keying state without a full Inspector rebuild
(cherry picked from commit f68eb4a967)
2023-03-27 17:17:19 +02:00
Marius Hanl 6e85d4efea Add conversion for Vector2 method tangent() -> orthogonal()
For C# also: Perpendicular() -> Orthogonal()

(cherry picked from commit da4ec87673)
2023-03-27 17:14:42 +02:00
Hakim 60ceecb1ab Reload built in script to get its methods on signal connection
(cherry picked from commit 5aa8b9ee61)
2023-03-27 17:13:30 +02:00
kobewi d91a3985ae Fix EditorUndoRedoManager's handling of MERGE_ENDS
(cherry picked from commit 38c50b4ed3)
2023-03-27 17:10:54 +02:00
stmSi 0dab32f317 Fix `Find in Files` Search Results cannot open builtin script
(cherry picked from commit f1f4c5b10b)
2023-03-27 17:06:43 +02:00
bruvzg 7a3f8a83da Fix GDExtensions library export when multiple architectures are set.
(cherry picked from commit c2d678a924)
2023-03-27 16:55:28 +02:00
bruvzg 24c4b5e8ad [macOS] Re-add support for the _sc_ inside app bundle. Update docs.
(cherry picked from commit 174e0837e0)
2023-03-27 16:34:57 +02:00
Eric M 74b5a0ca4f Fix cancelling selection (pressing escape) while gizmo editing making uncommitted changes.
* Pressing escape while gizmo editing will discard the changes made during that edit 'session'

(cherry picked from commit 871ddf80c0)
2023-03-27 16:29:21 +02:00
clayjohn 5262fe21de Delete unused compression formats from .imoprt files when exporting
(cherry picked from commit dec86164e1)
2023-03-27 16:26:13 +02:00
Haoyu Qiu ef06e5d786 Fix error when opening Inspector's dots menu
When the inspector is empty, opening the "extra resource options" menu
produces a error:

> Condition "current_res.is_null()" is true.

Opening the mneu with no current resource is valid use case, so
`ERR_FAIL_COND` should not be used.

(cherry picked from commit cb0fa0ed7b)
2023-03-16 16:42:53 +01:00
clayjohn ec5f503289 Disallow creating a project in the Home or Documents folder
Also don't prompt users to delete the project folder for now.

This is a temporary fix to ensure that users do not delete their entire home folders by mistake

(cherry picked from commit 45a26ff292)
2023-03-16 16:42:09 +01:00
Hugo Locurcio ab12edb6c6 Add "Bbcode" -> "BBCode" editor capitalization
This property name is used in RichTextLabel.

(cherry picked from commit 81858da2e6)
2023-03-16 16:41:16 +01:00
kobewi 5faebb712e Fix MultiNodeEdit not cleared after deleting nodes
(cherry picked from commit fbffd686e2)
2023-03-16 16:40:13 +01:00
Marius Hanl 3bb89a0911 Add conversion for common Theme Overrides
(cherry picked from commit a40f559fe2)
2023-03-16 16:37:38 +01:00
Danil Alexeev 5acc7a77fe Fix `InputEventConfigurationDialog` modifies original event
(cherry picked from commit 9fbf24fd5c)
2023-03-16 16:37:05 +01:00
Rémi Verschelde d23922ffeb
i18n: Sync translations with Weblate 2023-03-15 02:29:27 +01:00
the-sink 38c0ad7c6c Redraw 2d viewport when guides are cleared
(cherry picked from commit 0c051f41b1)
2023-03-14 13:59:05 +01:00
Marius Hanl 3176016528 Convert OpenSimplexNoise to FastNoiseLite
- class name and octaves property

(cherry picked from commit 862296273b)
2023-03-14 13:59:05 +01:00
Yuri Sizov c59c68cdec Make sure Script Debugger is updated with the editor theme
(cherry picked from commit 239eb31c90)
2023-03-14 13:59:05 +01:00
yedpodtrzitko 5824967f2f clear filter input in Project Settings when opening Layers
(cherry picked from commit e13bcf5b84)
2023-03-14 13:59:04 +01:00
Haoyu Qiu 38ad9c52b2 Add missing TTRs in tiles editor and array inspector
(cherry picked from commit bef7f14885)
2023-03-14 13:59:04 +01:00
Hayden Leete 26ab941507 Fix errors when closing floating docks
dock->get_index() on line 4463 was not behaving as expected
due to dock having an internal sibling, so now we just get the
index excluding internal nodes.

line 4742 would throw an error if you made multiple docks
floating then redocked the end docks first, but no longer

(cherry picked from commit 21578e0bb4)
2023-03-14 13:59:04 +01:00
Haoyu Qiu b4a1bfd6d5 Fix coloring of the renderer options button
(cherry picked from commit ac7a4f6e87)
2023-03-14 13:59:03 +01:00
Ryan Roden-Corrent 47dc4bc307 Don't unset local_coords on starting transform.
This fixes a bug introduced by 806425621c, where dragging the gizmo no longer respected local transforms.

I'm not sure why I called set_local_coords_enabled(false) in _compute_edit. Removing this line seems to fix gizmo-dragging local transforms, without breaking anything else.

I also noticed that confirming a transform leaves the gizmo axis lines on the screen. This is fixed by calling update_transform_gizmo after clearing the edit mode/instant flags, so update_transform_gizmo knows not to render any axes.

(cherry picked from commit d3d1223b97)
2023-03-14 13:59:03 +01:00
Ryan Roden-Corrent 89a40d317d Disable local space for blender transforms.
Having local_space enabled when starting a transform changed the
behavior of VIEW space transforms. Now we disable local_space when
starting a blender transform (there was already logic to restore the
setting after the transform ends).

This also hides the gizmo while performing a blender transform,
otherwise the user will see it snap back and forth between the local and
global alignment. I think the transform looks cleaner with the gizmo
hidden anyways.

Fixes #59392.

(cherry picked from commit 806425621c)
2023-03-14 13:59:03 +01:00
Rémi Verschelde 7e74568709 FBX: Disable importer when canceling FBX2glTF setup
Pretty hacky solution but it's better than an infinite loop.

All this import setup needs to be redone, it's very difficult to properly
bail out from an invalid import without triggering reimport loops.

Also fix underline not visible at default editor scale in LinkButton.

Fixes #73319.

(cherry picked from commit d81e6ee024)
2023-03-14 13:59:02 +01:00
Yuri Sizov 84e9a79ace Add missing handler for removing font sizes in Themes
(cherry picked from commit 5a3dbea3ed)
2023-03-13 22:22:05 +01:00
Ninni Pipping 75e078d885 Fix type icons in `PropertySelector`
And adding a check to prevent future issues.

(cherry picked from commit ca86d53e7f)
2023-03-13 22:11:46 +01:00
Thomas Lobig a755ac856a remove incorrect rename of get_used_cells_by_id
renaming get_used_cells_by_id to get_used_cells is not only unecessary, it introduces hard to debug issues

(cherry picked from commit d6a2197b3d)
2023-03-13 22:10:04 +01:00
clayjohn 13b37a50ae Add parentheses around arguments when converting xform
(cherry picked from commit 3ee5fbdb73)
2023-03-13 21:33:35 +01:00
Ryan Roden-Corrent 81f4996683 Add some missing renames to 3to4 tool.
MultiplayerPeerExtension isn't an exact replacement for
NetworkedMultiplayerCustom, but at least it gets you moving in the right direction.

Engine.editor_hint couldn't be fixed by the renames map, because you have to add a `()` at the end.

(cherry picked from commit 6b17c2b6e7)
2023-03-13 21:32:51 +01:00
Ryan Roden-Corrent 06e2c6ace2 Move tool declarations to top in 3to4.
In godot3, `tool` can follow keywords like `extends` and `class_name`
In godot4, `@tool` must be the first line in the file.

(cherry picked from commit 9a474fb99f)
2023-03-13 21:31:53 +01:00
Marius Hanl 9fff0fcbb5 Project Converter: Do not convert lines that start with a comment
Lines that start with # or // are ignored

(cherry picked from commit 8cf7ac3a45)
2023-03-13 21:31:23 +01:00
Ninni Pipping f6709a1fda Add keycode project conversion
(cherry picked from commit fec630f360)
2023-03-13 21:28:58 +01:00
Marcus Elg 6041ad5c70 Fix Camera2D position smoothing properties not being grouped
(cherry picked from commit a835dfd96d)
2023-03-13 21:25:14 +01:00
Ryan Roden-Corrent 6cd227a35c Correct superclass constructors in 3to4.
Fixes #70542.

The 3to4 conversion tool was not handling superclass constructors.
We should translate the godot3 syntax:

```gdscript
func _init(a,b,c).(a,b,c):
    pass

func _init(a,b,c):
    super(a,b,c)
```

Originally, the _init conversion was intended to remove `void` return types from _init functions, as this was disallowed due to #50589.
As that was resolved by #53366, I removed that part of the conversion logic. If a void return type is present on a constructor, the converter now leaves it.

Here's a sample diff from my own project:

```diff
@@ -103,10 +105,11 @@ class Real:
 class Text:
        extends Setting

-       var choices: PoolStringArray
-       var value: String setget set_value, get_value
+       var choices: PackedStringArray
+       var value: String : get = get_value, set = set_value

-       func _init(section: String, key: String, default: String, choice_list: Array).(section, key, default) -> void:
+       func _init(section: String, key: String, default: String, choice_list: Array) -> void:
+               super(section, key, default)
                choices = choice_list

        func normalize(val):
@@ -129,9 +132,10 @@ class Text:
 class Boolean:
        extends Setting

-       var value: bool setget set_value, get_value
+       var value: bool : get = get_value, set = set_value

-       func _init(section: String, key: String, default: bool).(section, key, default) -> void:
+       func _init(section: String, key: String, default: bool) -> void:
+               super(section, key, default)
                pass
```

(cherry picked from commit 53a00abb11)
2023-03-13 21:19:53 +01:00
Ryan Roden-Corrent 1421838ba7 Don't strip whitespace when converting 3to4.
Fixes #74204.

The style guide says

> Always use one space around operators and after commas

The 3to4 conversion tool currently strips space in certain scenarios.
I've updated it to add space whenever it is generating new code.
In any case where it substitutes existing code, it leaves it as-is.

For example, connect(a,b,c) becomes `connect(a, callable(b, c))`, because the converter is adding new commads/parens.

However, `xform(Vector3(a,b,c))` becomes `Transform * Vector3(a,b,c)` because it uses the user's original Vector3 string whole. If the user originally had `xform(Vector3(a, b, c))`, then it becomes `Transform * Vector3(a, b, c)`.

Ideally we'd always preserve original formatting, but this seems quite difficult, so I tried to preserve it where we can, but air on the side of following the style guide whenever we're transforming code.

(cherry picked from commit d3684e662f)
2023-03-13 21:18:53 +01:00
Ninni Pipping 857cd853de Fix TileSetEditor paiting texture_origin Vector2i
(cherry picked from commit fb317546fe)
2023-03-13 14:52:22 +01:00
Haoyu Qiu 093d237138 Fix dock name lost translation after layout change
* After you click in the dock select panel
* After you load an editor layout

(cherry picked from commit 43bf0ca8d2)
2023-03-13 14:49:17 +01:00
bruvzg 764fe8ac51 Automatically reparent editor message dialogs to avoid error spam.
(cherry picked from commit 921f3b7589)
2023-03-13 14:48:33 +01:00
SaracenOne d929784491 Stop toaster notification circle flickering when notifications are all hidden.
(cherry picked from commit ab61624c78)
2023-03-13 14:47:14 +01:00
Niels Drost 94db7f866b TileSet editor was out of sync with TileMap and incorrectly overwrote old selected TileSet after an edit call with a null pointer.
(cherry picked from commit 66374c8dce)
2023-03-13 14:45:26 +01:00
Danil Alexeev f4ea9df0f4 Fix GDScript code style regarding colon
(cherry picked from commit ea5fd3d732)
2023-03-13 14:42:27 +01:00
Ninni Pipping 8dca093d97 Document `editor/naming/scene_name_casing` setting
Moved definitions of editor related project settings to `editor/register_editor_types.cpp` to make documentation work.

(cherry picked from commit 3de5332fcb)
2023-03-13 14:25:46 +01:00
Yuri Sizov 234c601a61 Improve logic related to editing audio buses (and prevent crashes)
(cherry picked from commit 68c18c0e2b)
2023-03-13 14:19:41 +01:00
Yuri Sizov 048c252602 Prevent cache corruption when saving resources in the editor
(cherry picked from commit 496bd94c21)
2023-03-13 14:16:13 +01:00
Hayden Leete 7490f89238 Fix crash when revealing file in floating FileSystem Dock
When selecting "Show in FileSystem" from the context menu of a resource
in the inspector, the engine would crash if the FileSystem dock was
floating because it was trying to focus the FileSystem tab, but floating
docks don't use Tab Containers. This commit makes the FileSystem dock's
window grab focus instead if it's floating.

(cherry picked from commit c4d1513e15)
2023-03-13 14:15:18 +01:00