Commit graph

4793 commits

Author SHA1 Message Date
Rémi Verschelde
d5fb68bbae
Merge pull request #56779 from aaronfranke/rect2-grow 2022-01-14 20:56:03 +01:00
Marcel Admiraal
f41c72c538 Fix Actions mapped to triggers not using the full range 2022-01-14 15:36:20 +00:00
Aaron Franke
252c803d94
Remove zero size checks from Rect2 grow methods 2022-01-14 00:45:05 -06:00
Marcel Admiraal
5c3600b29f Fix mouse velocity not changing fast enough
- Uses all accumulated movements when calculating velocity
- Discards old accumulated movements
- Sets last mouse velocity to zero when there is no movement
2022-01-13 18:51:34 +00:00
Marcel Admiraal
5250cdd150 Use mouse event relative motion to calculate mouse velocity 2022-01-13 15:23:21 +00:00
Rémi Verschelde
dbab0a9487
Merge pull request #56740 from AnilBK/camera-pre-allocate 2022-01-13 11:13:31 +01:00
Anilforextra
8a9c9a67ef CameraMatrix: Pre-allocate Vector in get_projection_planes(). 2022-01-13 10:14:59 +05:45
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Rémi Verschelde
189662e5bd
Merge pull request #56696 from AnilBK/use-init-lists 2022-01-12 10:04:45 +01:00
Anilforextra
6c3a0460a8 Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
Rémi Verschelde
a074ceefcd
Merge pull request #56130 from Faless/mbedtls/2.28.0 2022-01-11 15:03:28 +01:00
Rémi Verschelde
46624388d4
Merge pull request #56322 from madmiraal/fix-42450 2022-01-11 11:33:59 +01:00
Rémi Verschelde
c6cefb1b79
Array: Relax slice bound checks to properly handle negative indices
The same is done for `Vector` (and thus `Packed*Array`).

`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.

`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.

This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
Rémi Verschelde
e6cc0ff1a5
Merge pull request #56666 from bruvzg/joy_button_fix 2022-01-10 16:22:43 +01:00
bruvzg
61ea8f8337
Add joystick button index boundary check. Increase max. button number to 128 (max. buttons supported by DirectInput). 2022-01-10 14:39:05 +02:00
Haoyu Qiu
af67e4c291 Fix crash on importing FBX file 2022-01-10 18:24:31 +08:00
Rémi Verschelde
fcc2648e18
Fix missing arg name in bindings for GDExtension API 2022-01-07 14:24:06 +01:00
Rémi Verschelde
e1766da4bd
Merge pull request #53618 from aaronfranke/signed-angle-vec3i
Add length and length_squared to Vector2i/3i
2022-01-07 01:14:29 +01:00
Rémi Verschelde
b008cb8df6
Merge pull request #55877 from aaronfranke/slerp-same-len 2022-01-07 00:44:26 +01:00
Rémi Verschelde
a01b18a476
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
ans
ba
curvelinear
dof
doubleclick
fave
findn
gird
inout
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
2022-01-07 00:12:09 +01:00
Aaron Franke
064036d786
Allow Vector2/3 slerp values to have any length 2022-01-06 11:12:59 -08:00
Aaron Franke
2c52f16464
Add length and length_squared to Vector2i/3i 2022-01-06 10:06:56 -08:00
Aaron Franke
05ce2c80bb
Rename Variant enum members in resource_format_binary.cpp 2022-01-06 08:12:26 -08:00
Rémi Verschelde
8d83da5bf9
Merge pull request #56224 from Calinou/variant-rename-packed-array-constants 2022-01-06 17:08:36 +01:00
Rémi Verschelde
f57bdf13af
Merge pull request #50493 from timothyqiu/local-vector-list-init 2022-01-06 16:51:57 +01:00
bruvzg
c69e0d16bc
Fix multiple missing UTF-8 decoding. 2022-01-06 14:35:22 +02:00
Rémi Verschelde
b238218363
Merge pull request #55851 from Chaosus/better-completion-options-list_rebased 2022-01-06 09:40:44 +01:00
Rémi Verschelde
0157742422
Merge pull request #53434 from Faless/io/4.x_file_access_compressed
[File] Fix FileAccessCompressed::get_buffer return value.
2022-01-06 09:20:27 +01:00
Rémi Verschelde
6af77c7b09
Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01:00
Haoyu Qiu
c0d3bdc0ca Add list initialization support for Vector & LocalVector 2022-01-05 20:42:09 +08:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde
8db6fb18c9
Merge pull request #56484 from KoBeWi/your_callable_is_invalid 2022-01-04 16:46:05 +01:00
Rémi Verschelde
9a1f244d77
Merge pull request #56295 from aaronfranke/doc-midi 2022-01-04 16:45:33 +01:00
Fabio Alessandrelli
23ba76f2ec
Merge pull request #56331 from Cnidarias/large_http_downloads
Fix http limitation for large "content-length"
2022-01-04 16:34:11 +01:00
kobewi
ec94ceba14 Fix method validation in Thread 2022-01-04 14:44:47 +01:00
Aaron Franke
de9adcf045
Document InputEventMIDI and add some missing 0xF MIDI messages 2022-01-04 05:30:43 -08:00
Rémi Verschelde
5ae0f0f199
Merge pull request #56469 from Zylann/remove_gdclass_inherits_static 2022-01-04 14:28:41 +01:00
Rémi Verschelde
42312f066b
Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Marc Gilleron
a88e1ce362 Remove unused inherits_static from GDCLASS 2022-01-03 20:24:16 +00:00
Rémi Verschelde
98b3ba1842
Merge pull request #53957 from fabriceci/new-template-workflow 2022-01-03 20:40:33 +01:00
fabriceci
9d5b807059 Improve editor template workflow
Co-Authored-By: jmb462 <jmb462@gmail.com>
2022-01-02 21:52:09 +01:00
luz paz
a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
cdemirer
e2ed9d13eb Fix Array and Dictionary id() and dictionary test bug 2021-12-30 13:14:09 +08:00
Cnidarias
69a532414c Fix http limitation for large "content-length"
When a request was issued to a server that returned "content-length" header
whose value was greater than that of an "int" we ran into overflow
problems. The fix for this was rather simple by increasing the data
type to `int64_t`
2021-12-30 01:16:19 +01:00
Marcel Admiraal
3105d9b1f3 Rename speed to velocity when it's a directional Vector 2021-12-29 15:35:26 +00:00
Andrii Doroshenko (Xrayez)
7a8b11ee14 Refactor auto-instantiation of Object properties in editor
Auto-instantiation is used by the create dialog, but should also be
used by the editor inspector.

This refactors object properties auto-instantiation into a dedicated
method to be reused throughout editor (and possibly scripting).
2021-12-28 15:50:44 +02:00
Silc 'Tokage' Renew
61759da5b3 Fix some gizmo behavior to make more consistent 2021-12-25 03:24:04 +09:00
Hugo Locurcio
753754548a
Rename Variant Packed*Array constants for consistency
All arrays are now prefixed with `PACKED_` to distinguish them from
GDScript's generic typed arrays.

`RAW_ARRAY` is now `PACKED_BYTE_ARRAY` (RawArray was the name of
PackedByteArray back in Godot 2.x).
2021-12-24 18:44:08 +01:00
Fabio Alessandrelli
e375cbd094 Bump mbedTLS version to 2.28.0 (new LTS).
Keep applying the windows entropy patch (UWP support).
Remove no longer needed padlock patch.
Update thirdparty README to reflect changes, and new source inclusion
criteria.
2021-12-21 13:26:02 +01:00
Rémi Verschelde
5ffee633cd
Merge pull request #56028 from madmiraal/revert-55978-fix-switch-controller-event-spam 2021-12-21 09:44:59 +01:00
great90
10c91f8116
Fix variable name 'max_size' to 'min_size' in aabb 2021-12-19 11:51:14 +08:00
bruvzg
ea5bb8b47d
[Windows] Improve console handling and execute/create_process.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`).
Add `open_console` argument to the `execute` and `create_process` to open a new console window.
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:14:07 +02:00
Marcel Admiraal
39136ce3e0
Revert "Fixed event spam when using the Nintendo Switch controller" 2021-12-17 17:14:07 +00:00
Haoyu Qiu
1fb59d13c2 Fix font preview text color on light background 2021-12-18 00:34:28 +08:00
Rémi Verschelde
ed395c6b99
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@265b43b789.
2021-12-17 00:14:44 +01:00
Rémi Verschelde
9c9cc1b222
Merge pull request #55978 from slouken/fix-switch-controller-event-spam
Fixed event spam when using the Nintendo Switch controller
2021-12-16 19:49:47 +01:00
Sam Lantinga
313815f818 Fixed event spam when using the Nintendo Switch controller
There is no filtering on the Nintendo Switch Pro controller thumbstick, so there will frequently be events with very slight change. These are turned into "not pressed" events, which cancel "pressed" events from keys and buttons.

This change filters out up to 5% jitter, but it might be worth revisiting whether "not pressed" events should cancel "pressed" events.
2021-12-16 09:04:58 -08:00
Haoyu Qiu
e4e4e475f8 Make --doctool locale aware
* Adds `indent(str)` to `String`:
    * Indent the (multiline) string with the given indentation.
    * This method is added in order to keep the translated XML correctly
      indented.
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`.
    * This will be used from both `EditorSettings` and the doc tool from
      `main`.
* Makes use of doc translation when generating XML class references, and
  setup the translation locale based on `-l LOCALE` CLI parameter.

The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 17:49:22 +08:00
Fabio Alessandrelli
f9c05333ef
Merge pull request #55657 from MorganKF/patch-multiplayer-peer-extension
Patch `MultiplayerPeerExtension` to allow derived classes
2021-12-15 11:40:52 +01:00
Xavier Sellier
ba0abd399f
Defer the call to 'popup_str' to the next cycle to let Godot Engine's editor time to properly start 2021-12-14 20:08:19 +01:00
Yuri Roubinsky
526390c048 Fix highlight for completion options match (rebased)
Co-authored-by: Gustav Andersson <gvekan@users.noreply.github.com>
2021-12-12 10:39:49 +03:00
MorganKF
44b35c3759 Update MultiplayerPeerExtension class registration to non-virtual
Fix formatting
2021-12-11 11:05:03 -03:30
raphaelazev
82527df55c Added check to get_all_locales to avoid adding duplicate locales to array 2021-12-10 19:25:59 -03:00
Tomasz Chabora
d04c2a554f Improve Directory content navigation 2021-12-10 17:24:04 +01:00
Rémi Verschelde
03e105f677
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@348cfa347f.
2021-12-10 10:59:30 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Rémi Verschelde
46d384060e
Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusive 2021-12-07 14:00:59 +01:00
Fabio Alessandrelli
3ae8eda1ed
Merge pull request #55603 from Calinou/add-os-crash-method
Add an `OS.crash()` method for testing system crash handler
2021-12-06 16:34:15 +01:00
Rémi Verschelde
1f5a3ba0ba
Merge pull request #55661 from KoBeWi/joys_of_connection 2021-12-06 14:03:01 +01:00
Rémi Verschelde
5baf20e638
Merge pull request #34005 from aaronfranke/minmax 2021-12-06 14:01:45 +01:00
Rémi Verschelde
608c9f8203
Merge pull request #47257 from timothyqiu/http-client-proxy 2021-12-06 13:30:53 +01:00
kobewi
cb2bdcd286 Unexpose joy_connection_changed method 2021-12-06 13:10:17 +01:00
Hugo Locurcio
5761b90f3c
Add an OS.crash() method for testing system crash handler
This makes it possible to test the system's crash handler without
having to modify engine code or exploit an engine bug.
2021-12-03 22:11:46 +01:00
Yuri Sizov
b3992f7e6e Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
Rémi Verschelde
aaabc0abcc
Merge pull request #55520 from pycbouh/docs-sort-group-newline-theme-and-enums 2021-12-03 15:29:29 +01:00
Rémi Verschelde
8762d8fa5d
Merge pull request #55470 from groud/move_godot_object_init_to_extension 2021-12-03 14:41:07 +01:00
Aaron Franke
24f57886d0
Expose max_axis_index and max_axis_index for Vector2(i)
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
2021-12-02 23:45:41 -06:00
Rémi Verschelde
892a5a72cd
Merge pull request #55474 from akien-mga/copy-operators-no-reference 2021-12-02 17:34:45 +01:00
Max Hilbrunner
837e6bdf18
Merge pull request #37626 from aaronfranke/rect2-warnings
Print warnings when using a Rect2 or AABB with a negative size
2021-12-02 14:41:02 +01:00
Rémi Verschelde
49d8925713
Merge pull request #47294 from sebastian-heinz/patch-1 2021-12-02 10:04:17 +01:00
Rémi Verschelde
02d6cbfd8c
Merge pull request #38604 from Calinou/astar-rename-get-point-ids 2021-12-02 09:35:57 +01:00
sebastian-heinz
be90aadbcd allow variant construction in expressions 2021-12-02 15:30:10 +08:00
Raul Santos
a367378f9e Rename Vector parameters to be consistent
Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
2021-12-01 21:14:46 +01:00
Yuri Sizov
397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
Aaron Franke
9687f6fca3
Warn when using an AABB or Rect2 with a negative size 2021-11-30 18:27:58 -06:00
Hugo Locurcio
89849a9ed9
Rename AStar.get_points() to AStar.get_point_ids() for clarity
The same has been done for AStar2D as well.
2021-11-30 22:14:39 +01:00
Gilles Roudière
4fc0fb826a Change gdnative interface so that Godot object initialization should be triggered from the extension side 2021-11-30 16:55:48 +01:00
Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Marcel Admiraal
272b3c3728 Enable sorting of operator methods in class documentation. 2021-11-29 14:51:44 +00:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice 2021-11-26 22:13:12 -06:00
Ricardo Subtil
93396b3e51 Fix wrong comparison with default values 2021-11-26 14:04:13 +00:00
Yuri Roubinsky
a4b7de6b23 Fix console colors on Windows 2021-11-26 13:10:55 +03:00
Aaron Franke
40cb86ba96
Don't show errors when getting nonexistent settings 2021-11-25 08:23:42 -06:00
Aaron Franke
9851d3c5b2
Move logic for saving project features to ProjectSettings save_custom 2021-11-25 03:08:05 -06:00
Aaron Franke
e81c689592
Project feature warning system 2021-11-24 10:32:07 -06:00
Rémi Verschelde
b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect 2021-11-24 16:34:01 +01:00
Haoyu Qiu
c09ea8d45a Adds proxy support for HTTPClient
Also fixed a potential infinite loop when connecting to server.
2021-11-24 14:36:42 +08:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
kleonc
92ca300ab1 Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()
Co-authored-by: Lightning_A <aaronjrecord@gmail.com>
2021-11-23 18:06:26 +01:00
kleonc
91595b16e3 Add Image::fill_rect method 2021-11-23 18:06:23 +01:00
bruvzg
9877d91c4a
Add Input.is_physical_key_pressed method. 2021-11-23 11:14:19 +02:00
Rémi Verschelde
1e71cab797
Merge pull request #55223 from bruvzg/gde_dict_index 2021-11-23 09:18:30 +01:00
bruvzg
b11e619b19
[Vulkan] Check each device capabilities before selecting it.
Split instance and physical device selection function and move device selection to window creation, to reject devices without present capability.
Add device preferred type check in discrete > integrated > virtual > cpu > other order.
Add device list printout.
Add command line argument to override device selection.
2021-11-22 20:04:57 +02:00
kobewi
7dc97d6558 Ignore override.cfg when in editor 2021-11-22 16:10:31 +01:00
bruvzg
f214b2b194 [GDExtension] Implement missing Dictionary index operators.
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2021-11-22 12:43:00 +02:00
Haoyu Qiu
8253a45a1a Fix crash when executing PackedDataContainer._iter_init 2021-11-21 20:14:59 +08:00
Rémi Verschelde
be16eb625b
Merge pull request #54932 from briansemrau/expose-main-thread-id 2021-11-20 10:48:46 +01:00
Fabio Alessandrelli
46fdba5f8b [HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.

This will need to be addressed in a separate PR.
2021-11-19 16:59:27 +01:00
Rémi Verschelde
fc9de5ba7f
Merge pull request #54499 from Faless/threads/4.x_work_pool_default 2021-11-19 09:39:21 +01:00
Paulb23
eb9100f085 Fix divide by zero in pck_packer 2021-11-17 18:07:29 +00:00
Rémi Verschelde
2b24629847
Merge pull request #55042 from nekomatata/fix-segment-intersection 2021-11-17 17:33:56 +01:00
Rémi Verschelde
7540da622d
Merge pull request #49793 from Chaosus/expose_randfn 2021-11-17 13:53:23 +01:00
Yuri Roubinsky
a74acca858 Expose randfn to global scope 2021-11-17 14:29:19 +03:00
Xwdit
0bd96bd2cf
Fix the exceptions in signal disconnection
Use the correct method to get SignalData to fix exceptions in signal disconnection
2021-11-17 09:29:29 +01:00
PouleyKetchoupp
6d0c93dccf Fix segment intersection in Geometry2D
Doing a multiplication to reduce the amount of tests was causing
precision which lead to 2D raycast detecting false positive contacts
in some cases with convex polygons.
2021-11-16 18:09:33 -07:00
Bastiaan Olij
035468669a Fix array access in gdextensions 2021-11-17 10:36:29 +11:00
Hugo Locurcio
8fb7e622a6
Rename built-in SGN() macro to SIGN()
This matches the name of the GDScript function (except it's uppercase
here).
2021-11-16 20:40:49 +01:00
Rémi Verschelde
5341e6010e
Allow dehardcoding documentation branch and URL in docs links
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.

In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.

The documentation branch string is set in `version.py`.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-11-15 13:02:21 +01:00
Rémi Verschelde
d975b1bc37
Merge pull request #43072 from KoBeWi/point_to_angle 2021-11-15 09:56:21 +01:00
Rémi Verschelde
8bb163807a
Merge pull request #54976 from reduz/importer-options-by-path 2021-11-15 00:46:04 +01:00
Hugo Locurcio
315e94ee2a
Merge pull request #53710 from CaptainProton42/fix-extension-class-inspector-properties 2021-11-14 22:02:31 +01:00
reduz
cd2a499084 Add path to functions that return iporter options
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options

This PR is necessary for #54886 to be implemented properly.
2021-11-14 14:06:10 -03:00
Brian Semrau
c558263d84 Expose Thread::get_main_id in core bindings 2021-11-12 19:28:49 -05:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Rémi Verschelde
1aa3c8419b
Merge pull request #54869 from akien-mga/string-remove-erase 2021-11-11 13:00:21 +01:00
Rémi Verschelde
e2e9b08cc7
Color: Bind from_hsv as static method 2021-11-11 11:50:02 +01:00
Rémi Verschelde
2beaae4b6f
String: Remove erase method, bindings can't mutate String 2021-11-11 11:23:32 +01:00
Haoyu Qiu
367d75fab0 Add missing characters for property name quoting 2021-11-11 13:18:09 +08:00
Rémi Verschelde
06a33e590f
Merge pull request #53819 from TokageItLab/re-implement-ping-pong
Reimplement ping-pong animation and reverse playback
2021-11-09 22:11:04 +01:00
Tomasz Chabora
606cfa9a47 Fix Vector2.angle_to_point() being reversed 2021-11-09 16:59:58 +01:00
bruvzg
ba9d737363 Fix incorrect encoding (Latin-1 instead of UTF-8) used in _error_handler functions. 2021-11-08 23:45:08 +02:00
Rémi Verschelde
e87687a6d0
Merge pull request #54486 from ibrahn/thread-work-pool-lazier 2021-11-08 13:39:39 +01:00
Rémi Verschelde
63559f2c80
Merge pull request #54186 from miraz12/fix-packedByteArray-memcpy-crash 2021-11-08 13:33:07 +01:00
Brian Semrau
dc11e73bf0 Rename AABB get_area to get_volume 2021-11-05 18:22:42 -04:00
Aaron Franke
744b43b527
Fix Quaternion multiplication operator 2021-11-04 11:24:46 -05:00
kobewi
e393c2a734 Add is_built_in() method to Resource 2021-11-04 12:45:58 +01:00
Hugo Locurcio
c012fbc8b2
Rename PROPERTY_USAGE_NOEDITOR to PROPERTY_USAGE_NO_EDITOR
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
Rémi Verschelde
4b247e7ffa
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@322aac4bb7.

Also improve parser errors to allow identifying the problematic mappings.
2021-11-03 19:55:52 +01:00
Silc 'Tokage' Renew
953a7bce7e reimplement ping-pong 2021-11-03 13:39:33 +09:00
Rémi Verschelde
ab6ec9310c
Merge pull request #54453 from KoBeWi/slice_of_string 2021-11-02 13:18:34 +01:00
kobewi
e5725c7deb Expose String.get_slice 2021-11-02 11:24:07 +01:00
Fabio Alessandrelli
4ed1d977fc [OS] Add ThreadWorkPool default size to OS.
Some platforms (*cough* web *cough*) have hard limits on the number of
threads that can be spawned.

Currently, ThreadPoolWork (mostly used in rendering/physics servers)
will spawn as many threads as CPUs available causing exception on
machines with high CPU count.

This commit adds a new overridable method to OS that returns the default
thread pool size (still the CPU count by default), and overrides it for
the JavaScript platform so it always allocate only one thread.

We can likely improve the whole ThreadPoolWork in the future to always
allocate X amount of threads, and assign jobs to them on the fly, but
that will require some more architectural changes.
2021-11-02 04:16:00 +01:00
Emmanuel Leblond
795cd2eb38
Merge pull request #35816 from touilleMan/dictionary-operator==-true-comparison
Modify Array/Dictionary::operator== to do real key/value comparison
2021-11-02 00:00:38 +01:00
Rémi Verschelde
7b83039885
Merge pull request #54490 from q66/ppc 2021-11-01 23:27:21 +01:00
Rémi Verschelde
0fbf53dbc5
Merge pull request #54387 from Calinou/editor-translations-increase-zlib-compression-level 2021-11-01 23:22:55 +01:00
Daniel Kolesa
3a84a64d2f Add support for PowerPC family 2021-11-01 22:25:53 +01:00
Ibrahn Sahir
151d2e34ca ThreadWorkPool no longer starts worker threads if given zero work. 2021-11-01 19:19:25 +00:00
bruvzg
0b6b8427c8 [macOS] Add create_instance function to spawn editor copies.
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
2021-11-01 11:48:23 +02:00
Rémi Verschelde
1dd742777a
Merge pull request #53452 from aaronfranke/who-let-the-docs-out 2021-10-31 23:18:32 +01:00
Clay John
8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
- Rename OpenGL to GLES3 in the source code per community feedback.
  - The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
  - The renderer can still be changed in the Project Settings or using
    the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Emmanuel Leblond
f9ba2efe1e
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests) 2021-10-30 13:11:01 +02:00
Hugo Locurcio
ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
2021-10-30 02:05:49 +02:00
lawnjelly
e3491a3744
Add GLES2 2D renderer + Linux display manager
First implementation with Linux display manager.

- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).

Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Hugo Locurcio
89cf17c96f
Use maximum zlib compression when generating editor translation headers
With comments stripped, this reduces the combined generated translation
size from 28.7 MB to 28.4 MB (-240 KB).
2021-10-29 19:07:48 +02:00
Max Hilbrunner
82f88f5d56
Merge pull request #54340 from aaronfranke/time-doc
Update and fix Time documentation
2021-10-29 15:49:22 +02:00
Aaron Franke
2dabdda36a
Update Time documentation 2021-10-28 10:16:56 -05:00
Rémi Verschelde
f42ef8d5f9
CI: Update to clang-format 13 using LLVM repo 2021-10-28 17:11:00 +02:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands 2021-10-28 17:10:52 +02:00
Rémi Verschelde
0ae65472e7
clang-format: Enable BreakBeforeTernaryOperators
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 15:57:41 +02:00
Rémi Verschelde
6b090e325a
Merge pull request #53526 from KoBeWi/super_print 2021-10-28 15:47:52 +02:00
Rémi Verschelde
3a6be64c12
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Gilles Roudière
a51f92273a Remove ItemList editor and replace it by a property array 2021-10-28 10:16:51 +02:00
Anton Christoffersson
9ed8417271 Fixed crash in variant_call when trying to memcpy 0 bytes. 2021-10-27 19:01:33 +02:00
Max Hilbrunner
5dc02eb8b0 Save all 64 bits of get_ticks_msec() in more cases 2021-10-26 13:58:58 +02:00
reduz
d03b7fbe09 Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis

Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
Rémi Verschelde
24fdedfe94
Merge pull request #54050 from reduz/animation-compression 2021-10-25 14:27:58 +02:00
Anton Christoffersson
fb7ba76325 Fixed implicit conversion of uint32_t to uint8_t in image 2021-10-25 12:51:28 +02:00
Aaron Franke
474d0f58f5
Add support for the RISC-V architecture
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:10 -05:00
Rémi Verschelde
f9be8b8e8e
Merge pull request #54081 from Rubonnek/add_bin_messages_master 2021-10-22 19:31:55 +02:00
Rémi Verschelde
beb3875cdf
Merge pull request #53781 from m4gr3d/restrict_project_data_dir_config_master 2021-10-22 19:30:35 +02:00
Rémi Verschelde
6c35e74228
Merge pull request #53812 from RandomShaper/expose_flush_input 2021-10-22 17:20:33 +02:00
Pedro J. Estébanez
6dc3fae201 Expose Input::flush_buffered_events() 2021-10-22 14:28:48 +02:00
Rémi Verschelde
9f7218eb69
Merge pull request #54088 from madmiraal/remove-unimplemented-methods 2021-10-22 12:59:32 +02:00
reduz
a69541da4c Implement Animation Compression
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).

* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
2021-10-21 18:27:34 -03:00
Marcel Admiraal
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Rémi Verschelde
b6f4f23a5e
Merge pull request #54078 from Rubonnek/add_hex_messages_master
Add error messages to `String::hex_to_int`, and accept capital X in prefix
2021-10-21 19:37:11 +02:00
Wilson E. Alvarez
5736a0ed3c
Accept capital B in String::bin_to_int prefix 2021-10-21 13:18:49 -04:00
Wilson E. Alvarez
549a48ccc9
Add error messages to String::hex_to_int, and accept capital X in prefix 2021-10-21 12:40:14 -04:00
bruvzg
a975682ef6 Fix handling multiple "physical key" events in the single input map action. 2021-10-19 22:19:41 +03:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
Rémi Verschelde
21f1ac8bf3
Merge pull request #53805 from groud/name_to_tileset_sources 2021-10-19 09:56:19 +02:00
ne0fhyk
b5c750fa65 Restrict the project data directory configuration 2021-10-18 14:10:38 -07:00
Rémi Verschelde
f4d9749e23
Merge pull request #53741 from DmitriySalnikov/exposed_sensor_setters_master 2021-10-18 23:00:56 +02:00
Rémi Verschelde
c5f4bf2077
Merge pull request #53950 from qarmin/memory_leak_gdscript 2021-10-18 14:02:33 +02:00
qarmin
343d005e0f Fix memory leak in exported project 2021-10-18 11:19:31 +02:00
unknown
73c5e07051 Added better descriptive error messages for file operations in core_bind.cpp 2021-10-18 02:09:42 +05:30
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Rémi Verschelde
c133480531
SCons: List .gen.cpp sources explicitly to avoid globbing errors
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp`
extension, users run into build issues when switching between branches (i.e.
switching before and after the name change/removal). This is because we glob
`*.cpp` so if a now-obsolete file from a previous build is present, we'll
include it too, potentially leading to bugs or compilation failure (due to
missing headers or invalid code).

So globbing patterns in `add_source_files` will now skip files ending with
`.gen.cpp`, which should instead be passed explicitly where they're used.
2021-10-15 22:14:11 +02:00
Rémi Verschelde
cd21cc683a
SCons: Set DEBUG_ENABLED and DEV_ENABLED in SConstruct
They're the same for all platforms so they don't need to be repeated in all
platform definitions.
2021-10-15 10:26:58 +02:00
K. S. Ernest (iFire) Lee
8f0c056431 Fix specific warnings issues by Clang
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
George Marques
4c14051b3f
Zero Dictionary and Array variants when changing type with reset
So they don't reference to the old values anymore and instead refer to
a new value.
2021-10-14 11:22:17 -03:00
Gilles Roudière
3b42660105 Add a name to TileSet sources 2021-10-14 14:54:48 +02:00
Gilles Roudière
0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Rémi Verschelde
a801a2031d
Merge pull request #53773 from nathanfranke/fix-license-character-encoding 2021-10-13 21:04:13 +02:00
Rémi Verschelde
fd2dcba02c
Merge pull request #53772 from RandomShaper/fix_hash_map 2021-10-13 21:03:50 +02:00
Nathan Franke
28c163a432
Fix character encoding of Engine::get_copyright_info 2021-10-13 10:42:41 -05:00