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
Hugo Locurcio
1c6c72caf1
Rename Engine.target_fps
and associated project setting to max_fps
...
This makes the setting easier to find, as research has found there are
numerous use cases to limiting FPS. This also improves documentation
related to the Engine property and project setting.
The project setting also works in projects exported in release mode,
so its location in the `debug/` section was misleading.
2022-10-03 23:54:36 +02:00
Aaron Franke
094e8db97c
Fix hide_slider vs no_slider inconsistency in editor property code
2022-10-03 13:40:31 -05:00
Rémi Verschelde
d598fff7c2
Merge pull request #66803 from akien-mga/core-remove-NO_THREADS
...
Remove `NO_THREADS` fallback code, Godot 4 requires thread support
2022-10-03 14:51:02 +02:00
Rémi Verschelde
04a28763c0
Merge pull request #65751 from Faless/os/4.x_expose_read_from_stdin
2022-10-03 14:08:00 +02:00
Fabio Alessandrelli
9e50007df6
Merge pull request #66814 from Faless/web/4.x_ps3_gamepad_ff_linux
...
[Web] Add PS3 gamepad mapping for FF+Linux.
2022-10-03 14:00:12 +02:00
Fabio Alessandrelli
0fe0505f77
[Web] Add PS3 gamepad mapping for FF+Linux.
2022-10-03 13:06:50 +02:00
Rémi Verschelde
54418ea659
Remove NO_THREADS fallback code, Godot 4 requires thread support
...
This also removes `OS::can_use_threads` from the public API since it's always
true.
2022-10-03 11:23:26 +02:00
Rémi Verschelde
82b87d7a17
Remove unsupported NO_SAFE_CAST
/-fno-rtti
from Android build
...
Android was the last platform to still attempt to disable RTTI (for binary
size), but both the Android editor and now the ICU library used by templates
need RTTI.
There could still be the possibility to support this for non-ICU template
builds (i.e. without the TextServerAdvanced module), but since this isn't one
of the build configurations we test regularly it's pretty risky to keep this
option only for that specific use case. And our code is already littered with
`dynamic_cast`s which weren't guarded with `!defined(NO_SAFE_CAST)`.
2022-10-03 11:18:31 +02:00
Rémi Verschelde
a377c5ca22
Merge pull request #66655 from MisterMX/feat/astargrid2d-vector2i
...
refactor(AStarGrid2D): Return `Vector2i` in `get_id_path`
2022-10-03 09:24:40 +02:00
Rémi Verschelde
d9a3888cea
Merge pull request #66133 from aaronfranke/set-all
...
Delete `set_all`, `set_axis`, and `get_axis` methods from Vector2/3/3i/4/4i
2022-10-03 09:23:46 +02:00
Rémi Verschelde
cf6978f286
Merge pull request #64833 from MarcusElg/naninfprinting
...
Improve string formatting (%f and %v) for inf and nan
2022-10-03 09:23:12 +02:00
Rémi Verschelde
ef8834a642
Merge pull request #64784 from yedpodtrzitko/yed/ci-add-mypy
...
ci: add Python static analysis check via mypy
2022-09-30 17:44:39 +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
Jiri Suchan
c5bd2f9dce
ci: add Python static analysis check via mypy
2022-09-30 19:03:17 +07:00
Rémi Verschelde
f47979f087
Merge pull request #66242 from akien-mga/scons-unify-tools-target
2022-09-30 12:28:50 +02:00
MisterMX
bf19a1d3b3
refactor(AStarGrid2D): Return Vector2i in get_id_path
...
Signed-off-by: MisterMX <mbxd12@web.de>
2022-09-30 12:02:28 +02:00
Haoyu Qiu
d873c549a2
Fix crash when executing ResourceUID.set_id
2022-09-30 09:41:05 +08:00
Rémi Verschelde
6991e9b43d
Merge pull request #66583 from bruvzg/constexpr
...
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
2022-09-29 10:44:22 +02:00
Rémi Verschelde
5bcd019ee9
Merge pull request #66552 from bruvzg/64_bitfields
...
Change BitField to use 64-bit int.
2022-09-29 10:44:08 +02:00
bruvzg
ea1848ce0a
Use constexpr
in the conditions with template parameters and sizeof
s to suppress C4127 warnings.
2022-09-29 10:38:21 +03:00
rune-scape
51c411c7ad
Fix unset ObjectID
with validated get_object()
call
...
Fixes unset `ObjectID` in variant when calling a validated builtin method returning an `Object *`.
2022-09-28 23:04:22 -07:00
Rémi Verschelde
f8745f2f71
Merge pull request #66103 from Zylann/bind_property_usage_read_only
2022-09-29 00:09:51 +02:00
Marc Gilleron
856466ed02
Expose PROPERTY_USAGE_READ_ONLY
2022-09-28 22:50:55 +01:00
Rémi Verschelde
dc4a634c0d
Project supported features: Ignore old 'Vulkan Clustered/Forward' names
...
This eases transition from beta 1 to beta 2 so that users don't get a warning
about a missing feature. The names were just changed.
The old feature names are removed from project.godot when opening such a
project.
2022-09-28 23:27:27 +02:00
Rémi Verschelde
e5857bd6c7
Merge pull request #66548 from akien-mga/msvc-warnings-c4701-c4703
...
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 20:47:50 +02:00
Rémi Verschelde
d9b251c95c
Merge pull request #66544 from lawnjelly/bvh_tree_sibling_warning
...
Fix false flag compiler warning in bvh tree
2022-09-28 20:47:38 +02:00
Rémi Verschelde
361d9b514e
Merge pull request #66542 from akien-mga/msvc-warning-c4706
...
Fix MSVC warning C4706: assignment within conditional expression
2022-09-28 20:47:23 +02:00
Rémi Verschelde
85fe6ecc32
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
2022-09-28 17:05:34 +02:00
bruvzg
8a9659b152
Change BitField to use 64-bit int.
2022-09-28 17:36:59 +03:00
lawnjelly
d7c6993f58
Fix false flag compiler warning in bvh tree
...
Compiler wrongly warns that sibling_id may be used when uninitialized. This PR sets the value to silence the warning.
2022-09-28 15:33:41 +01:00
Rémi Verschelde
0e53dd642c
Fix MSVC warning C4706: assignment within conditional expression
...
Part of #66537 .
2022-09-28 16:05:07 +02:00
bruvzg
af814c1524
Rename script_instance
to _script_instance
in the GDVIRTUAL*
wrappers to avoid shadowing Object
member.
2022-09-28 15:57:59 +03:00
Rémi Verschelde
14e1f36e61
Merge pull request #66492 from bruvzg/gde_ts_underscr
...
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
2022-09-28 12:12:29 +02:00
bruvzg
8f5d56e04a
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
2022-09-28 10:04:11 +03:00
kobewi
52b20ce909
Use 64bit integers in utility methods
2022-09-28 02:26:37 +02:00
Rémi Verschelde
92bcd3c01d
Merge pull request #66505 from KoBeWi/floor()_and_int()_are_not_the_same_I_guess 🤔
...
Fix wrong `floori()` behavior
2022-09-28 00:16:24 +02:00
Rémi Verschelde
9dc5684fab
Merge pull request #66504 from KoBeWi/hermit_method
...
Make some File/Dir methods private
2022-09-28 00:16:16 +02:00
Rémi Verschelde
b33460c6ca
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@81ddc73d17
2022-09-27 23:48:25 +02:00
kobewi
7499f41264
Fix wrong floori() behavior
2022-09-27 19:09:34 +02:00
kobewi
a316401b99
Make some File/Dir methods private
2022-09-27 17:35:52 +02:00
Rémi Verschelde
52aae6d4f1
Merge pull request #66447 from akien-mga/gcc-ubsan-silence-Wmaybe-uninitialized
...
Silence GCC `-Wmaybe-uninitialized` caused by UBSAN
2022-09-27 10:04:19 +02:00
nikitalita
af548ee8e9
Fix FileAccessZip() causing a stack overflow
2022-09-26 20:47:00 -07:00
Rémi Verschelde
39facb35a0
SCons: Unify tools/target build type configuration
...
Implements https://github.com/godotengine/godot-proposals/issues/3371 .
New `target` presets
====================
The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:
- `editor`: Replaces `tools=yes target=release_debug`.
* Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
* Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
* Defines: `-O3`/`/O2`
New `dev_build` option
======================
The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:
- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
enables generating debug symbols, does not define `NDEBUG` so `assert()`
works in thirdparty libraries, adds a `.dev` suffix to the binary name.
Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.
Changed binary names
====================
The name of generated binaries and object files are changed too, to follow
this format:
`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`
For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`
Be sure to update your links/scripts/IDE config accordingly.
More flexible `optimize` and `debug_symbols` options
====================================================
The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:
`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
Rémi Verschelde
f8b0b17634
MethodBind: Silence GCC -Wmaybe-uninitialized
caused by UBSAN
...
A priori this doesn't appear to be an actual bug, but a known consequence of
using UBSAN. We silence this one to still have the possibility to get more
warnings raised by UBSAN, in case they are useful.
Works around and closes #66343 .
2022-09-26 16:05:40 +02:00
Rémi Verschelde
926c1127e9
Merge pull request #66435 from akien-mga/style-header-guards-cleanup
...
Cleanup header guards for consistency
2022-09-26 15:48:56 +02:00
Rémi Verschelde
49fcf4ffad
Style: Cleanup header guards for consistency
...
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
Yuri Rubinsky
e7e1f84854
Fix processing of some types in math_fieldwise.cpp/fieldwise_assign
2022-09-26 13:22:49 +03:00
Micky
2a66ddb1bb
Add autocompletion to several Object methods
...
Add autocompletion for the following Object methods:
- `connect`, `is_connected`, `disconnect`, `emit_signal`, `has_signal`;
- `call`, `call_deferred`, `callv`, `has_method`;
- `set`, `set_deferred`, `get`;
- `set_meta`, `remove_meta`, `has_meta`, `remove_meta`.
2022-09-26 10:02:31 +02:00
Rémi Verschelde
f3d763011f
Merge pull request #63109 from OverloadedOrama/fix-input-event-action
...
Fix `InputEventAction`'s `is_match` method ignoring `exact_match` parameter
2022-09-25 11:06:38 +02:00
Danil Alexeev
453c5ef682
Remove confusing String + int
and int + String
operations
2022-09-24 18:13:44 +03:00
Andy Maloney
49ff3d5489
Remove unused includes & move some includes to top of file
2022-09-23 19:06:31 -04:00
Rémi Verschelde
26e9145c26
SCons: Cleanup DEBUG
, _DEBUG
and NDEBUG
defines
...
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
outside thirdparty code, which we usually don't intend to debug, so it
seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
and `release_debug` targets. This used to be set for `release` for all
platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
code, which was only implemented for Unix anyway, should have been
`DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
target as we don't want OIDN and Embree asserting all over the place.
2022-09-23 15:21:26 +02:00
Rémi Verschelde
006e345695
Merge pull request #65817 from bruvzg/typed_array
2022-09-23 10:24:46 +02:00
Rémi Verschelde
ee95cc0b79
Merge pull request #66177 from rburing/callable_callv
...
add `callv` method
2022-09-23 09:45:02 +02:00
Rémi Verschelde
300ea8602c
Merge pull request #66260 from lawnjelly/fix_bvh_array_warning
...
Fix array-bounds warning in BVH
2022-09-23 09:42:58 +02:00
Rémi Verschelde
ca88b23a3b
Merge pull request #66248 from akien-mga/warnings-gcc-Wmaybe-uninitialized
...
Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
2022-09-23 09:42:53 +02:00
Rémi Verschelde
414dd3a257
Merge pull request #66246 from Jummit/fix-dir-crash
...
Fix crash when listing files in nonexistent directory
2022-09-23 09:41:59 +02:00
bruvzg
163257d51b
[GDExtension] Implement support for typed arrays.
2022-09-22 23:31:27 +03:00
lawnjelly
91d252c697
Fix array-bounds warning in BVH
...
Provides a workaround to prevent tripping a compiler warning.
2022-09-22 16:06:25 +01:00
Rémi Verschelde
d1a155e3cd
Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
...
Not sure why I didn't get those before, it may be due to upstream
changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply
rebuilding Godot from scratch with different options.
2022-09-22 11:29:48 +02:00
Jummit
2175e38dfb
Fix crash when listing files in nonexistent directory
2022-09-22 09:54:19 +02:00
Rémi Verschelde
d96b7d767a
Merge pull request #66110 from Zylann/reference_get_count
...
get_reference_count()`
2022-09-22 08:26:29 +02:00
Marc Gilleron
474cee7daf
Rename and expose RefCounted::get_reference_count()
2022-09-21 21:18:54 +01: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
Rémi Verschelde
85a46d36b5
Merge pull request #66096 from 4d49/decompose-polygon-in-convex
...
Add method bind for `Geometry2D.decompose_polygon_in_convex`
2022-09-21 13:26:08 +02:00
Rémi Verschelde
5408af1407
Style: Ensure consistent formatting with clang-format 15
...
When going from version 14 to 15 it would introduce a tiny change in
`websocket_macros.h` just before the comment re-enabling clang-format,
but this can be solved by just letting it do its work.
Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't
used, and bump recommended versions for pre-commit hook to [13; 15].
2022-09-21 12:48:58 +02:00
Rémi Verschelde
e9ad0fd190
Merge pull request #66181 from touilleMan/extension_api_dump-correct-keyed
...
Fix is_keyed param in extension_api.json
2022-09-21 11:06:20 +02:00
Ricardo Buring
0c2055d15d
Callable: add callv method
...
This method can be called from GDExtension.
2022-09-21 08:25:48 +02:00
Mansur Isaev
623e23c625
Add method bind for Geometry2D.decompose_polygon_in_convex
2022-09-21 09:40:03 +04:00
Clay John
c8a0912f36
Merge pull request #66184 from touilleMan/gdnative_interface-fix-hash-mismatch-error-print
...
Fix hash mismatch error print in gdextension's gdnative_classdb_get_method_bind
2022-09-20 20:27:04 -07:00
Emmanuel Leblond
2ee951cef5
Fix hash mismatch error print in gdextension's gdnative_classdb_get_method_bind
2022-09-21 00:41:48 +02:00
Rémi Verschelde
160e0a45b7
Merge pull request #66117 from RedMser/json-parse-recursion
...
Add recursion depth check to `JSON.stringify/parse`
2022-09-21 00:19:32 +02:00
Emmanuel Leblond
b7c3bbc627
Fix is_keyed param in extension_api.json
2022-09-21 00:14:53 +02:00
Rémi Verschelde
ae2d9be0fe
Merge pull request #63740 from Faless/net/4.x_http_request_decompress
...
[HTTP] Implement streaming decompression.
2022-09-20 22:29:16 +02:00
Fabio Alessandrelli
273ba0794f
[IO] Add StreamPeerGZIP for streaming compression/decompression.
...
Putting data results in writing the compressed/decompressed output into
a RingBuffer.
You can retrieve the content of the RingBuffer via get_data.
Support both gzip and deflate.
2022-09-20 18:39:10 +02:00
Rémi Verschelde
d8d10c30d0
Merge pull request #60408 from KoBeWi/statically_typed_directories
...
Introduce more static methods to directory API
2022-09-20 15:36:49 +02:00
Rémi Verschelde
a23ba42f98
Merge pull request #63594 from Faless/img/4.x_loader_ext
...
[Core] Make ImageFormatLoader extensible.
2022-09-20 15:36:32 +02:00
kobewi
cad1d27a6f
Introduce more static methods to directory API
2022-09-20 14:22:45 +02:00
Rémi Verschelde
7da532275b
Merge pull request #65541 from clayjohn/renderer-setting
...
Split rendering driver project setting into renderer_name and rendering_driver
2022-09-20 09:43:59 +02:00
Fabio Alessandrelli
e8fc6bfeb5
[Core] Make ImageFormatLoader extensible.
2022-09-20 02:01:57 +02:00
Aaron Franke
50fb0220ca
Define AXIS_COUNT in all vector types
2022-09-19 17:50:35 -05:00
Aaron Franke
436dcb3286
Remove set_all methods from Vector2/3/4
2022-09-19 15:08:50 -05:00
Aaron Franke
fd8bd27657
Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4i
2022-09-19 15:08:50 -05:00
clayjohn
4a1c7de57c
Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer).
2022-09-19 10:26:10 -07:00
RedMser
de3b1c3fca
Add recursion depth check to JSON stringify/parse
2022-09-19 18:22:55 +02:00
Rémi Verschelde
ec60c4ee9e
Merge pull request #65271 from KoBeWi/FirAccess 🌲
...
Replace File/Directory with FileAccess/DirAccess
2022-09-19 15:33:24 +02:00
Rémi Verschelde
4ebf7d14ac
Merge pull request #66079 from Zylann/project_settings_restart
...
Expose ProjectSettings.set_restart_if_changed(name, restart)
2022-09-19 15:33:11 +02:00
Rémi Verschelde
2d01768618
Merge pull request #66097 from Zylann/make_atlas_vec2i
...
make_atlas`
2022-09-19 15:32:28 +02:00
Rémi Verschelde
1be4f4b69f
Merge pull request #66081 from aaronfranke/math-funcs-spacing
...
Spacing changes in math_funcs.h
2022-09-19 15:31:53 +02:00
Marc Gilleron
2a8aeddc93
Expose ProjectSettings.set_restart_if_changed(name, restart)
2022-09-19 13:57:07 +01:00
kobewi
a43319b6c9
Restore numeric from String constructors
2022-09-19 14:31:16 +02:00
Marc Gilleron
700bb066e0
Use Vector2i
when returning atlas size in Geometry2D::make_atlas
2022-09-19 11:37:02 +01:00
bruvzg
d104a4cdbd
Add missing initial window flags and window mode to the project settings.
2022-09-19 12:30:10 +03:00