K. S. Ernest (iFire) Lee
39922d7167
Handle gltf binary
...
[ Ignore and Warn | Extract Textures (default) | Optimize Loading Embedded as Basisu ]
Enable compressed mip maps from Basis Universal for faster compressions.
Increase the quality of Basis to avoid corruption.
To keep compatibility use the first mip of the previous internal Godot format.
Because texture names may have invalid filename characters, adds String::validate_filename to sanitize filenames for import pipeline use.
2023-01-27 02:02:02 -08:00
Rémi Verschelde
e92393d295
Merge pull request #67783 from EricEzaM/67715-input-event-action-as-text
...
Make InputEventAction as_text() return the text of the first valid event for the action.
2023-01-27 10:30:00 +01:00
Dmitrii Maganov
abe6d67232
GDScript: Fix test for read-only state of constants
2023-01-27 05:28:08 +02:00
Raul Santos
cac7a784d6
Add `GodotTypeInfo::Metadata` to `MethodInfo`
2023-01-26 15:51:34 +01:00
Rémi Verschelde
31496c296a
Merge pull request #72078 from bitsawer/fix_optimize_vertices
...
Fix range loop iteration regressions
2023-01-26 01:11:25 +01:00
Rémi Verschelde
42424d3b8e
Merge pull request #71758 from adamscott/is_equal_ref
...
Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()`
2023-01-26 01:07:24 +01:00
bitsawer
8c25bcdb84
Fix range loop iteration regressions
2023-01-26 00:14:39 +02:00
Adam Scott
37248d7c87
Add `@GlobalScope` `is_same(a, b)` and `Variant::identity_compare()`
2023-01-25 10:46:21 -05:00
bruvzg
6def1dfdd5
Remove unused SUPER_L/R constants.
2023-01-25 14:22:28 +02:00
Rémi Verschelde
b9bf12e99a
Merge pull request #71142 from aaronfranke/never-duplicate-script
...
Add `PROPERTY_USAGE_NEVER_DUPLICATE` flag and use for script
2023-01-25 09:18:18 +01:00
Rémi Verschelde
93c650c10d
Merge pull request #69028 from YeldhamDev/its_raw_you_donkey
...
Make `Input.get_vector()` check for plain `strength` instead of the raw one
2023-01-25 09:15:45 +01:00
Rémi Verschelde
5df9a84128
Merge pull request #71968 from bruvzg/def_keys_no_label
...
[Input] Do not add key labels to the default actions, to display it correctly in the UI.
2023-01-25 09:15:13 +01:00
Aaron Franke
2a65f6812b
Add PROPERTY_USAGE_NEVER_DUPLICATE flag and use for script
...
Co-authored-by: Yakov Borevich <j.borevich@gmail.com>
2023-01-24 16:37:50 -06:00
Aaron Franke
2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE"
2023-01-24 16:05:07 -06:00
Yuri Sizov
fab9926a95
Merge pull request #65137 from dalexeev/editor-naming
...
Rearrange `editor/naming/*` project settings
2023-01-24 22:26:03 +03:00
bruvzg
57b5d112f7
[Input] Do not add key labels to the default actions, to display it correctly in the UI.
2023-01-24 14:49:11 +02:00
Jan Haller
15686ca786
Fix bind " convergence_dist" containing space
2023-01-23 20:07:59 +01:00
bruvzg
daad4aed62
Cleanup and unify keyboard input.
...
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell
2023-01-23 11:02:20 +01:00
Rémi Verschelde
5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
...
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
Rémi Verschelde
56fdef281e
Merge pull request #71851 from mihe/error-macros
...
Fix incorrect index error macros
2023-01-22 16:08:34 +01:00
Rémi Verschelde
c9243c37dc
Merge pull request #71846 from Chaosus/astar_local_vector
...
Enchance the performance of `AStar` by using a `LocalVector`
2023-01-22 16:06:45 +01:00
Mikael Hermansson
22c1785826
Fix incorrect index error macros
2023-01-22 12:23:56 +01:00
Rémi Verschelde
cd031fd31a
Merge pull request #71663 from bruvzg/init_pos_x
...
Reorganize main and sub-window initial position properties.
2023-01-22 11:25:58 +01:00
Yuri Rubinsky
078600a3c4
Enchance the performance of `AStar` by using a `LocalVector`
2023-01-22 12:04:41 +03:00
kobewi
615c517034
Use range iterators in LocalVector loops
2023-01-21 18:44:42 +01:00
kobewi
277d5361df
Add range iterator to LocalVector
2023-01-21 18:42:04 +01:00
George Marques
86ee5f39c4
Add support for Unicode identifiers in Expression class
2023-01-21 13:39:42 -03:00
Rémi Verschelde
ebd0b40f6e
Merge pull request #71687 from reduz/support-script-class-name-in-efs
...
Support script global resource name in EditorFileSystem
2023-01-21 16:54:23 +01:00
Juan Linietsky
dddd8d43f6
Support script global resource name in EditorFileSystem
...
* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.
Properly fixes #66179 . Supersedes #66215 and supersedes #62417
**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
2023-01-21 14:19:27 +01:00
Rémi Verschelde
c02572d3d0
Merge pull request #71683 from reduz/fast-script-class-inheritance-check
...
Implement a quick script inheritance check
2023-01-21 11:31:05 +01:00
Rémi Verschelde
a3c8ba6cd5
Merge pull request #71396 from reduz/fix-broken-userdir
...
Fix cases of broken user:// paths.
2023-01-21 11:30:37 +01:00
Rémi Verschelde
2435eef617
Merge pull request #71390 from reduz/fix-json-as-resource
...
Fixes to JSON as resource
2023-01-21 11:30:08 +01:00
Jan Haller
b8c4ae28b7
Fix use of `bool` in extension header
2023-01-19 22:21:19 +01:00
Rémi Verschelde
ab5c75b9ad
Merge pull request #71649 from raulsntos/array-indexer
...
Add property usage to array indexer
2023-01-19 19:33:05 +01:00
Rémi Verschelde
4ca6a9809d
Merge pull request #44596 from KoBeWi/ 🧹 🧹 🧹
...
Cleanup unused engine code v2
2023-01-19 19:32:51 +01:00
Juan Linietsky
3dcf380161
Implement a quick script inheritance check
...
Optimizes, simplifies and fixes EditorResourcePicker (was not refreshing custom clases).
2023-01-19 16:47:01 +01:00
Raul Santos
97610c8bfc
Add property usage to array indexer
...
This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
2023-01-19 14:22:11 +01:00
kobewi
c0083e431b
Cleanup unused engine code v2
2023-01-19 13:02:18 +01:00
bruvzg
aade5abd4f
Reorganize main and sub-window initial position properties.
2023-01-19 13:44:06 +02:00
bruvzg
db7d8c2d87
[GDExtension] Expose some low level functions and String operators.
2023-01-19 12:50:49 +02:00
Rémi Verschelde
4679f8724a
Merge pull request #71628 from reduz/fixup-editor-file-system-script-parsing
...
Clean up EditorFileSystem script parsing
2023-01-19 10:09:55 +01:00
Juan Linietsky
5bdc0d97d3
Clean up EditorFileSystem script parsing
...
* Optimize only update modified/added/removed files.
* Clean up documentation parsing.
2023-01-18 20:56:45 +01:00
Pedro J. Estébanez
6616b0619d
Revert "Make MessageQueue::push_callable(p) work with bound arguments"
...
This reverts commit 81b1ebddef
.
2023-01-18 19:20:40 +01:00
Rémi Verschelde
b5f3ac522e
Merge pull request #71400 from touilleMan/gdextension-dump-global_enum-is_bitfield-field
...
Add missing is_bitfield field for global enum in extension_api_dump
2023-01-18 17:47:58 +01:00
Rémi Verschelde
b516d05245
Merge pull request #71622 from RandomShaper/mq_bound
...
Make MessageQueue::push_callable(p) work with bound arguments
2023-01-18 17:33:34 +01:00
Pedro J. Estébanez
81b1ebddef
Make MessageQueue::push_callable(p) work with bound arguments
2023-01-18 14:54:17 +01:00
Rémi Verschelde
6da836bbb4
Merge pull request #71514 from akien-mga/os-unset_environment
...
OS: Add `unset_environment`, better validate input
2023-01-18 08:35:43 +01:00
Rémi Verschelde
4005fc4b8d
Merge pull request #71279 from vonagam/fix-iterator-number-type
...
GDScript: Fix typing of iterator in for loop
2023-01-16 22:21:26 +01:00
Rémi Verschelde
91a54cdbc1
Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checks
2023-01-16 17:01:35 +01:00
Rémi Verschelde
818a9e99a4
OS: Add `unset_environment`, better validate input
...
Instead of returning an undocumented boolean error code, we do the
validation checks that should ensure a successful result.
Based on:
- https://linux.die.net/man/3/setenv
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
2023-01-16 16:39:44 +01:00
Rémi Verschelde
5ca6c1f9db
Merge pull request #70557 from KoBeWi/class_yeet
...
Move global script class cache to separate file
2023-01-16 12:49:08 +01:00
Rémi Verschelde
d94a46ab95
Merge pull request #64021 from ajreckof/change-shortcut-for-rect-tool-tilemap
...
Add `Key::CTRL_OR_CMD` and use it to fix shortcut for tilemap painting tools on macOS
2023-01-16 12:47:07 +01:00
kobewi
6444c7d127
Move global script class cache to separate file
2023-01-16 10:16:30 +01:00
Juan Linietsky
3a93efefee
Fix cases of broken user:// paths.
...
* Properly validate paths when supplying the project name.
* Ensures that the user data dir will always be valid.
Fixes 69366.
2023-01-15 19:05:00 +01:00
ajreckof
4309dffc6a
add CMD_OR_CTRL as a Key and not just a key modifier
2023-01-15 18:49:20 +01:00
Raul Santos
7560340ef6
Rename `center` method to `get_center` in Plane.
2023-01-15 17:18:50 +01:00
Emmanuel Leblond
38d9e8b366
Add missing is_bitfield field for global enum in extension_api_dump
2023-01-14 16:08:41 +01:00
Juan Linietsky
1aaff63b8f
Fixes to JSON as resource
...
* It was not a resource, hence it was not working to load it as such.
* Changed so, when opened in editor, a parse error will not fail load and the text will be kept.
* This should allow proper editing from within the code editor, including syntax checking and saving files as-is in text.
Partially addresses #66820 .
The code editor still needs to be changed for this to work.
2023-01-14 14:41:51 +01:00
Juan Linietsky
6f0e210093
Refactor ProjectSetting overrides
...
* Overrides no longer happen for set/get.
* They must be checked with a new function: `ProjectSettings::get_setting_with_override()`.
* GLOBAL_DEF/GLOBAL_GET updated to use this
This change solves many problems:
* General confusion about getting the actual or overriden setting.
* Feature tags available after settings are loaded were being ignored, they are now considered.
* Hacks required for the Project Settings editor to work.
Fixes #64100 . Fixes #64014 . Fixes #61908 .
2023-01-13 15:13:56 +01:00
Dmitrii Maganov
40613ebd21
GDScript: Fix typing of iterator in for loop
2023-01-13 15:36:11 +02:00
Eric M
7c73b6c71c
Fix Project Settings array/dicts initial value being shared instances of the current value.
2023-01-13 21:48:43 +10:00
Rémi Verschelde
c2790ec2b9
Merge pull request #68450 from KoBeWi/bracket_escapist
...
Allow to escape closing brackets in CFG tags
2023-01-12 21:53:15 +01:00
Danil Alexeev
8f706be6fa
Rearrange `editor/naming/*` project settings
2023-01-12 11:41:13 +03:00
Rémi Verschelde
0e4e782ada
Merge pull request #70714 from Calinou/doc-os-stdin
...
Improve documentation for `OS.read_string_from_stdin()`
2023-01-12 09:24:47 +01:00
Hugo Locurcio
86b8176864
Improve documentation for `OS.read_string_from_stdin()`
...
This makes it clearer that calls to this method are blocking.
The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
Eric M
7b66806dd3
Make InputEventAction as_text() return the text of the first valid event for the action.
2023-01-12 00:10:44 +10:00
Juan Linietsky
33d3b7eea7
Fix Callable call error reporting.
...
* Fix potential crash when using bind in `Variant::get_callable_error_text()`
* Properly compute bound arguments so they can be properly shown.
* Add a function to obtain the actual bound arguments.
2023-01-10 13:56:27 +01:00
Rémi Verschelde
0231b4a0e8
Merge pull request #70726 from heppocogne/Fix-open_compressed-get_path
...
Fix `get_path()` is not working when files are opend with `open_compressed`
2023-01-10 10:48:15 +01:00
Rémi Verschelde
d3fc9d9e41
Merge pull request #71051 from vonagam/consts-are-deep-start
...
GDScript: Begin making constants deep, not shallow or flat
2023-01-09 23:22:59 +01:00
Rémi Verschelde
be4e9dfeab
Merge pull request #69616 from reduz/change-uuid
...
Ability to change a resource UID from API
2023-01-09 23:08:18 +01:00
Juan Linietsky
07a964fce3
Ability to change a resource UID from API
...
* Works for text, binary and imported resources
* Allows better clean up of duplicate files.
TODO (future PRs):
* Use this API for assigning new UIDs to copied files.
* Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
2023-01-09 18:52:00 +01: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
Rémi Verschelde
88940571f2
Merge pull request #71082 from AThousandShips/array_find_fix
...
Fix for comparisons with PackedArrays
2023-01-09 14:19:09 +01:00
Rémi Verschelde
d46568205d
Merge pull request #64795 from RandomShaper/fix_saferefcount
...
Prevent misuse of SafeRefCount
2023-01-09 14:18:53 +01:00
Pedro J. Estébanez
b1c7665866
Prevent misuse of SafeRefCount
2023-01-09 10:17:55 +01:00
Rémi Verschelde
31f94574d4
Merge pull request #70996 from reduz/properly-report-callable-bound-arguments
...
Properly report Callable bound arguments
2023-01-09 08:34:28 +01:00
Rémi Verschelde
e7905f4f48
Merge pull request #71045 from reduz/use-bitfield-in-core-types
...
Use BitField<> in core type masks
2023-01-09 08:33:26 +01:00
Juan Linietsky
0e0ca01bce
Properly report Callable bound arguments
...
Fixes #63213
Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
2023-01-08 23:35:11 +01:00
Rémi Verschelde
eff2739cf7
Merge pull request #71052 from Chaosus/fix_astargrid2d
...
Fix error in `AstarGrid2D::get_id_path`
2023-01-08 22:40:41 +01:00
Rémi Verschelde
0081c59198
Merge pull request #71013 from voidedWarranties/fix_ext_property_default_value
...
Fix `ScriptInstanceExtension::get_property_default_value` return value
2023-01-08 22:36:10 +01:00
Juan Linietsky
2b815df3c1
Use BitField<> in core type masks
...
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Ninni Pipping
86240d97e1
Fix for PackedArray comparison
2023-01-08 21:22:28 +01:00
Yuri Rubinsky
6640eb8065
Fix error in `AstarGrid2D::get_id_path`
2023-01-08 10:34:33 +03:00
Dmitrii Maganov
5e2ac1a31e
GDScript: Begin making constants deep, not shallow or flat
2023-01-08 07:29:10 +02:00
Rémi Verschelde
d642274f75
Merge pull request #70939 from bruvzg/win_screen_2
...
Add support for the custom initial screen for the main window, fix primary screen detection.
2023-01-07 13:21:36 +01:00
Rémi Verschelde
41b74c675f
Merge pull request #71000 from reduz/callable-bind-from-array
...
Allow binding Callable arguments from an array
2023-01-07 13:18:53 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection.
2023-01-07 11:14:35 +02:00
voidedWarranties
411719a399
Fix `ScriptInstanceExtension::get_property_default_value` return value
2023-01-06 19:55:02 -08:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
...
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
Rémi Verschelde
a12b326fab
Merge pull request #70995 from reduz/do-not-bind-variant-immutable
...
Unbind Variant methods that change immutable types.
2023-01-06 22:56:20 +01:00
Juan Linietsky
d762a0395a
Allow binding Callable arguments from an array
...
Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0.
Fixes #64668 .
Implements https://github.com/godotengine/godot-proposals/issues/6034
Usage:
```GDScript
callable.bindv([arg1,arg2,arg3])
```
2023-01-06 22:37:25 +01:00
Juan Linietsky
576ae694e0
Unbind Variant methods that change immutable types.
...
Fixes #62706 .
Code is commented instead of removed to clarify why they should not be re-added.
2023-01-06 17:17:43 +01:00
Yuri Rubinsky
4a45c76737
Fix jumping in `AStarGrid2D` when `DIAGONAL_MODE_NEVER` is enabled
2023-01-06 13:40:24 +03:00
Rémi Verschelde
1816f49886
Merge pull request #64253 from heppocogne/Fix-native-enum-release-1
...
Register enum type names in release build
2023-01-06 00:10:31 +01:00
Rémi Verschelde
e5f6e03490
Merge pull request #70547 from TokageItLab/pingpong-wrap
...
Fix pingpong-loop with `loop_wrap` is not working & clean-up cubic interpolation key retrieve process
2023-01-06 00:10:18 +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
Rémi Verschelde
565ae3b767
Merge pull request #67694 from aaronfranke/its-time
...
Remove duplicate Month and Weekday enums
2023-01-03 23:21:19 +01:00
Rémi Verschelde
f0893890e1
Merge pull request #70482 from bruvzg/ios_pencil
...
[iOS] Add Apple Pencil pressure and tilt support.
2023-01-03 15:51:39 +01:00
Rémi Verschelde
4e360ac612
Merge pull request #70702 from vnen/gdscript-error-on-assign-void
...
GDScript: Error when assigning return value of void function
2023-01-03 12:23:00 +01:00
Clay John
61c7b7fb13
Merge pull request #67853 from Zylann/fix_lods_with_doubles
...
Fix usages of mesh simplification functions in float=64 builds
2023-01-02 12:33:44 -07:00
Yuri Rubinsky
b28571ca3e
Optimize `wrapf` function a bit
2023-01-01 23:17:29 +03:00
George Marques
0c15844551
GDScript: Error when assigning return value of void function
...
This also makes built-in method calls empty the return value when the
method is void, to avoid keeping returning a garbage value in such case.
2022-12-30 12:08:58 -03:00
heppocogne
ea11ffc88c
Fix `get_path()` is not working when files are opend with `open_compressed`
...
And also fixed `get_absolute_path()` in the same way
2022-12-30 10:31:12 +09:00
heppocogne
6f31f7b0bc
Register native base class name of enum types when release build
2022-12-30 00:30:18 +09:00
Aaron Franke
8d7d1b0bb2
Remove duplicate Month and Weekday enums
...
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-26 15:16:25 -06:00
Silc Renew
8745c206c4
Fix pingpong with loop wrap is not working
2022-12-25 18:16:38 +09:00
Yuri Rubinsky
16efd0b0fc
Divide `AStarGrid2D::default_heuristic` into two different heuristics
2022-12-24 09:31:02 +03:00
bruvzg
223a612c0c
[iOS] Add Apple Pencil pressure and tilt support.
2022-12-23 23:44:10 +02:00
Rémi Verschelde
f5a6c9cf50
Merge pull request #62029 from Maran23/optional-default-value-project-settings
...
Allow to specify a default value in `ProjectSettings.get_setting()`
2022-12-21 22:23:43 +01:00
Marius Hanl
5aa243f9da
Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
...
Also added tests for the project settings.
Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Rémi Verschelde
186f6f0d87
Merge pull request #70403 from rburing/fix_edge_map_capacity
...
Fix edge map capacity in convex hull computer
2022-12-21 18:29:38 +01:00
Rémi Verschelde
1df71f89a8
Merge pull request #70355 from Chaosus/gds_fix_loops
...
Fix empty zero assigners for the variant types
2022-12-21 18:25:28 +01:00
Ricardo Buring
e0e45e013e
Fix edge map capacity in convex hull computer
...
The desired capacity could be less than the default, so reserve would
error.
2022-12-21 17:12:36 +01:00
stmSi
96b0fbb756
Fix crashed when compressing empty image data.
2022-12-21 16:39:35 +06:30
Rémi Verschelde
4f3ec4121a
Merge pull request #70350 from Chaosus/stringname_operator
...
Add missing != operator to `StringName`
2022-12-21 09:21:32 +01:00
Yuri Rubinsky
0bcbf8e00d
Add `get_point_position` method to `AStarGrid2D`
2022-12-20 23:21:38 +03:00
Yuri Rubinsky
fff3d812a5
Fix empty zero assigners for the variant types
2022-12-20 19:02:44 +03:00
Yuri Rubinsky
522d4243bf
Add missing != operator to `StringName`
2022-12-20 17:25:54 +03:00
Rémi Verschelde
2a04b18d37
Merge pull request #70339 from Chaosus/astargrid2d_weight_scale
...
Restore weight scale for `AStarGrid2D` (partially)
2022-12-20 13:30:37 +01:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
...
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky
71d21c7ccb
Implement basic ASTC support
...
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.
The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.
ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.
Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Yuri Rubinsky
8c478dcec9
Restore weight scale for `AStarGrid2D` (partially)
2022-12-20 12:22:32 +03:00
Rémi Verschelde
418ec03a40
Merge pull request #65990 from touilleMan/gdextension-expose-builtins-members-real-types
...
Expose in builtins' members internal type & size (on top of offset) in extension_api.json
2022-12-19 16:26:05 +01:00
Hugo Locurcio
70f6d42c92
Remove Disable Touch debug project setting
...
This project setting was only implemented and iOS and likely served
no purpose outside of debugging during development of engine features.
It was also located in a confusing location in the project settings
editor, as it was located below a root category (which appears in bold
and is normally not seen as clickable by users).
2022-12-17 18:47:29 +01:00
Rémi Verschelde
ffed638cbc
Merge pull request #70116 from Calinou/vibrate-handheld-silence-warning
...
Silence `Input.vibrate_handheld()` warning as it's already documented
2022-12-16 13:47:11 +01:00
Haoyu Qiu
207e52c161
Fix String::word_wrap() for long words
...
- Changes `TextServer.string_get_word_breaks()`
- Returns pairs of boundary start and end offsets
- Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
Hugo Locurcio
4a991887bf
Silence `Input.vibrate_handheld()` warning as it's already documented
...
The warning causes messages to be spammed if you are calling this
method in a game that runs on both desktop and mobile platforms,
unless you guard all calls to `Input.vibrate_handheld()` with
`OS.has_feature("mobile") or OS.has_feature("web")`.
Since the limitation is already documented (and is obvious enough
given the method's name), the warning message is redundant.
2022-12-16 01:12:20 +01:00
bruvzg
53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables.
2022-12-15 23:16:02 +02:00
Hei
cc245ff8a6
Fix "p_zfar" to "p_znear" in Projection.create_orthogonal
...
Was confused why it always gave inf:s.
2022-12-15 19:03:33 +02:00
Emmanuel Leblond
2c2fd0820a
Expose in builtins' members internal type & size (on top of offset) in extension_api.json
2022-12-15 12:43:42 +01:00
Rémi Verschelde
762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
...
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Jan Haller
ebb3306da3
Extension header: amend const correctness of `p_args` parameters
...
A while ago, argument arrays were passed as const GDNativeTypePtr* (void* const*)
This was changed to GDNativeConstTypePtr* (void const**), adding const on the value but removing it on the pointer level.
This commit changes argument types to const GDExtensionConstTypePtr* (void const* const*).
Besides object pointers, the same change is applied to variant pointers.
2022-12-14 18:25:30 +01:00
Bastiaan Olij
7502e1dc0d
Improve logic around using Ref<T> with GDExtension virtual functions
2022-12-13 10:54:29 +11:00
lawnjelly
491594ef0f
VariantParser make readahead optional
...
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.
This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-12 15:14:39 +00:00
Rémi Verschelde
5f35b1d516
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@adf7ec1edf
2022-12-12 13:43:15 +01:00
Pedro J. Estébanez
2095ca26d0
Add default, zeroing constructor to BitField
2022-12-12 12:12:26 +01:00
Rémi Verschelde
f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
...
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +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
kobewi
7c6b659bd7
Add PropertyInfo overload for GLOBAL_DEF
2022-12-11 21:36:48 +01:00
Rémi Verschelde
e7d892159c
Merge pull request #69538 from mihe/feature-tag-double
...
Add feature tags to signify engine float precision
2022-12-11 11:51:59 +01:00
Rémi Verschelde
907298d673
Merge pull request #68747 from rune-scape/rune-stringname-unification
...
GDScript: Unify StringName and String
2022-12-09 18:06:48 +01:00
Rémi Verschelde
2d02cb67ee
Merge pull request #69661 from Mickeon/fix-editor-cannot-disconnect-signal
...
Fix unable to disconnect signal in Editor once created
2022-12-09 07:34:29 +01:00
Micky
885f2a4eca
Fix unable to disconnect signal in Editor once created
...
Adds a CONNECT_INHERITED flag to connections, only available in editor builds. This flag denotes that the signal has been inherited from a previous Scene in the instancing hierarchy.
2022-12-08 13:36:48 +01:00
Adam Scott
4a16b8630e
Fix `ResourceLoader::thread_load_tasks` crash
2022-12-07 16:59:10 -05:00
Mikael Hermansson
8c108177d7
Add feature tags to signify engine float precision
2022-12-07 16:13:17 +01:00
Aaron Franke
d543ddf1c9
Fix Variant StringName `is_zero` being inverted
2022-12-06 21:49:43 -06:00
Rémi Verschelde
83b426bca5
Merge pull request #67906 from groud/simpler_gdextension_config
...
Remove unnecessary checks when exporting gdextension binaries and allow using a prefix to auto-detect files
2022-12-06 11:01:09 +01:00
rune-scape
e79be6ce07
Unify String and StringName
2022-12-05 21:46:47 -05:00
Rémi Verschelde
1cf1d00bc9
Merge pull request #69602 from Rindbee/fix-string-mod
...
Fix suppressed error message on error when using % format string
2022-12-05 18:06:31 +01:00
Rémi Verschelde
a50e4fed18
Merge pull request #69343 from YuriSizov/core-missing-property-revert-getters
...
Add missing public `property_*_revert` getters
2022-12-05 18:05:59 +01:00
Rindbee
694ee1bf52
Fix suppressed error message on error when using % format string
...
Before, the valid flag would always be true. On formatting errors,
an error message is returned as the result. (No error prompts.)
2022-12-05 22:09:10 +08:00
Rémi Verschelde
a738f50886
Merge pull request #69357 from TokageItLab/byebye-trigger
...
Remove `UPDATE_TRIGGER` mode from `ValueTrack::UpdateMode` & Match behaviors between `AnimationTree` and `AnimationPlayer`
2022-12-05 00:06:23 +01:00
Rémi Verschelde
f4bccf90a3
Merge pull request #69119 from lawnjelly/faster_variant_parser_master
...
Add readahead to VariantParser [4.x]
2022-12-05 00:06:14 +01:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
...
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
Emmanuel Leblond
61c900ac6f
Fix const qualifier for parameters in GDExtension api functions
2022-12-02 23:00:01 +01:00
Silc Renew
83135aa122
Remove UPDATE_TRIGGER & Match behaviors between AnimationTree/Player
...
#69357
2022-12-02 20:28:10 +09:00
Rémi Verschelde
801080a6ab
Merge pull request #69448 from BastiaanOlij/fix_etc_rgba_bgra_issue
...
ETCPAK expects BGRA data for ETC
2022-12-02 12:23:49 +01:00
Gilles Roudière
fa4143cdeb
Allow specifying a prefix to automatically detect library files for gdextension exports
2022-12-01 18:20:40 +01:00
Rémi Verschelde
96796c1518
Merge pull request #64427 from touilleMan/gdextension-skip-undefined-field-in-properties
...
[GDExtension] Skip unset getter/setter/index fields in class property
2022-12-01 18:10:26 +01:00
Rémi Verschelde
fc2241d5d8
Merge pull request #64360 from touilleMan/gdextension-correct-rect2-members-offsets-declaration
...
[GDExtension] Correct Rect2 members offsets declaration in extension_api.json generator
2022-12-01 18:10:05 +01:00
Bastiaan Olij
ebec23d8d8
ETCPAK expects BGRA data for ETC
2022-12-02 01:34:05 +11:00
Yuri Sizov
a9961b378a
Add missing public property_*_revert getters
2022-11-29 23:07:40 +03:00
Yuri Sizov
cdd99e9bec
Merge pull request #69338 from akien-mga/pm-fix-hacky-project-rename
...
Project Manager: Fix hacky code for project rename
2022-11-29 22:55:42 +03:00
Fabio Alessandrelli
2c576eb281
[Core] Fix Resource.resource_name type.
...
The methods returns a String, but the Variant was bound as a StringName.
We could alternatively change the method return type but that's a
breaking change which will requires code changes in other parts of the
engine.
2022-11-29 15:43:08 +01:00
Rémi Verschelde
f21f75eb6f
Project Manager: Fix hacky code for project rename
...
Instantiating a new ProjectSettings is *not* the way to go.
ConfigFile works just fine to read/change a single value.
Fixes memory leaks as the instantiated ProjectSettings was never freed.
Forbid doing this to prevent such problems.
Fixes #25661 .
2022-11-29 15:38:22 +01:00
Rémi Verschelde
6fdbf79046
Merge pull request #67680 from haasanen/fix_physics_thread_race_condition
...
Fix physics/3d/run_on_separate_thread race condition in WorkerThreadPool (crash).
2022-11-29 13:41:56 +01:00
kobewi
0765908868
Don't break parsing on missing resources
2022-11-28 16:19:15 +01:00
Rémi Verschelde
ead82feb24
Merge pull request #69008 from akien-mga/property-hint-array-type-resource-simplify
...
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources
2022-11-25 19:29:05 +01:00
Micky
67cdac6db8
Remove `Array.find_last()`
2022-11-25 18:34:50 +01:00
Rémi Verschelde
4a8b725bc9
Merge pull request #68386 from MewPurPur/snappedi-snappedf
...
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-24 18:54:49 +01:00
Rémi Verschelde
0d202cb5f1
Merge pull request #69111 from TokageItLab/put-together-interpolations
...
Refactor interpolating functions in some classes to use `Math` class
2022-11-24 18:54:30 +01:00
lawnjelly
5df29fec20
Add readahead to VariantParser
...
Adds a readahead buffer to VariantParser, to prevent large numbers of freads for single bytes, which is inefficient.
2022-11-24 15:54:16 +00:00
Rémi Verschelde
5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources
2022-11-24 14:06:00 +01:00
Rémi Verschelde
eb8ce8d74e
Merge pull request #68833 from BastiaanOlij/improve_extension_logic
...
Improve logic for detecting and tracking extensions
2022-11-24 13:24:31 +01:00
Silc Renew
b217c41d36
Refactor interpolating functions in some classes to use Math class
2022-11-24 20:31:43 +09:00
Bastiaan Olij
a479f5af22
Improve logic for detecting and tracking extensions
2022-11-24 21:48:16 +11:00
Yaohua Xiong
f9fa182abc
Refactor Curve3D::_bake() method
...
The main change is to caculate tangent directly from bezier curve, without going
through discretized polyline, avoiding pitfalls of discretization.
Other changes are:
1. Add an bezier_derivative() method for Vector3, Vector2, and Math;
2. Add an tesselate_even_length() method to Curve3D, which tesselate bezier curve to even length segments adaptively;
3. Cache the tangent vectors in baked_tangent_vector_cache;
2022-11-24 10:52:06 +08:00
Rémi Verschelde
3791872c65
Merge pull request #67726 from HenryClones/integer-lerping-errors
...
Add case for Variant::INT in lerp variant switch
2022-11-23 08:33:53 +01:00
Xpertice
3e36cc7c73
Add case for Variant::INT in lerp variant switch
2022-11-22 22:37:22 -05:00
Michael Alexsander
a4e2978352
Make `Input.get_vector()` check for plain `strength` instead of the raw one
2022-11-22 18:18:56 -03:00
Rémi Verschelde
65a45eb7e3
Merge pull request #64284 from kleonc/image-rotate90-in-place
...
`Image` Fix `rotate_90`/`rotate_180` methods
2022-11-22 21:18:58 +01:00
ocean (they/them)
9187f5c849
Fixes inability to assign script after clearing
2022-11-21 19:43:46 -05:00
Micky
e791f4fce2
Double precision of `String.split_floats`
2022-11-20 12:29:50 +01:00
VolTer
e26f0906f2
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-19 06:18:55 +01:00
Andy Maloney
cb6cffbfd9
Static analysis: remove "break" after "return"
...
Changes as requested to keep in sync with godotengine/godot-cpp#929
2022-11-18 17:57:33 -05:00
Rémi Verschelde
8e00e71d35
Merge pull request #67619 from nongvantinh/fix-calling-pckpacker-crash
...
Fixes engine crashes caused by the user failing to initialize PCKPacker with pck_start()
2022-11-17 11:57:23 +01:00
Rémi Verschelde
846f671709
Merge pull request #68701 from Bromeon/bugfix/extension-header-cleanup
...
Extension header: fix typos, documentation and member order
2022-11-16 09:59:42 +01:00
Jan Haller
09f84102e3
Extension header: fix typos, documentation and member order
2022-11-16 00:51:48 +01:00
Rémi Verschelde
cfb9cae23a
Merge pull request #62814 from KoBeWi/strint
...
Restore numeric from String constructors
2022-11-15 22:29:55 +01:00
Rémi Verschelde
d0025a1f02
Merge pull request #64077 from Calinou/tweak-audiostreamplayer2d3d-default-panning
...
Decrease default AudioStreamPlayer2D/3D panning strength
2022-11-15 22:29:23 +01:00
Rémi Verschelde
09efe15d10
Merge pull request #67688 from Mickeon/i-forgror- ☠️ ☠️
...
Remove `PROPERTY_HINT_IMAGE_COMPRESS` constants
2022-11-15 16:25:13 +01:00
Rémi Verschelde
94e9860b82
Merge pull request #65836 from Calinou/add-max-physics-steps-per-frame-setting
...
Implement adjusting the maximum number of physics steps per rendered frame
2022-11-15 16:24:56 +01:00
Micky
b4324e7a45
Remove `PROPERTY_HINT_IMAGE_COMPRESS` constants
...
These were used in 3.x but there's no reference of them in the codebase, at all.
2022-11-15 15:28:49 +01:00
Rémi Verschelde
1959284769
Merge pull request #68229 from Mickeon/c-escape-hell
...
Remove "?" from String.c_escape()
2022-11-14 23:24:35 +01:00
Rémi Verschelde
80dbcfd995
Merge pull request #68657 from Sauermann/fix-redundant-initialization
...
Remove redundant non-trivial Variant types initializations
2022-11-14 23:23:54 +01:00
Hugo Locurcio
efe3220b2e
Fix periods in editor strings and messages
...
- Ensure all strings with ellipsis end with 3 periods instead of 2.
- Fix extraneous period in "Error calling from signal '...' to callable"
messages.
2022-11-14 19:36:36 +01:00
Markus Sauermann
3b14f0334c
Remove redundant Variant-types initializations
2022-11-14 19:35:19 +01:00
Rémi Verschelde
beed90ea6d
Merge pull request #67963 from KoBeWi/den_of_actions
...
Fix nested actions in EditorUndoRedoManager
2022-11-14 18:29:46 +01:00
Fabio Alessandrelli
67265d14f7
[MP] Move engine and editor profilers to a plugin.
...
Also refactor the editor plugin out of the ReplicationEditor.
2022-11-14 15:09:00 +01:00
Rémi Verschelde
471c42ee1f
Merge pull request #64530 from bruvzg/svg_in_ot
2022-11-14 14:32:22 +01:00
Rémi Verschelde
f070cf9a75
Merge pull request #68644 from alcomposer/print_all_midi_event_info
2022-11-14 14:18:55 +01:00
alcomposer
73db3b67df
add controller_number & controller_value to allow printing of all MIDI event data
2022-11-14 21:55:43 +10:30
Rémi Verschelde
5b3a03bf5c
Merge pull request #68448 from bruvzg/font_imp_tr
...
[Font] Add an import option to pre-render all glyphs required for the translation.
2022-11-14 11:12:01 +01:00
Emmanuel Leblond
a2e6e996b2
Skip unset getter/setter/index fields in class property when generating extension_api.json
2022-11-12 20:13:00 +01:00
Emmanuel Leblond
ce11ba2e30
Correct Rect2 members offsets declaration in extension_api.json generator
2022-11-12 20:12:04 +01:00
Rémi Verschelde
324106b3df
Merge pull request #68549 from touilleMan/gdextension-revert-get_property_type_func-removal
...
Revert removal of GDNativeExtensionScriptInstanceInfo::get_property_type_func in GDExtension
2022-11-12 08:43:50 +01:00
Emmanuel Leblond
39c039a363
Revert removal of GDNativeExtensionScriptInstanceInfo::get_property_type_func in GDExtension
...
This function pointer is needed to stay close to internal Godot's ScriptInstance class.
Besides, by removing this function pointer, we had to do property list create/free each time
we want to access type which is quadratic complexity :/
2022-11-12 04:18:21 +01:00
Marc Gilleron
2aefdcc26e
Fix usages of mesh simplification functions in float=64 builds
2022-11-12 00:38:00 +00:00
bruvzg
35528b800c
[Font] Add an import option to pre-render all glyphs required for the translation.
2022-11-10 10:43:15 +02:00
gnumaru
75e617c05d
fix a buffer overflow due to a misbehaving vcrt snprintf call on String::num, at core/string/ustring.cpp
2022-11-09 10:25:52 -03:00
kobewi
0d122ce459
Allow to escape closing brackets in CFG tags
2022-11-09 14:00:51 +01:00
Aaron Franke
a3e52925bf
Fix default values on virtual classes causing errors in projects
2022-11-09 01:59:53 -06:00
Emmanuel Leblond
1e8756c94b
Use StringName in the whole GDExtension API instead of const char *
2022-11-08 21:44:07 +01:00
Emmanuel Leblond
84262efd2a
Uses `StringName` in GDExtension perf critical instance creation & method/properties setter/getter
2022-11-08 21:44:07 +01:00
Rémi Verschelde
40ed34f6dc
Merge pull request #68373 from akien-mga/extension-api-json-newline-eof
...
GDExtension: Ensure newline at EOF
2022-11-08 10:50:46 +01:00
kobewi
d9f066d5fa
Remove duplicate project settings definitions
2022-11-08 01:29:39 +01:00
Rémi Verschelde
669888b9cf
GDExtension: Ensure newline at EOF
2022-11-07 14:32:43 +01:00
Aaron Franke
3dc9474355
Fix default values not showing up on virtual classes
2022-11-06 15:05:36 -06:00
Rémi Verschelde
e95dec0c64
Merge pull request #67614 from aaronfranke/virtually-virtual
...
Don't allow instancing virtual node types in the Create New Node dialog
2022-11-06 15:57:49 +01:00
Rémi Verschelde
12b4a263ee
Merge pull request #67730 from KoBeWi/late_to_the_call
...
Add call_deferred() method to Callable
2022-11-06 15:55:43 +01:00
Aaron Franke
ba542444e3
Don't allow instancing virtual node types in the Create New Node dialog
2022-11-05 14:45:16 -05:00
kobewi
1778301cd0
Add call_deferred() method to Callable
2022-11-04 17:24:34 +01:00
kobewi
8a47a12207
Add support for empty delimiter in String.split
2022-11-04 15:09:12 +01:00
bruvzg
d77902f33a
Implement SVG in OT support.
2022-11-04 14:10:54 +02:00
Micky
521d8a5d24
Remove "?" from String.c_escape()
2022-11-03 19:52:21 +01:00
Rémi Verschelde
3eaf49765b
Merge pull request #68192 from aaronfranke/unify-node3d-euler
...
Unify Node3D RotationOrder with global EulerOrder
2022-11-03 12:07:42 +01:00
Aaron Franke
9e952c8386
Allow getting Quaternion rotation in different Euler orders
2022-11-02 19:20:10 -05:00
Aaron Franke
9225eb461e
Unify Node3D RotationOrder with global EulerOrder
2022-11-02 17:46:03 -05:00
Rémi Verschelde
08d56ac2f1
Merge pull request #66747 from aaronfranke/move-euler-order
...
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 22:37:12 +01:00
Rémi Verschelde
9ec7aadc06
Merge pull request #66017 from Mickeon/rename-image-copy-rect
...
Rename Image's `get_rect` to `get_region`
2022-11-02 22:36:57 +01:00
Aaron Franke
8556fdd4bc
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 13:44:13 -05:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
...
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
39cece382d
Merge pull request #68170 from alfredbaudisch/clear-selection-shortcut
...
Unified shortcut to clear carets and selections from TextEdit
2022-11-02 18:54:19 +01:00
Rémi Verschelde
d2e1b4b9f0
Merge pull request #68118 from aaronfranke/quat-from-euler
...
Replace Quaternion Euler constructor with `from_euler` method
2022-11-02 18:51:59 +01:00
Rémi Verschelde
62ed75df9c
Merge pull request #64830 from dalexeev/color-hide-internals
...
Remove internal functions of named colors from the public API
2022-11-02 18:51:27 +01:00
Rémi Verschelde
d3a6855dfc
Merge pull request #66361 from dalexeev/remove-int-plus-string
...
Unexpose confusing `String + int` and `int + String` operations
2022-11-02 18:51:16 +01:00
Alfred Reinold Baudisch
a862583d05
Unified shortcut to clear carets and selections
...
Refactors`ui_text_remove_secondary_carets` from https://github.com/godotengine/godot/pull/68089 as `ui_text_clear_carets_and_selection`, with extra behaviour:
- If there's only one active caret active with a selection, clears the selection.
- In case there's more than one caret active, removes the secondary carets and clears selections.
With this change, `TextEdit` then imitates the behaviour of VSCode for clearing carets and selections.
2022-11-02 18:23:24 +01:00
Rémi Verschelde
b3c2db954f
Merge pull request #68136 from qarmin/projection_not_equal
...
Support for checking that Projection is(not) null
2022-11-02 14:17:29 +01:00
Rémi Verschelde
632b3e974c
Merge pull request #67693 from Mickeon/slight-hint-shuffling
...
Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE
2022-11-02 14:16:53 +01:00
Micky
ebf86c96e9
Rename Image's `get_rect` to `get_region`
...
Also renames its parameter to from "rect" to "region".
2022-11-01 23:35:48 +01:00
Rafał Mikrut
d7d130295e
Support for checking that Projection is(not) null
2022-11-01 20:49:52 +01:00
Aaron Franke
83634119d4
Replace Quaternion Euler constructor with `from_euler` method
2022-11-01 09:28:12 -05:00
dzil123
1fa8b3dd42
Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
2022-11-01 03:54:04 -07:00
Alfred Reinold Baudisch
fcff978763
Shortcut and Bind to Remove Secondary Carets
...
Adds the bind `ui_text_remove_secondary_carets` to TextEdit, with ESC as the default shortcut.
When the bind is performed, if the TextEdit has multiple carets, `remove_secondary_carets` is called and secondary carets are removed.
This is useful when multiple selects are performed with `add_select_for_next_occurrence` #67644 or when multiple multiple carets are manually added, then it's possible to go back to a single caret with a shortcut.
Closes #67991
2022-10-31 17:44:47 +01:00
Rémi Verschelde
0e9878b12a
Merge pull request #67931 from bruvzg/locale_no_def
...
Do not auto add default script and country codes to the locale.
2022-10-31 14:30:18 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
...
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
...
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Rémi Verschelde
6946bc56ef
Merge pull request #67309 from groud/implement_gdnative_interface_h_dump
...
Implement a way to dump the gdnative_interface.h file from the executable
2022-10-31 11:54:38 +01:00
Rémi Verschelde
40258bbbe8
Merge pull request #67577 from qarmin/fix_exporting_big_templates
...
Fix exporting with big export templates
2022-10-31 10:39:08 +01:00
Rémi Verschelde
d0fbeec66a
Merge pull request #67580 from KoBeWi/little_things
...
Minor code improvements
2022-10-31 10:34:57 +01:00
Rémi Verschelde
273410ba5a
Merge pull request #67139 from PucklaMotzer09/insert_caret_at_carets
...
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-31 10:32:07 +01:00
Clay John
e3b66ff9e3
Merge pull request #67621 from groud/resource_saver_expose_recognize_path
...
Expose the logic to recognize a save path in ResourceSaver
2022-10-28 10:56:32 -07:00
Gilles Roudière
e23f82f3c1
Expose the logic to recognize a save path in ResourceSaver
2022-10-28 11:15:25 +02:00
kobewi
d7ebf725c9
Fix nested actions in EditorUndoRedoManager
2022-10-28 02:54:55 +02:00
Clay John
0486810697
Merge pull request #67644 from alfredbaudisch/add-selection-next-occurrence
...
Add Selection and Caret for Next Occurrence of Selection
2022-10-27 17:21:49 -07:00
Clay John
682156e1f0
Merge pull request #66383 from aaronfranke/basis-from-euler
...
Clean up Basis from Euler code
2022-10-27 09:44:21 -07:00
bruvzg
ec3c4fcba9
Do not auto add default script and country codes to the locale.
2022-10-27 09:31:05 +03:00
Yuri Rubinsky
adec51cde8
Fix crash when calling `fill` method on an empty `Image`
2022-10-24 11:28:10 +03:00
Fredia Huya-Kouadio
8b37511364
Merge pull request #67755 from m4gr3d/input_event_screen_touch_double_tap_main
...
Add double_tap attribute to InputEventScreenTouch
2022-10-23 08:11:49 -07:00
Yuri Rubinsky
38691d5b1d
Merge pull request #67655 from MewPurPur/remove-dupe-registrations
2022-10-23 09:54:06 +03:00
Fredia Huya-Kouadio
13e4770b97
Add double_tap attribute to InputEventScreenTouch
...
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
2022-10-22 07:30:46 -07:00
Aaron Franke
7f9a8c99c9
Clean up Basis from Euler code
2022-10-21 17:54:49 -05:00
Max Hilbrunner
e73ff0e961
Merge pull request #67636 from groud/fix_localize_path
...
Fix localize_path with custom protocol identifiers
2022-10-21 18:47:21 +02:00
Max Hilbrunner
5cefc07d90
Merge pull request #67444 from nonunknown/array_pick_random
...
Add ability to pick random value from array
2022-10-21 16:25:52 +02:00
Danil Alexeev
653e8f5c86
Remove internal functions of named colors from the public API
2022-10-21 11:21:43 +03:00
Alfred Reinold Baudisch
7d15ecc3af
Add Selection and Caret for Next Occurrence of Selection
...
Adds the bind `add_selection_for_next_occurrence` to TextEdit, with CTRL+D as the default shortcut.
When the bind is performed, ff a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.
If no selection is currently active with the last caret in text fields, selects the word currently under the caret.
The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets. The viewport is adjusted to the latest newly added caret.
The bind and the behaviour is similar to VS Code's "Add Selection to Next Find Match" and JetBrains' "Add Selection for Next Occurrence". It takes advantage of the multi-caret API.
The default shortcut for `select_word_under_caret` has been changed to ALT+G, in order to give priority to CTRL+D for `add_selection_for_next_occurrence` to better align with popular IDEs and editors.
2022-10-21 08:26:53 +02:00
Micky
9a1d87f66f
Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE
2022-10-21 01:10:38 +02:00
Simo Haasanen
4cc3489bc0
Fixes HashMap::erase related race condition in WorkerThreadPool when Physics 2D or 3D is selected to run on a separate thread.
2022-10-20 17:47:20 +01:00
Gilles Roudière
56fa8f1d58
Fix localize_path with custom protocol identifiers
2022-10-20 14:12:25 +02:00
Nonunknown
9f4dbf415d
add ability to pick random value from array
2022-10-20 08:39:47 -03:00
VolTer
1fd59b98fb
Remove duplicate operator registrations
2022-10-20 03:03:47 +02:00
Nong Van Tinh
5194c8af7c
Fixes engine crashes caused by the user failing to initialize PCKPacker with pck_start()
2022-10-19 20:19:02 +07:00
Rafał Mikrut
86fa3ba560
Fix exporting big templates
2022-10-19 08:29:29 +02:00
kobewi
d06a8320e5
Simplify GDVIRTUAL_CALL calls
2022-10-19 00:05:48 +02:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
kobewi
4aaed4fee1
Minor code improvements
2022-10-18 16:44:57 +02:00
PucklaMotzer09
e5354cacd0
Add Caret Insert Below and Above shortcuts to TextEdit
2022-10-18 10:38:53 +02:00
Rémi Verschelde
fde8838316
Merge pull request #67463 from aaronfranke/num-real-negative
...
Fix big negative numbers printing incorrect decimals in `num_real`
2022-10-17 17:31:47 +02:00
Rémi Verschelde
00d44a9c73
Merge pull request #67118 from Mickeon/ ⬛
...
Fix Typed Array of Objects not accepting `null`.
2022-10-17 17:30:38 +02:00
Ricardo Buring
1d5aa74ac3
GDExtension: add support for abstract and virtual classes
2022-10-16 09:02:49 +02:00
Aaron Franke
c60ac64e8f
Fix big negative numbers printing incorrect decimals in num_real
2022-10-15 17:57:54 -05:00
Rémi Verschelde
dc4b616596
Merge pull request #63332 from KoBeWi/static_images_aka_photos
...
Make some Image methods static
2022-10-15 12:56:57 +02:00
Rémi Verschelde
96ec73f3ee
Merge pull request #65281 from MisterMX/zip-module
...
Expose minizip API to allow creating zips using scripts
2022-10-15 12:56:26 +02:00
Marcelo Fernandez
ea6cc3e260
Expose minizip API to allow creating zips using scripts
...
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
Co-authored-by: James Westman <flyingpimonster@gmail.commail>
Co-authored-by: MisterMX <mbxd12@web.de>
Signed-off-by: MisterMX <mbxd12@web.de>
2022-10-14 21:51:38 +02:00
kobewi
072f6feaba
Make some Image methods static
2022-10-14 14:34:15 +02:00
Rémi Verschelde
926429392a
Merge pull request #67057 from Anutrix/rng-generator-default-seed
2022-10-13 21:17:09 +02:00
Rémi Verschelde
46a1b92bb7
Merge pull request #66294 from reduz/optimize-convex-collision
2022-10-13 20:34:00 +02:00
Juan Linietsky
71d2e38cb5
Optimize Convex Collision
...
Implements the Gauss Mapping optimization to SAT convex collision test.
* Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf ) by Dirk Gregorius.
* Requires adding of face information to edges in MeshData
* Took the chance to convert MeshData to LocalVector for performance.
2022-10-13 19:07:53 +02:00
Rémi Verschelde
6ad5637ffc
Merge pull request #66427 from Mickeon/object-methods-autocompletion
...
Add autocompletion to several Object methods
2022-10-13 18:41:24 +02:00
Rémi Verschelde
99bc4905cb
Merge pull request #67138 from touilleMan/gdextension-typed-enum-in-struct
...
Use enum type in GDExtension info structs for better readability
2022-10-13 15:25:11 +02:00
Rémi Verschelde
f12c4e8b9a
Merge pull request #67251 from groud/simplify_path_solve_urls
...
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 15:24:18 +02:00
Gilles Roudière
bf1a40c168
Make String.simplify_path keep the protocol identifier for urls
2022-10-13 12:23:49 +02:00
Gilles Roudière
55010a2d9f
Implement a way to dump the gdnative_interface.h file from the executable
2022-10-13 10:03:30 +02:00
Rémi Verschelde
35670c36cf
Merge pull request #67300 from Mickeon/indexed-objection
...
Rename `set`/`get_indexed`'s "property" to "property_path"
2022-10-12 14:45:05 +02:00
Rémi Verschelde
1a660c6776
Merge pull request #67298 from Splizard/fix_unamed_args_gdextension
...
Fix _unnamed_arg so that arguments defined by GDExtension show up in the editor docs.
2022-10-12 14:45:00 +02:00
Micky
dc51ff8c5b
Rename `set`/`get_indexed`'s "property" to "property_path"
...
Also touches up the Documentation slightly.
2022-10-12 10:27:44 +02:00
Quentin Quaadgras
6bc16660cc
Fix _unnamed_arg so that arguments defined by GDExtension show up in docs.
...
The Godot API (gdnative_interface.h) allows methods to be registered on
extension classes with
`classdb_register_extension_class_method`
a `GDNativeExtensionClassMethodInfo` can be provided to this function
along with a `get_argument_info_func` which according to the comment
indicates that argument names should be definable here.
Unfortunately, setting the name field in the `GDNativePropertyInfo`
struct has no effect on the editor documentation, which continues to
display "_unnamed_arg" for each argument.
I discovered that `get_argument_info` is responsible for this as it
always overrides the `info.name`. I've added an if condition that will
only override the name when it is empty. I've tested this with my
GDExtension module and I can confirm that with this commit, the argument
name shows up in the builtin docs. eg. in Lookup Symbol.
2022-10-12 21:23:34 +13:00
Rémi Verschelde
3852b5017c
Merge pull request #66003 from voidshine/fix_midi_event_mutation
...
Fix MIDI note-on events being converted to note-off events
2022-10-12 08:55:09 +02:00
voidshine
f0f72b3132
Fix MIDI note-on events being converted to note-off events
...
Update documentation with note about MIDI velocity interpretation
2022-10-11 12:40:28 -07:00
Rémi Verschelde
736a2df437
Merge pull request #67244 from RandomShaper/split_render_further_2
...
Polish rendering driver refactor further (take 2)
2022-10-11 21:08:42 +02:00
Pedro J. Estébanez
f82deaa5b3
Polish rendering driver refactor further (take 2)
2022-10-11 19:06:55 +02:00
Rémi Verschelde
5aadc618b6
Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
...
Fetch video adapter driver name and version from OS
2022-10-11 13:59:53 +02:00
Rémi Verschelde
07b488e643
Merge pull request #67241 from groud/expose_resource_format_loader_recognize_path
...
Exposes ResourceFormatLoader.recognize_path to scripting
2022-10-11 13:46:24 +02:00
MJacred
de768afbdc
Fetch video adapter driver name and version from OS on Linux/*BSD and Windows
2022-10-11 12:39:41 +02:00
Gilles Roudière
8aa904f56c
Exposes ResourceFormatLoader.recognize_path to scripting
2022-10-11 12:35:27 +02:00
Rémi Verschelde
6e7c6e50d8
Merge pull request #67217 from touilleMan/gdextension-implement-get_documentation
...
Implement ScriptExtension::get_documentation
2022-10-11 09:27:58 +02:00
Rémi Verschelde
6d9d220d64
Merge pull request #67224 from Mickeon/jason
...
Use `JSON::stringify` where possible
2022-10-11 09:27:53 +02:00
Rémi Verschelde
4d5d33f7ff
Merge pull request #67126 from Mickeon/i-was-very-bored
...
Strip unnecessary break on switches returning early in Variant
2022-10-11 09:27:17 +02:00
Rémi Verschelde
58eff50bf1
Merge pull request #64268 from timothyqiu/is-finite
...
Add `is_finite` method for checking built-in types
2022-10-11 09:25:46 +02:00
Emmanuel Leblond
13c0a60747
Implement ScriptExtension::get_documentation
2022-10-11 08:22:25 +02:00
Micky
fe56c1ff75
Use `JSON::stringify` where possible
2022-10-11 00:27:23 +02:00
Micky
41dcc36643
Strip unnecessary break on switches returning early in Variant
...
Tweaks comments around the touched-up parts. Also tweaks spacing
Also adds some spacing in all cases of Variant::`reference()`. This is a special for consistency, because it ends up making the cases more readable.
2022-10-10 22:09:51 +02:00
Rémi Verschelde
28f642097a
Merge pull request #67183 from akien-mga/gcc-warnings-cleanup
...
SCons: Cleanup GCC warnings configuration
2022-10-10 17:42:36 +02:00
Rémi Verschelde
2fe8ac085b
Merge pull request #64692 from touilleMan/no-variant-destructor-for-struct-builtins
...
Remove Transform2/3D,AABB,Basis from Variant destructors given they are POD structs
2022-10-10 17:42:08 +02:00
Rémi Verschelde
8017827144
SCons: Re-enable treating `#warning` as error with `werror`
...
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.
We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
Rémi Verschelde
4e4e16f9a9
SCons: Cleanup GCC warnings configuration
...
- Outright disable spammy warnings due to past or present GCC bugs:
* `-Wno-strict-overflow` for GCC 7.
* `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in
earlier releases but at this stage we don't care).
* `-Wno-return-type` for GCC 12/13 (regression, still not fixed).
- Enable extra warnings conditionally when broken on earlier GCC:
* `-Wnoexcept` was removed due to an upstream regression in GCC 9, could
be re-enabled (but commented out for now as we actually have `-Wnoexcept`
warnings to fix.
* `-Wlogical-op` was broken on our variadic templates before GCC 11, now
seems fine.
2022-10-10 16:12:26 +02:00
Rémi Verschelde
77f4670d00
Merge pull request #66774 from touilleMan/fix-variant-type-in-extension-api-dump
...
Fix Variant types displayed as `Nil` in extension_api.json
2022-10-10 13:55:37 +02:00
Emmanuel Leblond
a9aedb0cf2
Fix extension_api.json Variant types incorrectly displayed as `Nil`
2022-10-10 13:54:33 +02:00
Rémi Verschelde
51bb3c36dd
Merge pull request #66584 from rune-scape/rune-validated-call-obj-bug
...
Fix unset `ObjectID` with validated `get_object()` call
2022-10-10 13:53:26 +02:00
kobewi
14b82c36a2
Defer clearing of ResourceUID cache and silence warnings
2022-10-10 11:20:23 +02:00
Rémi Verschelde
d56bc19905
Merge pull request #67165 from touilleMan/gdextension-remove-GDNativeExtensionClassObjectInstance
...
Remove unused `GDNativeExtensionClassObjectInstance` type def from GDExtension
2022-10-10 10:03:05 +02:00
Rémi Verschelde
bfffc06eb1
Merge pull request #67131 from KoBeWi/simplify_the_simplify
...
Fix `simplify_path()` breaking `uid://`
2022-10-10 10:02:41 +02:00
Emmanuel Leblond
aa76a905c7
Remove unused `GDNativeExtensionClassObjectInstance` type def from GDExtension
2022-10-10 01:15:07 +02:00
Hugo Locurcio
66f7c48e39
Implement adjusting the maximum number of physics steps per rendered frame
...
When using high physics FPS (which is a requirement to minimize input
lag and improve precision in simulation racing games), a higher value
prevents the game from slowing down at low rendering FPS.
This can be done via an Engine property for run-time changes,
or a project setting for initial changes.
2022-10-09 23:00:09 +02:00
Emmanuel Leblond
1bd3597362
Use enum type in GDExtension info structs for better readability
2022-10-09 17:07:13 +02:00
kobewi
785e5880b3
Fix simplify_path() breaking uid://
2022-10-09 14:22:13 +02:00
Micky
bf64a068a4
Fix Array.`slice()` and `filter()` forgetting Typed Array
2022-10-09 12:34:19 +02:00
Micky
03bef1562b
Fix Typed Array of Objects not accepting `null`.
2022-10-09 10:32:48 +02:00
Anutrix
a871114339
Randomize RandomNumberGenerator instances' default seed
2022-10-08 12:26:26 +05:30
Haoyu Qiu
48e0688d8f
Validate input in `ScriptServer::register_language`
2022-10-08 14:12:25 +08:00
Haoyu Qiu
5da515773d
Add `is_finite` method for checking built-in types
2022-10-08 13:25:08 +08:00
Aaron Franke
43722dbcbc
Use float literals for float calculations in Color
2022-10-07 11:28:47 -05:00
Rémi Verschelde
62b066dbd6
Fix more MSVC C4702 (unreachable code) warnings
2022-10-07 14:43:59 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4.
2022-10-07 11:32:33 +03:00
Rémi Verschelde
e727606f7b
Merge pull request #66962 from aaronfranke/core-struct-includes
...
Enhancements to includes in core data structures
2022-10-06 08:57:05 +02:00
Rémi Verschelde
c2c9a582da
Merge pull request #64815 from RandomShaper/default_cpu_count
...
Improve default `OS`'s CPU count getter
2022-10-06 08:55:51 +02:00
Aaron Franke
97d232c11d
Enhancements to includes in core data structures
2022-10-05 23:11:02 -05:00
Pedro J. Estébanez
6bf02c0162
Keep a single, portable implementation of `OS::get_processor_count()`
2022-10-05 20:10:47 +02:00
Waridley
0863cf96e4
free NativeExtensionMethodBinds on unregister
2022-10-05 11:46:00 -05:00
Rémi Verschelde
33f4c5282f
Merge pull request #64819 from RandomShaper/enhance_thread_funcs
...
Enhance portability of threading
2022-10-05 11:42:35 +02:00
Rémi Verschelde
9cd62741bb
Merge pull request #66839 from aaronfranke/editor-prop-hide-slider
...
Fix `hide_slider` vs `no_slider` inconsistency in editor property code
2022-10-05 08:47:06 +02:00
Rémi Verschelde
53403972ef
Merge pull request #66886 from akien-mga/error-print-cleanup
...
Logger: Don't print error twice on `ERR_PRINT`
2022-10-05 08:37:19 +02:00
Rémi Verschelde
3a2b0ab73d
Merge pull request #66898 from aaronfranke/proj-mat-columns
...
Rename Projection `matrix` to `columns`
2022-10-05 08:35:26 +02:00
Hugo Locurcio
6afbf0bd5a
Improve dictionary printing to avoid confusion with arrays
...
- Add leading and trailing spaces within dictionaries, as the `{}`
characters are hard to distinguish from `[]` on some fonts.
This is especially helpful with empty arrays and dictionaries.
2022-10-04 20:33:40 +02:00
Aaron Franke
2cea42cc7f
Rename Projection `matrix` to `columns`
2022-10-04 12:34:19 -05:00
Rémi Verschelde
ac3917c42f
Logger: Don't print error twice on `ERR_PRINT`
...
Also fix broken `ERR_PRINT_ED` macro and simplify comments.
For the record these macros aren't used yet, they're intended to be used
where needed to surface messages in the toaster when useful to end users,
but we haven't done that codebase review yet.
2022-10-04 17:56:30 +02:00
Pedro J. Estébanez
958ecf55fe
Enhance portability of threading
2022-10-04 11:43:28 +02:00
Rémi Verschelde
68765b8831
Merge pull request #66274 from Calinou/engine-rename-max-fps
...
Rename `Engine.target_fps` and associated project setting to `max_fps`
2022-10-04 11:19:56 +02:00
Rémi Verschelde
cd7f172cf8
Merge pull request #66804 from akien-mga/core-remove-NO_SAFE_CAST
...
Remove unsupported `NO_SAFE_CAST`/`-fno-rtti` from Android build
2022-10-04 10:22:24 +02:00