Commit graph

117 commits

Author SHA1 Message Date
Rémi Verschelde
e19e6b09b9
Clean up ProjectConverter3To4 architecture, move renames map to separate file
This allows properly limiting what features depend on the RegEx module
(doing the actual conversion) and what features only require the renames
data (GDScript suggestions).

Also better excludes the conversion command line options when actually
disabling deprecated code.

Fixes #73029.
2023-02-10 14:35:22 +01:00
Rémi Verschelde
480e991656
Fix no-regex build for ProjectConverter3to4
Fixes #72649.
2023-02-03 15:26:06 +01:00
tbxMb
2c0446b893
Allow .gdshader files in 3to4 conversion 2023-02-02 10:27:26 +01:00
souplamp
5300daaff2
Audio rename (device, capture_device) -> (output_device, input_device)
Change instances of audio properties 'device' to 'output_device',
and instances of audio properties 'capture_device' to 'input_device',
as well as their subsequent getter & setter functions.

Update the docs to reflect these changes, as well as the
3-to-4 converter for GDScript and CSharp to make proper
conversions (only exception is 'device' since that name
is too vague and might replace non-AudioServer related
instances, such as user comments and variables).

This does not change internal references to references like
'Render Client' and 'Capture Client' in WASAPI; such is outside the
scope of this commit. This also does not change ALSA's references,
considering that it uses 'device' to mean input and output
interchangeably.

Other references are changed, however where applicable,
to be consistent with the new AudioServer methods and property
names.
2023-01-31 18:25:11 +01:00
Rémi Verschelde
361f3f1721
Merge pull request #57520 from jordigcs/gd-rename-map
Add hint for identifiers renamed from 3.x to 4.0
2023-01-31 15:55:25 +01:00
Rémi Verschelde
c8446754dd
Merge pull request #72357 from aaronfranke/area-gravity-unit-dist
Replace Area gravity point distance scale with unit distance
2023-01-31 10:53:16 +01:00
Juan Linietsky
28f51ba547 Refactor high quality texture import
* Only two texture import modes for low/high quality now:
  * S3TC/BPTC
  * ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.

This solves the following problems:

* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
Aaron Franke
79215131b5
Replace Area gravity point distance scale with unit distance 2023-01-29 22:12:00 -06:00
Haoyu Qiu
ec10da604f Add window size settings in 3to4 conversion 2023-01-28 17:54:55 +08:00
Rémi Verschelde
91c0ed5e33
Merge pull request #71907 from TokageItLab/change-animated-sprite-api
Make `AnimatedSprite`'s playback API consistent with `AnimationPlayer`
2023-01-27 10:32:23 +01:00
Silc Renew
17bf6238fc Make AnimatedSprite's playback API consistent with AnimationPlayer 2023-01-26 12:40:19 +09:00
Danil Alexeev
b004f8180e
GDScript: Allow constant expressions in annotations 2023-01-25 18:43:56 +03:00
Aaron Franke
0e7785333f
Improve clarity of Tree's activated/double-clicked signals
Co-authored-by: Yuri Sizov <yuris@humnom.net>
2023-01-24 15:55:09 -06:00
jordi
bb9a00889a Add hint for identifiers renamed since Godot 3 2023-01-24 12:33:55 -06:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde
0b141e107f
Merge pull request #70913 from Maran23/4-x-some-more-missing-properties-to-godot-converter
Added more missing properties/methods to the Godot converter
2023-01-20 23:59:58 +01:00
Marius Hanl
e27695e927 Add more missing properties/methods to the converter.
icon_align -> icon_alignment
rect_min_size -> custom_minimum_size
get_tree().set_input_as_handled() -> get_viewport().set_input_as_handled()
_unhandled_key_input(event: InputEventKey) -> _unhandled_key_input(event: InputEvent)
And C# equivalents
2023-01-20 23:33:52 +01:00
Marius Hanl
61f9f4d2be Add InputMap conversion
All InputMap strings that changed between Godot 3 and 4 are now renamed when converting the project.

This includes:
- alt -> alt_pressed
- shift -> shift_pressed
- control -> ctrl_pressed
- meta -> meta_pressed
- scancode -> keycode
- physical_scancode -> physical_keycode
- doubleclick -> double_click
2023-01-20 19:26:13 +01:00
G-Shadow
7f3da3d714 Add missed OS window settings to project converter, fix fullscreen indents.
Add conversion for OS.window_maximized, vsync_enabled, window_resizable, window_borderless, get_screen_count and set_current_screen.
Fix OS.window_fullscreen conversion corrupted line indents.
2023-01-19 20:50:49 +03:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Nong Van Tinh
c6a3a262c4 Add missing functions in the Control node when converting project 2023-01-11 14:14:18 +07:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Marius Hanl
c0feed47c7 Added Rect (rect_) properties to the c# migration table 2023-01-05 19:13:24 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Gilles Roudière
be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
Micky
67cdac6db8 Remove Array.find_last() 2022-11-25 18:34:50 +01:00
Rémi Verschelde
c40cb24c1c
Merge pull request #68946 from timothyqiu/setget-3to4
Complete `setget` 3to4 conversion
2022-11-21 11:43:49 +01:00
Haoyu Qiu
fbf47c5d47 Complete setget 3to4 conversion 2022-11-21 17:05:48 +08:00
Haoyu Qiu
81b6e28c94 Fix not enough arguments error when validating 3to4 conversion 2022-11-21 16:49:59 +08:00
Chenzo
378d9a630c Add raise -> move_to_front rename line 2022-11-17 16:56:10 -05:00
cespeute
4b00c2ec57 Add EditorInterface.get_selected_paths()
Exposes the selected paths in the editor filesystem dock.
Implements this proposal : https://github.com/godotengine/godot-proposals/issues/2424

Also renamed the old `get_selected_path` to `get_selected_directory` to
better match the already existing get_current_path function.
2022-11-14 22:46:27 +01:00
Rémi Verschelde
6fc1715cdf Merge pull request #65779 from Mickeon/rename-camera-follow
Rename Camera2D's `smoothing` to `position_smoothing`
2022-10-12 08:53:04 +02:00
Micky
43b9cc96da Rename Camera2D's smoothing to position_smoothing
For Camera2D:
`smoothing_enabled` ->  `position_smoothing_enabled`
`set_enable_follow_smoothing` -> `set_position_smoothing_enabled`
`is_follow_smoothing_enabled` -> `is_position_smoothing_enabled`
`smoothing_speed` -> `position_smoothing_speed`
`set_follow_smoothing` -> `set_position_smoothing_speed`
`get_follow_smoothing` -> `get_position_smoothing_speed`
2022-10-11 16:51:26 +02:00
Rémi Verschelde
6d534f6e89 Merge pull request #66221 from Mickeon/painstakingly-appending-ds-en-you-tea-es
Rename remaining "*_enable" to "*_enabled"
2022-10-11 16:17:02 +02:00
Rémi Verschelde
2b376437a2 Merge pull request #65983 from Mickeon/rename-audio-player-volume-db
Rename AudioStreamPlayer3D's `unit_db` to `volume_db`
2022-10-08 13:56:10 +02:00
Micky
ae5771e1b1 Rename remaining "Spatial" in Plugins to "Node3D"
For EditorNode3DGizmo:
- `get_spatial_node` -> `get_node_3d`
- `set_spatial_node` -> `set_node_3d`

For EditorPlugin:
- `add_spatial_gizmo_plugin` -> `add_node_3d_gizmo_plugin`
- `remove_spatial_gizmo_plugin` -> `remove_node_3d_gizmo_plugin`

Also renames some internal methods for consistency (`forward_3d_draw_over_viewport` & `forward_3d_force_draw_over_viewport` ...). Basically, Spatial has been completely eradicated.
2022-10-04 16:27:29 +02:00
Rémi Verschelde
166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
Rémi Verschelde
fe9f056623 Merge pull request #66640 from gotnospirit/master-project_converter-json-print
Project converter: JSON.print -> JSON.stringify
2022-09-30 09:59:04 +02:00
James
c8132ee279 Project converter: JSON.print -> JSON.stringify 2022-09-30 10:30:42 +08:00
James
6ec19b3681 Project converter: OS.get_datetime -> Time.get_datetime_dict_from_system 2022-09-30 10:10:16 +08:00
kobewi
1bf741c277 Fix wrong DirAccess function in project converter 2022-09-27 13:12:31 +02:00
Rémi Verschelde
eae7d27578 Merge pull request #66233 from DorianSzlachcic/3-to-4-converter-issue
Prevent 3-to-4 project converter from adding extra line for move_and_slide
2022-09-25 17:05:47 +02:00
DorianSzlachcic
bf6d84b8bb Prevent 3-to-4 project converter from adding extra line for move_and_slide
Fixes #66054
2022-09-25 11:54:33 +02:00
Rémi Verschelde
c9e75a7c3c
Merge pull request #65531 from Mickeon/project-converter-missing-entries
Add a few missing entries in Project Converter
2022-09-25 00:22:00 +02:00
Micky
c1b5b68eee Rename remaining "*_enable" to "*_enabled"
Material.`proximity_fade_enable` -> `proximity_fade_enabled`
Material.`set_proximity_fade` -> `set_proximity_fade_enabled`
(Material.`is_proximity_fade_enabled` is unchanged)

Area3D.`reverb_bus_enable` -> `reverb_bus_enabled`
(`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged)

RDPipelineRasterizationState:
`depth_bias_enable` -> `depth_bias_enabled`
`set_depth_bias_enable` -> `set_depth_bias_enabled`
`get_depth_bias_enable` -> `get_depth_bias_enabled`

Bonus:
Area3D.`set_reverb_bus` -> `set_reverb_bus_name`
Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
2022-09-21 22:47:46 +02:00
Rémi Verschelde
0b06f8b0bd Merge pull request #65816 from bruvzg/proj_settings_missing_flags
Add missing initial window flags and window mode to the project settings.
2022-09-21 18:56:31 +02:00
Micky
ee16de583f Reverse Camera2D.rotating to ignore_rotation
`rotating` is misleading, as Camera2D is affected by `rotation` and `global_rotation` like any other Node2D

Updates description in the docs, as well.
2022-09-21 01:52:12 +02:00
bruvzg
d104a4cdbd
Add missing initial window flags and window mode to the project settings. 2022-09-19 12:30:10 +03:00
kobewi
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00