Commit graph

5395 commits

Author SHA1 Message Date
Marcus Elg
dbc165715b Add %v for formatting vectors 2022-08-23 17:26:06 +02:00
JFonS
c7a7aad30d
Merge pull request #59779 from rainerdeyke/constexpr-operators
Made Key operators constexpr
2022-08-23 15:35:35 +02:00
bruvzg
56101080cc
[GDExtension] Fix _property_can_revert and _property_get_revert methods using incorrect string type. 2022-08-23 14:58:28 +03:00
Rémi Verschelde
14f8a54a33
Merge pull request #64511 from derammo/derammo_fix_has_property_default_value 2022-08-23 13:47:20 +02:00
Yuri Sizov
672e9d6868 Make ImageLoader take bit field flags 2022-08-23 14:39:01 +03:00
Rémi Verschelde
f583b835db
Merge pull request #64690 from touilleMan/projection-members-offsets-in-gdentension-api 2022-08-23 11:06:47 +02:00
Rémi Verschelde
b9919fd87d
Merge pull request #64678 from TokageItLab/implement-ease-baker
Fix Quaternion Tween and add Easing baker to AnimationTrackEditor
2022-08-23 09:19:21 +02:00
Rémi Verschelde
3f3ade9e5b
Merge pull request #64732 from RandomShaper/input_is_final
Consolidate the fact that `Input` is meant to be final
2022-08-23 08:53:49 +02:00
Rémi Verschelde
b368985291
Merge pull request #64489 from MewPurPur/fast-string-repeat
Improved performance of `String.repeat()`
2022-08-23 08:52:50 +02:00
Rémi Verschelde
62c3e72b6f
Merge pull request #63959 from KoBeWi/typo_arrray
Replace Array return types with TypedArray (part 1)
2022-08-23 08:52:13 +02:00
Rémi Verschelde
f97f5a6146
Merge pull request #64428 from godotengine/gdextension-ignore-property-array
Ignore class's property array when generating extension_api.json (not…
2022-08-23 07:58:26 +02:00
VolTer
dae64e5361 Improved performance of String repeat method 2022-08-22 22:47:10 +02:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde
36061a1a47
Merge pull request #60515 from KoBeWi/electrostatic_jason 2022-08-22 22:27:43 +02:00
Rémi Verschelde
dac25e5c4c
Merge pull request #64571 from kleonc/string-fix-self-add-assign 2022-08-22 22:24:12 +02:00
Emmanuel Leblond
a6963320d6
Ignore fake properties in classes when generating extension_api.json
In extension_api.json we want to expose properties that are meant to
access a class attribute from script (i.e. `Node2D.position`).
However property system is also used in Godot to declare attributes
accessible from the node editor:
- property with '/' in their name
- property array with NIL type that represents an array
2022-08-22 22:17:03 +02:00
Rémi Verschelde
7c85c4a27e
Merge pull request #64374 from RandomShaper/inheritable_cl_args 2022-08-22 21:48:28 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Rémi Verschelde
1fbf7b1ba5
Merge pull request #64610 from reduz/startup-benchmark-support 2022-08-22 19:36:03 +02:00
Rémi Verschelde
7b4927bb5f
Merge pull request #60309 from The-O-King/oct 2022-08-22 19:29:21 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Rémi Verschelde
944bfc6d00
Merge pull request #63602 from TokageItLab/cubic-interp-time 2022-08-22 17:32:47 +02:00
Pedro J. Estébanez
99edd4b43d Consolidate the fact that Input is meant to be final
This reverts #38034 and removes the `iteration()` method.
2022-08-22 14:37:25 +02:00
Silc Renew
f7dd83ce60 Fix Quaternion Tween and implement ease baker 2022-08-22 19:04:58 +09:00
Yuri Rubinsky
772b0d2818 Remove String::erase method declaration 2022-08-22 10:30:08 +03:00
Emmanuel Leblond
dca6db76af
Add missing Projection's members offsets to gdextension_api.json 2022-08-21 12:49:28 +02:00
rafallus
da7a5653f4 Expose Basis set_orthogonal_index method as a GridMap function 2022-08-20 21:42:20 -05:00
derammo
320fb492b0 added missing virtual to ScriptExtension
_has_property_default_value is a required virtual
for ScriptExtension but it was not bound, and could
therefore not be implemented

this made it impossible to implement a ScriptExtension
that runs
2022-08-20 06:29:39 -04:00
Yuri Sizov
7895a66cf2
Merge pull request #64334 from YuriSizov/core-bind-property-revert-methods
Make `property_*_revert` methods multilevel and expose them for scripting
2022-08-19 20:41:41 +03:00
Juan Linietsky
a3936adb29 Add Startup benchmarking support
This adds support for benchmarking engine startup (and editor startup if used).
The goal is to use this in the benchmarking server to track improvements and changes to engine, editor, importer and scene loading startup times.
2022-08-19 14:21:43 +02:00
Pedro J. Estébanez
e886d662ec Overhaul CLI argument forwarding to processes started by the editor 2022-08-19 11:15:56 +02:00
Silc Renew
dded7c72c1 Make cubic_interpolate() consider key time in animation 2022-08-19 14:48:37 +09:00
Clay John
6923076850
Merge pull request #64302 from neikeq/unreference-callback-regr-from-44691448
Fix instance binding unreference callback regression
2022-08-18 14:53:31 -06:00
Hugo Locurcio
e559dcb8f5
Increase the default project window size for better usability
The new default window size is tuned to:

- Have a 16:9 aspect ratio,
- Have both dimensions divisible by 8 to better play along with
  video recording,
- Be displayable correctly in windowed mode on a 1366×768 display
  (tested on Windows 10 with default settings).

This breaks compatibility with projects that didn't change the
window size from the default value (or that kept one of the values
to its default).
2022-08-18 21:22:18 +02:00
Hugo Locurcio
465c423abb
Remove unimplemented OS.dump_memory_to_file() method
This method never did anything in Godot since 3.0, since its code
was commented out. The last time the method had an implementation
was in Godot 2.1.x.
2022-08-18 18:51:25 +02:00
kleonc
1324ca5eb0 Fix undefined behavior in String::operator+=(const String &) 2022-08-18 14:57:24 +02:00
Yuri Sizov
980f5f32f4 Make property_*_revert methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
Marcel Admiraal
61be617571 Fix axis mapped to DPad buttons not releasing opposite button 2022-08-17 09:12:47 +01:00
kobewi
5947f688fb Make JSON methods static 2022-08-16 14:29:38 +02:00
kobewi
cc424bcb18 Add Dictionary.find_key() 2022-08-16 13:48:59 +02:00
Haoyu Qiu
660c700f9c Fix action name completion for Input 2022-08-15 23:28:49 +08:00
Omar El Sheikh
78881b3cc3 Octahedral Normal/Tangent Compression
Implementation of Octahedral normal compression into Godot 4.0
2022-08-13 08:09:32 -07:00
Ignacio Roldán Etcheverry
f45f20285c Fix instance binding unreference callback regression
This was a regression from 4469144891

The callback should be called, not only be called when the refcount
reaches 0. For example, the C# callback needs to know when the
refcount reaches 1, in order to swap to a weak GC handle.
2022-08-12 08:43:53 +02:00
Haoyu Qiu
9c4ad8191b Expose clear method for packed arrays 2022-08-10 17:12:20 +08:00
antonWetzel
40a1d6d100 vector4 distance_squared_to and update csharp 2022-08-09 01:59:17 +02:00
Rémi Verschelde
35f71461f9
Merge pull request #63258 from Calinou/gdextension-print-expected-config-os-arch 2022-08-08 22:30:15 +02:00
Rémi Verschelde
9b19a02f31
Merge pull request #63632 from dsnopek/fix-locale-remap-with-binary-resources-4.x
[4.x] Fix locale resource remapping with binary conversion on export
2022-08-08 20:03:23 +02:00
Hugo Locurcio
27a072c884
Print expected os.arch tuple for current platform in GDExtension error
This also adds `Engine.get_architecture_name()` to get the name of the
CPU architecture the Godot binary was built for.
2022-08-08 19:30:34 +02:00
David Snopek
6bbc126c34 Fix locale resource remapping with binary conversion on export 2022-08-08 09:31:35 -05:00
Yuri Sizov
1362bc22bd Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript 2022-08-08 16:36:01 +03:00
Yuri Sizov
beceba85da Add checks for empty/unnamed arguments to make_rst.py 2022-08-08 16:36:01 +03:00
Rémi Verschelde
c8cdc10902
Merge pull request #62861 from samdze/image-size-vector2i
Make Image.get_size() return a Vector2i instead of a Vector2
2022-08-08 12:55:07 +02:00
Rémi Verschelde
5df8eae862
Merge pull request #64014 from RedMser/keep-screen-on-singledef 2022-08-08 12:04:04 +02:00
Rémi Verschelde
f2ddd81726
Merge pull request #64045 from touilleMan/gdextension-ObjectID-in-native_structures 2022-08-07 16:17:40 +02:00
Rémi Verschelde
446fdc5b71
Merge pull request #64027 from Geometror/add-vector4-tests 2022-08-07 16:07:36 +02:00
Emmanuel Leblond
c0cedebda1
Expose ObjectID among the native structure in GDExtension 2022-08-07 12:42:51 +02:00
Hendrik Brucker
36061c5dca Vector4/Vector4i: Add missing methods, tests and fix change of sign operator 2022-08-07 12:25:05 +02:00
Haoyu Qiu
e061b1cc3c Use %s for bool value in vformat 2022-08-07 09:57:09 +08:00
Rémi Verschelde
e6e13c8251
Merge pull request #63361 from KoBeWi/floorf_lol 2022-08-06 22:25:27 +02:00
RedMser
c939f336d6 Only define keep_screen_on project setting once 2022-08-06 22:10:24 +02:00
kobewi
ae3d83b17b Restore old lerp() behavior and add lerpf() 2022-08-06 21:15:37 +02:00
Rémi Verschelde
77d3ac700d
Merge pull request #63712 from object71/fix-export-issues 2022-08-06 14:27:17 +02:00
Rémi Verschelde
dc04050cfd
Merge pull request #63698 from PrecisionRender/plane-operator-asterisk
Add operator `*` to `Plane`
2022-08-06 00:38:59 +02:00
Rémi Verschelde
10f9f20849
Merge pull request #63887 from qarmin/more_renames
Various converter enhancements and bugfixes
2022-08-06 00:21:24 +02:00
Juan Linietsky
f999f52f0a Add a Framebuffer cache
Adds a FramebufferCache singletion that operates the same way as UniformSetCache.

Allows creating framebuffers on the fly (and keep them cached if re-requested) such as:

```C++
RID fb = FramebufferCache::get_singleton()->get_cache(texture1,texture2);
```
2022-08-05 13:37:29 +02:00
Rémi Verschelde
86647c9e42 Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@4896d2de6b
2022-08-05 02:59:03 +02:00
Aaron Franke
88f5b0d563
Check if the axis is zero / vectors are colinear in Vector3 slerp 2022-08-04 14:32:54 -05:00
Rémi Verschelde
57aac04480
Merge pull request #63906 from Faless/fix/4.x_warnings 2022-08-04 15:16:00 +02:00
Fabio Alessandrelli
6f02183f8c [Core] Use std type traits to check operations triviality. 2022-08-04 14:05:17 +02:00
Rémi Verschelde
c717d5c64b Arrays: Zero new items of trivial types on resize() (bindings only)
This is not enabled by default in the core version for performance reasons,
as Vector/CowData are used in critical code paths where not zero'ing memory
which is going to be set later on can be important.

But for bindings / the scripting API, we make zero the new items by default
(which already happened for built types like Vector3, etc., but not for
trivial types like int, float).

Fixes #43033.

Co-authored-by: David Hoppenbrouwers <david@salt-inc.org>
2022-08-04 13:35:37 +02:00
Fabio Alessandrelli
55845bac26 Fix some array size function definition mismatch. 2022-08-04 13:06:17 +02:00
Rafał Mikrut
3d3fce0d3c Various converter enhancements and bugfixes 2022-08-03 22:28:51 +02:00
Hristo Stamenov
0e1f7e9f89 Removed faulty function update after get_property_list.
The function tried to rearrange properties but that lead to problems with duplication or deleted properties. Implemented the logic that that function did inside the get_property_list both for tool scripts and non-tool scripts.
2022-08-03 21:45:16 +03:00
Rémi Verschelde
259d7781ea
Merge pull request #63875 from hakro/fix-segment-intersects-circle
Bring back Geometry2D.segment_intersects_circle
2022-08-03 18:34:37 +02:00
Hakim
500766329f Bring back Geometry2D.segment_intersects_circle 2022-08-03 17:05:21 +02:00
Rémi Verschelde
2d372d9e10
Merge pull request #56442 from PucklaMotzer09/remap_files_moved 2022-08-03 16:57:26 +02:00
PucklaMotzer09
b32b570d7a Show dependency warning when removing remaps and fallback if translation
remap does not exist
2022-08-03 12:31:29 +02:00
Rémi Verschelde
39a794b1d5
Merge pull request #63266 from reduz/cleanup-array-editing 2022-08-03 11:37:55 +02:00
Rémi Verschelde
a49cf9fe90
Merge pull request #55923 from bluenote10/feature/consistent_transform_operations
Fix consistency of translated/scaled/rotated in Transform2D and Transform3D
2022-08-03 07:50:01 +02:00
Fabian Keller
f242f9c738 Fix consistency of translated/scaled/rotated in Transform2D and Transform3D 2022-08-02 23:38:14 +02:00
reduz
0351a0908f Clean-up array editing 2022-08-02 23:36:02 +02:00
Rémi Verschelde
3b39f00761
Merge pull request #63834 from lawnjelly/variant_large_bucket_pool
Variant large bucket memory pool - for Projection
2022-08-02 22:00:53 +02:00
Rémi Verschelde
9daffa12be
Merge pull request #49058 from madmiraal/add-override-fileaccess
Add override keywords to FileAccess and DirAccess derived classes
2022-08-02 20:03:24 +02:00
Marcel Admiraal
c06025fa13 Add override keywords to DirAccess derived classes 2022-08-02 16:39:44 +01:00
Marcel Admiraal
cafb19e608 Add override keywords to FileAccess derived classes 2022-08-02 16:35:15 +01:00
lawnjelly
bb273bc972 Variant large bucket memory pool - for Projection
Add a larger bucket size pool for the new Projection Matrix.
2022-08-02 16:27:57 +01:00
Rémi Verschelde
33258d850c
Merge pull request #61315 from lawnjelly/variant_bucket_pools
Variant memory pools
2022-08-02 15:54:18 +02:00
Rémi Verschelde
b7346e5025
Merge pull request #53956 from bruvzg/icu_uax_31 2022-08-02 08:54:19 +02:00
bruvzg
5aa48b6ae5
[TextServer] Implement ICU/UAX 31 based is_valid_identifier function. 2022-08-02 08:30:20 +03:00
Hugo Locurcio
6059a9b624
Improve easing inspector usability
- Add `positive_only` property hint to disallow using negative presets.
  These values are clamped in several places in the editor already,
  so this avoids displaying presets that don't work.
- Move the Zero preset at the end of the positive list to match
  the custom property editor. It's also used less often than Linear,
  Ease In and Ease Out.
- Rename presets to be consistent between the easing property editor
  and custom property editor.
- Remove unused `inout` hint which was redundant since it was already
  the default.
2022-08-01 18:40:04 +02:00
Hugo Locurcio
1b713175b2
Expose the "restart on exit" OS functionality
This can be used to restart a project with specific command line arguments
applied. This can work in tandem with `OS.get_cmdline_args()` to restart
with the same command line arguments as used to originally run the project.

Example use cases:

- Restart to apply an user setting change that requires a restart to work.
- Restart with a Godot command line argument to change the video driver,
  audio driver, etc.
2022-08-01 14:06:13 +02:00
Rémi Verschelde
44f1e540f6
Merge pull request #63733 from akien-mga/file-get_as_text-skip-CR
File: Re-add support to skip CR (`\r`) in `File::get_as_text`
2022-08-01 07:54:20 +02:00
Rémi Verschelde
4d4575d386
Merge pull request #63624 from reduz/commandline-user-args
Add support for command-line user arguments.
2022-08-01 07:53:14 +02:00
Raul Santos
2e5cf62dee
Fix Vector4::min_axis_index for equal components
The documentation says if all components are equal it must return AXIS_W but it was returning AXIS_X.
2022-08-01 04:50:17 +02:00
Juan Linietsky
0dd65378e7 Add support for command-line user arguments.
Implements the standard Unix double dash (--) commandline argument:
* Arguments after a double dash (--) are ignored by Godot and stored for the user.
* User can access them via `OS.get_cmdline_user_args()`

Example:

`godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
2022-08-01 00:56:59 +02:00
Rémi Verschelde
1418f97c70 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.
2022-08-01 00:40:35 +02:00
Robin Arys
1cfe3c3f8b Expose load_threaded_request's cachemode to GDScript 2022-07-31 14:04:11 +02:00
PrecisionRender
2adb67c3c5 Add operator* to Plane 2022-07-30 17:48:55 -05:00
Rindbee
279e5e90f2 Fix using wrong variable when checking in ResourceSaver::save 2022-07-30 17:11:18 +08:00
Rémi Verschelde
15a02c49be
Merge pull request #61647 from KoBeWi/SaverResource 2022-07-29 22:30:51 +02:00
Rémi Verschelde
5ca09b322c
Merge pull request #63593 from TokageItLab/improve-exp-map 2022-07-29 20:27:13 +02:00
kobewi
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
Rémi Verschelde
7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
kobewi
ee6fd704b5 Fix Vector4 serialization 2022-07-29 12:09:03 +02:00
Silc Renew
90dc2f961e Make spherical_cubic_interpolate() more stable 2022-07-29 17:39:22 +09:00
Rémi Verschelde
14d021287b
Merge pull request #63049 from Faless/mp/4.x_as_module 2022-07-28 20:46:31 +02:00
Rémi Verschelde
a5f12f9c21
Merge pull request #63532 from TokageItLab/rename-cubic-slerp 2022-07-28 10:39:33 +02:00
Rémi Verschelde
199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Rémi Verschelde
13a9d5e3c0
Merge pull request #63378 from nathanfranke/t3d-errors
Add equal checks to Transform3D::looking_at and Transform3D::set_look_at, fixes misleading error.
2022-07-28 09:25:25 +02:00
Rémi Verschelde
1e4b38fc5d
Merge pull request #62414 from Calinou/movie-maker-add-quit-on-end 2022-07-28 01:05:19 +02:00
pattlebass
130e715ab9 HTML5: Add support for Input.vibrate_handheld() 2022-07-27 22:54:41 +03:00
Hugo Locurcio
aaeb60eafc
Add a Movie Quit On Finish property to AnimationPlayer
This quits the project when an animation is done playing in the
given AnimationPlayer, but only in Movie Maker mode.
When this happens, a message is printed with the absolute path of the
AnimationPlayer node that caused the engine to quit.

This can be used to create videos that stop at a specified time
without having to write any script.

A report is now also printed to the console when the video is done
recording (as long as the engine was exited properly).
This report is unfortunately not always visible in the editor's
Output panel, as it's printed too late.

A method was also added to get the path to the output file from the
scripting API.
2022-07-27 18:50:28 +02:00
kobewi
fdf7441015 Split ceil(), floor() and round() method 2022-07-27 16:58:56 +02:00
Silc Renew
4211e68d80 rename and unify notation for spherical interpolation 2022-07-27 23:22:50 +09:00
Rémi Verschelde
cc5135959b
Merge pull request #62973 from bruvzg/sysfont_support 2022-07-27 13:38:30 +02:00
Rémi Verschelde
89527db8d3
Merge pull request #63380 from V-Sekai/fix-cubic-slerp-dot 2022-07-27 13:20:02 +02:00
Rémi Verschelde
1c57d90e85
Merge pull request #63463 from KoBeWi/Vector5
Add some missing Vector4 methods
2022-07-27 10:45:39 +02:00
Rémi Verschelde
3647024dc5
Merge pull request #63494 from akien-mga/color-fix-set-hsv 2022-07-27 09:25:33 +02:00
Rémi Verschelde
835da447da
Merge pull request #63481 from m4gr3d/fix_remaining_scoped_storage_regressions_main
Address remaining scoped storage regressions
2022-07-26 18:17:03 +02:00
Fredia Huya-Kouadio
9679c67904 Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
2022-07-26 07:44:08 -07:00
Rémi Verschelde
cda723d201 Color: Fix resetting alpha when setting H/S/V separately
Fixes #63487.
2022-07-26 15:43:49 +02:00
Fabio Alessandrelli
ca7d572908 [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.
- RPC configurations are now dictionaries.
- Script.get_rpc_methods renamed to Script.get_rpc_config.
- Node.rpc[_id] and Callable.rpc now return an Error.
- Refactor MultiplayerAPI to allow extension.
- New MultiplayerAPI.rpc method with Array argument (for scripts).
- Move the default MultiplayerAPI implementation to a module.
2022-07-26 09:31:12 +02:00
bruvzg
36ef8f29dc
Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
Aaron Franke
9403173994
Allow loading override.cfg from PCK files 2022-07-25 22:34:54 -05:00
kobewi
7006f7d693 Add some missing Vector4 methods 2022-07-26 02:35:42 +02:00
Rémi Verschelde
25a7cdc97f
Merge pull request #63443 from rburing/bvh_debug_fixup 2022-07-25 23:08:06 +02:00
Nathan Franke
4b13a6dcb8
add equal checks to Transform3D::looking_at and Transform3D::set_look_at 2022-07-25 13:39:40 -05:00
Ricardo Buring
178405f7cb Fixup BVH debugging statements 2022-07-25 18:21:53 +02:00
Silc 'Tokage' Renew
e252d4e6fe Fix cubic_slerp
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
Co-authored-by: Pasi Nuutinmaki <gnssstylist@sci.fi>
2022-07-25 22:44:39 +09:00
Juan Linietsky
c7255388e1 Remove ThreadWorkPool, replace by WorkerThreadPool
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient.
It can also be better debugged.
2022-07-25 15:39:50 +02:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Rémi Verschelde
3084a48ace
Merge pull request #63219 from reduz/implement-vector4-projection 2022-07-25 11:13:27 +02:00
Rémi Verschelde
b7a47bfc09
Merge pull request #63098 from Xwdit/fix_qualifiers_script_doc 2022-07-24 23:26:30 +02:00
Xwdit
5d49df8d97 Fix missing method qualifiers in script doc
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-07-24 23:00:19 +02:00
Jcrespo
1a3d57f319 Solve discrepancy between code and class reference for Plane
On #43310, class reference was automatically updated from source,
causing xml documentation to disagree with parameter naming
description on Plane.intersects_segment().

Weirdly, it also changed the parameter for Plane.is_point_over()
from point to plane, when only the first has sense (and it is
defined on math.Plane as "const Vector3 &p_point"). Manual
mistake?

* Update begin/end to from/to on Plane.intersects_segment(...)
  docs description to match source
* Update Plane bindings to use points instread of plane for
  is_point_over(...)
* Change Plane.is_point_over(plane) to Plane.is_point_over(point)
  AND its description on docs

Fixes godotengine/godot-docs#5976
2022-07-24 18:21:25 +02:00
Fabio Alessandrelli
75f93167f7
Merge pull request #63262 from dsnopek/multiplayer-peer-custom-4.x
[4.x] Allow extending MultiplayerPeerExtension from GDScript
2022-07-24 01:24:22 +02:00
reduz
455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Rémi Verschelde
d2fa9cbdfd
Merge pull request #63141 from reduz/implement-thread-runner 2022-07-22 13:25:31 +02:00
Rémi Verschelde
653f95282c
Merge pull request #62996 from reduz/feature-build-profiles 2022-07-22 12:50:20 +02:00
reduz
67a260d63f Implement a Worker ThreadPool
This PR implements a worked thread pool. It uses a fixed amount of threads in a pool and allows scheduling tasks
that can be run on threads (and then waited for). It satisfies the following use cases:

* HTML5 thread count is fixed (and similar restrictions are known in consoles) so we need to reuse threads.
* Thread spawning is slow in general, so reusing threads is faster anyway.
* This implementation supports recursive waiting for tasks, making it less prone to deadlocks if threads from the pool also run tasks.

After this is approved and merged, subsequent PRs will be needed to replace the ThreadWorkPool usage by this class.
2022-07-22 11:46:48 +02:00
reduz
6236a688b7 Implement Feature Build Profiles
This PR is a continuation of #50381 (which was implemented exactly a year ago!)

* Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out).
* Add a detection system to scan the project and figure out the actual classes used.
* Added the ability for SCons to load build profiles.

Obligatory Screen:

A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size

TODO:

* Script languages need to implement used class detection (left for another PR).
* Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size.
* Options to disable some modules would be desired.
* More options to disable drivers (OpenGL, Vulkan, etc) would be desired.

In general this PR is a starting point for more contributors to improve and enhance this functionality.
2022-07-22 10:53:23 +02:00
Rémi Verschelde
19db9ed863
Merge pull request #63286 from RandomShaper/fix_debugger_focus 2022-07-22 00:48:06 +02:00
Rémi Verschelde
9b782b7573
Merge pull request #63242 from m4gr3d/fix_slow_copy_main
Address slow copy performance when using the `FileAccessFilesystemJAndroid` implementation
2022-07-22 00:22:30 +02:00
Pedro J. Estébanez
033001375f Fix editor re-focus on debugger break on Windows 2022-07-21 21:47:05 +02:00
Yuri Rubinsky
ccc56cc6d4 Rename epsilon to tolerance in the Plane::has_point method 2022-07-21 20:15:15 +03:00
Fredia Huya-Kouadio
31712cc9e7 Address slow copy performance when using the FileAccessFilesystemJAndroid implementation.
Read/write ops for this implementation are done through the java layer via jni, and so for good performance, it's key to avoid numerous repeated small read/write ops due the jni overhead.

The alternative is to allocate a (conversatively-sized) large buffer to reduce the number of read/write ops over the jni boundary.
2022-07-21 09:06:29 -07:00
Rémi Verschelde
d6b1dd4854
Merge pull request #63128 from cdemirer/fix-callable-comparator-error-message-argcount 2022-07-21 16:50:39 +02:00
bruvzg
8823eae328
Rename OSX to macOS and iPhoneOS to iOS. 2022-07-21 09:37:52 +03:00
David Snopek
f8137ce6c1 Allow extending MultiplayerPeerExtension from GDScript 2022-07-20 18:19:05 -05:00