Commit graph

5389 commits

Author SHA1 Message Date
Rémi Verschelde 2fcfc83da9
Merge pull request #48793 from vnen/gdscript-fix-temp-type-adjust
GDScript: Fix crash caused by uninitialized temp stack slots
2021-05-17 17:34:19 +02:00
George Marques 10a1f64968
GDScript: Fix crash caused by uninitialized temp stack slots
This adds initialization to every typed temporary stack slot at the
beginning of the function call instead of emitting instructions, since
those might be in a conditional branch and not be called.
2021-05-17 10:59:43 -03:00
Pedro J. Estébanez 469fa47e06
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-17 15:06:19 +02:00
Rémi Verschelde 37c3b33253
Merge pull request #48605 from sent44/scripteditor_get_codeedit
Add `get_base_editor` to `ScriptEditorBase`
2021-05-16 23:06:01 +02:00
Rémi Verschelde a7421612d0
Merge pull request #48767 from vnen/gdscript-builtin-static-methods
GDScript: Add support for builtin static method calls
2021-05-16 22:29:32 +02:00
George Marques ec783dd885
GDScript: Add support for builtin static method calls 2021-05-16 11:54:33 -03:00
sent44 2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
Rémi Verschelde a40a08827c
Merge pull request #46568 from akien-mga/basisu_20210130
basis_universal: Update to upstream commit from Apr 16, 2021
2021-05-13 14:55:49 +02:00
Hugo Locurcio 6c528e4fae
Add a unit test suite for GDScript
This tests run-time script loading.
2021-05-12 16:20:57 +02:00
Rémi Verschelde ed11756d26
GDNative: Fix size mismatch on 32-bit platforms for Signal and Callable
Fixes #48645.
2021-05-11 20:25:01 +02:00
Hugo Locurcio 7375a02015
Increase icon saturation by 30% for all editor icons
More saturated icons go better with the new editor theme.

These color changes only apply when using a dark theme.

The editor icon saturation can still be adjusted in the Editor Settings.
Setting the editor icon saturation setting to 0.77 should roughly match
the old icon saturation.
2021-05-11 18:15:31 +02:00
JFonS 1cab622e94
Add checks for __SSE2__ in the lightmap raycaster
(cherry picked from commit 20717990fd)
2021-05-11 14:09:44 +02:00
Rémi Verschelde 31a9afb135
SCons: Disable embree-based modules on x86 (32-bit)
Fixes #48482.

(cherry picked from commit e53422c8f9)
2021-05-11 14:09:44 +02:00
Morris Tabor 89a8bbda0a fix misaligned loads in bmp loader 2021-05-08 17:07:44 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Rémi Verschelde 2d133177e9
basis_universal: Update to upstream commit from Apr 16, 2021
BinomialLLC/basis_universal@ba1c3e40f1.
2021-05-07 17:26:11 +02:00
Rémi Verschelde bcbd480c32
Merge pull request #45144 from dalexeev/color-consts
Rename color constants (alternative)
2021-05-07 12:22:49 +02:00
Rémi Verschelde 8962d36bb1
Merge pull request #33577 from Calinou/highlight-control-flow-keywords
Highlight control flow keywords with a different color
2021-05-07 00:52:50 +02:00
Julien Nguyen 82522662f8 Fix temporary value not released when used as a dictionary key 2021-05-06 22:13:05 +02:00
Rémi Verschelde ae2359fc1f
Merge pull request #47776 from Razoric480/foreport
Implement LSP didDeleteFiles & make parser aware of sub-nodes
2021-05-06 20:46:18 +02:00
Rémi Verschelde ee4ef9709d
Merge pull request #46714 from HaSa1002/fix-gdscript-underscore-strict
Fix GDScript Tokenizer being very strict about the number of underscores
2021-05-06 20:19:45 +02:00
Rémi Verschelde 6e621441ca
Merge pull request #45607 from Calinou/improve-editor-theme
Improve the editor theme
2021-05-06 16:45:07 +02:00
Hugo Locurcio 3f078c99f6
Rename IP_Unix, IP_Address and TCP_Server to remove underscores 2021-05-06 02:52:01 +02:00
Hugo Locurcio e905e8f145
Highlight control flow keywords with a different color
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
Rémi Verschelde 11931d06ae
Merge pull request #48476 from AndreaCatania/AndreaCatania-patch-4
Add env.Depends to modules_enabled.gen.h generator
2021-05-05 13:19:45 +02:00
Andrea Catania b667e72adf Add env.Depends to modules_enabled.gen.h generator
Sometimes scons doesn't detects that a new module is being added. This commit fix it.
2021-05-05 11:44:29 +02:00
Rémi Verschelde dfbabcdaeb
Merge pull request #48453 from JFonS/improve_raycast_module_scsub
Port changes to the "raycast" module build files from 3.x
2021-05-04 17:55:25 +02:00
jfons 575543ce53 Port changes to the "raycast" module build files from 3.x 2021-05-04 17:21:41 +02:00
Rémi Verschelde e196733e88
Re-bind posmod, use int64_t instead of int
Fixes #48420, fixes #48421.
The binding was missed when moving GDScript built-in to Global Scope it seems.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-04 13:25:08 +02:00
Aaron Franke 0de9a7d803
Rename doubleclick to double_click 2021-05-04 04:38:08 -04:00
Rémi Verschelde 302b6ef576
Merge pull request #47798 from ray90514/bug#47620
Fix constants at function scope are not defined as constants for completion
2021-05-04 08:20:03 +02:00
jfons 6995b0429c Assorted fixes to UV unwrapping and GPU lightmapper
Various fixes to UV2 unwrapping and the GPU lightmapper. Listed here for
context in case of git blame/bisect:

* Fix UV2 unwrapping on import, also cleaned up the unwrap cache code.
* Fix saving of RGBA images in EXR format.
* Fixes to the GPU lightmapper:
	- Added padding between atlas elements, avoids bleeding.
	- Remove old SDF generation code.
	- Fix baked attenuation for Omni/Spot lights.
	- Fix baking of material properties onto UV2 (wireframe was
	  wrongly used before).
	- Disable statically baked lights for objects that have a
	  lightmap texture to avoid applying the same light twice.
	- Fix lightmap pairing in RendererSceneCull.
	- Fix UV2 array generated from `RenderingServer::mesh_surface_get_arrays()`.
	- Port autoexposure fix for OIDN from 3.x.
	- Save debug textures as EXR when using floating point format.
2021-05-03 18:10:34 +02:00
Rémi Verschelde 4e06731346
Merge pull request #47958 from Xrayez/gdscript-rename-test-scripts
Rename GDScript test script filenames to use `snake_case`
2021-05-03 15:44:46 +02:00
Fabio Alessandrelli 015fc2ad4f
Merge pull request #48205 from Faless/net/4.x_url_parsing
[Net] Implement String::parse_url for parsing URLs.
2021-05-03 13:55:57 +02:00
Rémi Verschelde 8abd50359b
Merge pull request #48363 from aaronfranke/tan
Fix some tangent Color typos in GLTF
2021-05-02 10:08:22 +02:00
rafallus abf6872c38 Change Path to Path3D in CSGPolygon3D 2021-05-01 22:43:36 -05:00
Aaron Franke b06cbd9f51
Fix some tangent Color typos in GLTF 2021-05-01 18:49:23 -04:00
Rémi Verschelde 0ad03ba052
Merge pull request #48333 from MaxStgs/master
Add WebSocketMultiplayerPeer _incoming_packets check bound
2021-04-30 20:12:35 +02:00
MaxStgs 05ad08941b Add WebSocketMultiplayerPeer _incoming_packets check bound 2021-04-30 21:00:52 +05:00
Rafał Mikrut efcb097674 Prevent setting too big or too small Collision Mask and Layer 2021-04-30 17:19:04 +02:00
Fabio Alessandrelli fc255bde29 [Net] ENet non-relaying server now process broadcasts.
Setting `server_relay = false` prevents the server from letting clients
communicate with each other, but without this fix, the server would also
ignore broadcast packets.
With this change, the server still does not relay messages to other
clients, but will correctly process broadcast messages (and "exclusive"
messages) as if they were directed to just the server.
2021-04-30 16:29:56 +02:00
Rémi Verschelde cab5064f20
doc: Sync classref with current source
And typo fix from https://github.com/godotengine/godot-docs/pull/4882.
2021-04-29 12:11:40 +02:00
Rémi Verschelde 5b16020846
Replace remaining uses of NULL with nullptr
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
Rémi Verschelde 690c00d522
Merge pull request #48235 from Faless/feature/network-local-port-enet-salvaged
[Net] Implement NetworkedMultiplayerENet.get_local_port
2021-04-28 19:04:09 +02:00
Fabio Alessandrelli cd22a2be2f Implement NetworkedMultiplayerENet.get_local_port
Allows retrieving the local port to which the peer is bound.
2021-04-28 16:53:13 +02:00
Rémi Verschelde f505a26798
Merge pull request #47454 from vnen/gdscript-lambda 2021-04-28 16:44:59 +02:00
George Marques 9ed0f0384c
GDScript: Fix crash when base of an attribute is invalid
In attribute expressions (`a.b`) it's possible that the base has an
incorrect syntax and thus become a nullptr expression in the tree. This
commit add the check for this case to fail gracefully instead of
crashing.
2021-04-28 11:09:40 -03:00
George Marques c201b212c7
GDScript: Implement lambdas compilation and runtime 2021-04-28 11:09:38 -03:00
George Marques 3155368093
GDScript: Add lambdas to the type analyzer
- Lambdas are always callables (no specific signature match).
- Captures from the current context are evaluated.
2021-04-28 10:56:16 -03:00
George Marques c6e66a43b0
GDScript: Add lambda syntax parsing
Lambda syntax is the same as a the function syntax (using the same
`func` keyword) except that the name is optional and it can be embedded
anywhere an expression is expected. E.g.:

    func _ready():
        var my_lambda = func(x):
            print(x)
        my_lambda.call("hello")
2021-04-28 10:56:16 -03:00
David Snopek b77925d246 Fixes #48178: WebXR broken when built with Emscripten 2.0.13 or later 2021-04-28 08:27:51 -05:00
Rémi Verschelde 35a8693e6a
Raycast: Fix use of removed copymem after #48239 2021-04-28 11:09:20 +02:00
Rémi Verschelde 305b2a15bf
Merge pull request #48239 from akien-mga/goodbye-copymem
Core: Drop custom `copymem`/`zeromem` defines
2021-04-28 11:04:05 +02:00
Rémi Verschelde 1c2766e240
Merge pull request #48245 from madmiraal/fix-24111
Update CSGMesh3D's documentation to explain how vertex normals are used
2021-04-27 23:04:59 +02:00
Hugo Locurcio 60b70c77e0
Improve the editor theme
The editor theme now makes use of rounded corners and less borders
to follow modern visual trends.

The default theme's colors were also tweaked to make the blue hue
more subtle (similar to the Arc theme, which was removed as a
consequence). The Alien theme was replaced by a Breeze Dark theme,
which should blend in well with the KDE theme.
2021-04-27 22:38:26 +02:00
Marcel Admiraal c2f6a73e4e Update CSGMesh3D's documentation to explain how vertex normals are used 2021-04-27 18:32:25 +01:00
Rémi Verschelde 95cfce661b
Merge pull request #48050 from JFonS/occlusion_culling 2021-04-27 19:07:12 +02:00
Rémi Verschelde 8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Johannes Witt bab36f1273
Fix CSG Path Polygon cache being removed after connect
fixes #30229
2021-04-27 13:58:01 +02:00
Rémi Verschelde 83cc6bcf55
Merge pull request #48187 from brakhane/remove-dupe-comments
Remove duplicate comments
2021-04-27 09:42:09 +02:00
Rémi Verschelde 639b02f454
Merge pull request #48185 from Calinou/codestyle-no-auto
Remove uses of `auto` for better readability and online code reviews
2021-04-26 22:32:50 +02:00
Hugo Locurcio 5d124c4a8f
Remove uses of auto for better readability and online code reviews
The current code style guidelines forbid the use of `auto`.

Some uses of `auto` are still present, such as in UWP code (which
can't be currently tested) and macros (where removing `auto` isn't
easy).
2021-04-26 14:59:28 +02:00
Rémi Verschelde f6e5ea774b
Merge pull request #48172 from madmiraal/fix-empty-csgshape-error
Fix new `CSGMesh` errors
2021-04-26 12:19:48 +02:00
Fabio Alessandrelli 3bb40669d5 [Net] Implement String::parse_url for parsing URLs.
Splits the URL into (scheme, host, port, path).
Supports both literal IPv4 and IPv6.
Strip credentials when present (e.g. http://user:pass@example.com/).

Use that function in both HTTPRequest and WebSocketClient.
2021-04-26 09:55:24 +02:00
Dennis Brakhane 31d41d83c3 Remove duplicate comments
A few single line comments were duplicated, probably due to bad merges.

This commit removes the obviously duplicate ones.
2021-04-25 20:03:52 +02:00
Marcel Admiraal 4311c2f66e Fix CSGMesh undo not refreshing gizmo 2021-04-25 09:07:26 +01:00
Marcel Admiraal 48d3269aa4 Fix empty CSGShape error 2021-04-25 08:08:14 +01:00
Rémi Verschelde d1dc28e46c
Merge pull request #48139 from vnen/gdscript-dict-keys
Fix mismatch between String and StringName in dictionary keys
2021-04-24 19:46:59 +02:00
Rémi Verschelde db90ab86b9
Merge pull request #47891 from Razoric480/lsp-update-filesystem
Make LSP update the filesystem for changed scripts
2021-04-24 13:17:31 +02:00
jfons 4d9d99bb82 Implement occlusion culling
Added an occlusion culling system with support for static occluder meshes.
It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`.

Occluders are defined via the new `Occluder3D` resource and instanced using the new
`OccluderInstance3D` node. The occluders can also be automatically baked from a
scene using the built-in editor plugin.
2021-04-23 21:45:23 +02:00
George Marques 1e4ff2ede6
GDScript: Make sure Lua-style dicts use StringName as keys 2021-04-23 16:00:23 -03:00
George Marques c7511de02e
GDScript: Fix resolution of dictionary keys
There was a mixup between String and StringName keys. Now they're
clearly separated. This also means you have to consider which type
you're using for the dictionary keys and how you are accessing them.
2021-04-23 15:42:33 -03:00
rafallus cfa06f0f76 Unexpose _direct_state_changed in PhysicsBody
Removed _direct_state_changed bindings
Affects 2D and 3D nodes
Callbacks now use Callable
Tests were changed accordingly
2021-04-22 23:20:58 -05:00
Rémi Verschelde 4753b309a8
Merge pull request #48074 from akien-mga/fbx-fix-zlib-unbundling
fbx: Fix include for zlib that broke unbundling
2021-04-22 16:53:06 +02:00
bruvzg b56241f22f
ICU: Update to version 69.1, improve ICU data export process. 2021-04-22 16:56:53 +03:00
bruvzg a4423c82f8
Fix crash on GDNative API json generator exit. 2021-04-22 10:24:13 +03:00
Rémi Verschelde 93b7406138
fbx: Fix include for zlib that broke unbundling
It's possible to link against system zlib on Linux, so we should use system paths.
2021-04-22 02:18:44 +02:00
kobewi 9fbef6f7db Fix GridMap still drawing when Alt+Tabbing 2021-04-22 01:18:30 +02:00
Rémi Verschelde 8a8dd9cef4
Merge pull request #47896 from Calinou/videoplayer-stream-position-warning
Print a warning when trying to seek in VideoPlayer
2021-04-20 20:07:13 +02:00
Rémi Verschelde fdf041a466
Merge pull request #47347 from nekomatata/heightmap-support
Heightmap collision shape support in Godot Physics
2021-04-20 17:40:28 +02:00
Rémi Verschelde a9ecf66342
Merge pull request #47956 from vnen/gdscript-double-stack
GDScript: Use special stack space for temporaries to reduce type changes
2021-04-20 17:39:09 +02:00
Rémi Verschelde 8ba06e3161
Merge pull request #47448 from madmiraal/rename-lineedit-cursor
Rename LineEdit getters and setters to match property names
2021-04-19 10:40:29 +02:00
Rémi Verschelde dfe4feb188
Merge pull request #47917 from akien-mga/squish-decompress-only
Import: Cleanup and optimize etcpak compression method
2021-04-18 17:00:21 +02:00
Marcel Admiraal 86822b187e Rename LineEdit caret_* properties getters and setters to match property 2021-04-17 12:41:23 +01:00
Ignacio Roldán Etcheverry 27a66ee528 C#: Fix double casting in wasm m2n trampolines
The trampolines were casting double to `size_t` (likely a copy-paste
mistake), so the value was getting truncated.
2021-04-17 05:45:52 +02:00
Andrii Doroshenko (Xrayez) 1e26bf23c2 Rename GDScript test script filenames to use snake_case 2021-04-16 22:16:19 +03:00
Rémi Verschelde 0ab928e060
Import: Cleanup and optimize etcpak compression method
Avoid unnecessary allocation of temporary buffers for each mip, and creates
only one Image with the compressed data.
Also renames variable and reorders code for clarity.

Clarify that squish is now only used for decompression.

Documented which formats can be decompressed in Image.
2021-04-16 17:08:36 +02:00
George Marques 9411bf05a4
GDScript: Adjust type of temporaries when needed 2021-04-16 12:04:08 -03:00
Rémi Verschelde 200d9a734c
Merge pull request #47701 from vnen/gdscript-test-runner 2021-04-16 10:34:39 +02:00
Rémi Verschelde 88015f4e72
Merge pull request #47880 from RevoluPowered/fix-fbx-parser
FBX Improve Parser and File Compatibility
2021-04-16 08:41:46 +02:00
Rémi Verschelde c7a4e2196e
Merge pull request #47878 from clayjohn/rename-get_surface_material
Rename get_surface_material to get_surface_override_material
2021-04-15 07:57:15 +02:00
Gordon MacPherson 061b77e5e6 This stops using FBXPropertyTable as a pointer.
The base object will inherit the property table, for every FBX object, if it doesn't exist it will be ignored.

The previous code was dangerous and not simple to understand, this makes the code simpler and should result in no leaks with PropertyTable.

Features/Fixes:

Adds ability for multiple millions of polygons to be loaded.
Fixes memory leaks with tokens
Fixes memory leaks with property table
Fixes loading some corrupt files
Fixes meshes not having a unique name to the mesh node.
Opens up loading for two more versions: 7100 and 7200, up to 2020.
Preliminary support for Cinema4D files in parser now, before this was not possible it would cause memory corruption, which is gone now.

FBXProperties not being pointers presented simpler challenges in the long run also, fixed a bunch of bugs.
2021-04-15 05:54:50 +01:00
clayjohn 92731d292c Rename get_surface_material to get_surface_override_material 2021-04-14 20:24:03 -07:00
Hugo Locurcio ea46639e22
Print a warning when trying to seek in VideoPlayer
Seeking isn't implemented in built-in video formats and can only
be supported in GDNative-provided video formats.
2021-04-14 20:39:13 +02:00
George Marques 40502a1689
GDScript: Pool temporary values by type on the stack
So the stack slots perform less type changes, which is useful for
future optimizations.
2021-04-14 14:35:51 -03:00
Francois Belair b16bb33a5b Make LSP update the filesystem of changed scripts
This updates global classes and exposes base member variables.
Fixes #39713
2021-04-14 13:12:39 -04:00
Rémi Verschelde b6a31d0bf6
Merge pull request #47890 from akien-mga/etcpak-compress-only
etcpak: We only need the compression code, remove rest of etcpak app
2021-04-14 17:44:20 +02:00
Rémi Verschelde 638cfec853
etcpak: We only need the compression code, remove rest of etcpak app
We do our own image loading, threading, and memory management in Godot already,
so the only components we need from etcpak (at least as of now) are the
`Compress*` methods defined in `ProcessDxtc.cpp` and `ProcessRGB.cpp`.

So we don't need to compile or vendor the rest.
2021-04-14 16:50:02 +02:00
reduz d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
George Marques 8fc4a732de
Merge pull request #47330 from Blackiris/fix-corrupt-scene-when-export-has-setter
Fix corrupt scene when export var has setter
2021-04-14 10:00:57 -03:00
Rémi Verschelde 3d1d3ab3db
Merge pull request #47807 from Blackiris/fix-is-type-treated-as-address
Fix type argument in is_builtin which was treated as an address
2021-04-14 14:50:02 +02:00
Julien Nguyen 79a16b8a44 Fix corrupt scene when export var has setter 2021-04-14 09:14:50 +02:00
K. S. Ernest (iFire) Lee 3cae9a802b Export gltf2 normal textures correctly. 2021-04-13 13:28:26 -07:00
K. S. Ernest (iFire) Lee d840165a32
Add etcpak library for faster ETC/ETC2/S3TC imports.
- `etc` module was renamed to `etcpak` and modified to use the new library.
- PKM importer is removed in the process, it's obsolete.
- Old library `etc2comp` is removed.
- S3TC compression no longer done via `squish` (but decompression still is).
- Slight modifications to etcpak sources for MinGW compatibility,
  to fix LLVM `-Wc++11-narrowing` errors, and to allow using vendored or
  system libpng.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-04-13 00:12:12 +02:00
Julien Nguyen 9936abb3d5 Fix type argument in is_builtin which was treated as an address 2021-04-11 20:34:48 +02:00
ray90514 1f9524bf57 Fix Constants at function scope are not defined as constants for autocompletion 2021-04-11 22:41:04 +08:00
Francois Belair 39f7408ccb Implement LSP didDeleteFiles & make parser aware of sub-nodes 2021-04-10 15:21:59 -04:00
George Marques cf4079cb5f
Reduce number of addressing modes in GDScript VM
There's now only 3 addressing modes: stack, constant, and member.

Self, class, and nil are now present respectively in the first 3 stack
slots. Global and class constants are moved to local constants when
compiling. Named globals is only present on editor to use on tool
singletons, so its use now emits a new instruction to copy the global to
the stack.

This allow us to further optimize the VM later by embedding the
addressing modes in the instructions themselves, which is better done
with less permutations.
2021-04-08 14:29:55 -03:00
George Marques 5f77f38573
Add runner for GDScript testing
This is meant for testing the GDScript implementation, not for testing
user scripts nor testing the engine using scripts.

Tests consists in a GDScript file and a .out file with the expected
output. The .out file format is: expected status (based on the enum
GDScriptTest::TestStatus) on the first line, followed by either an error
message or the resulting output. Warnings are added after the first
line, before the output (or compiler errors) if the parser pass without
any error.

The test script must have a function called `test()` which takes no
argument. Such function will be called by the test runner. The test
should not have any dependency unless it's part of the test too. Global
classes (using `class_name`) are registered before the runner starts, so
those should work if needed.

Use the command `godot --gdscript-generate-tests
godot-source/modules/gdscript/tests/scripts` to update the .out files
with the current output (make sure the output are the expected values
before committing).

The tests themselves are part of the doctest suite so those can be
executed with `godot --test`.

Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
2021-04-08 09:34:59 -03:00
Lyuma 7d8e981262 Fix crash on importing empty .fbx file 2021-04-08 02:50:01 -07:00
Fabio Alessandrelli f7ae5442a6
Merge pull request #47708 from Calinou/doc-websocketclient-secure
Document secure wss:// caveats for WebSocketClient
2021-04-08 00:47:04 +02:00
Rémi Verschelde 40dff7117a
Merge pull request #47648 from Blackiris/fix-gdscript-editor-hangs
Fix infinite loop when guessing argument type from parent class
2021-04-07 23:19:29 +02:00
Rémi Verschelde 73a1253095
Merge pull request #47672 from Blackiris/fix-setter-stackoverflow
Fix stack overflow in setter
2021-04-07 23:17:30 +02:00
Hugo Locurcio a56e37545b
Document secure wss:// caveats for WebSocketClient
See https://github.com/godotengine/godot/issues/37739.
2021-04-07 21:32:17 +02:00
Rémi Verschelde e261c2dd9d
Merge pull request #46877 from W4RH4WK/always-dynamically-allocate-property-table
Always dynamically allocate PropertyTable
2021-04-07 11:25:38 +02:00
Marcel Admiraal ff9a6c4e39 Check for the use of an empty shape in Bullet Kinematic collisions 2021-04-06 18:40:13 +01:00
Julien Nguyen 43c1c680f0 Fix stack overflow in setter 2021-04-06 19:00:08 +02:00
Bastiaan Olij 81131bd844 Only cleanup meta data if GDNative library is reloadable and we're about to unload it 2021-04-06 11:55:15 +10:00
Julien Nguyen 20f18f1621 Fix infinite loop when guessing argument type from parent class 2021-04-05 16:39:41 +02:00
Rémi Verschelde 5b2c4ad91c
Merge pull request #47569 from vnen/gdscript-typed-return
GDScript: Properly validate return type
2021-04-05 15:16:43 +02:00
George Marques 35682d3079
GDScript: Properly validate return type
When the type cannot be validated at compile time, the runtime must do a
check to ensure type safety is kept, as the code might be assuming the
return type is correct in another place, leading to crashes if the
contract is broken.
2021-04-05 09:52:05 -03:00
Rémi Verschelde d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
Rémi Verschelde 9bbe51dc27
Style: Apply clang-tidy's modernize-use-nullptr 2021-04-05 14:05:07 +02:00
Rémi Verschelde 65a2888057
Style: Apply clang-tidy's modernize-use-default-member-init 2021-04-05 13:37:27 +02:00
Rémi Verschelde 0f0c0e5933
Style: Apply clang-tidy's modernize-use-bool-literals 2021-04-05 13:16:35 +02:00
Rémi Verschelde 33b8f1448e
Merge pull request #47592 from jmb462/fix-VisualScriptFunctionState-connect-to-null-signal-crash
Fix VisualScriptFunctionState connect to null object crash (Fix #47572)
2021-04-05 12:15:58 +02:00
Rémi Verschelde e0b24467f7
Merge pull request #47627 from Blackiris/fix-gdscript-var-address
Fix GDScript variables addresses getting mixed
2021-04-05 11:55:47 +02:00
Rémi Verschelde 77dc4c3cb6
Merge pull request #47636 from qarmin/input
Fix crashes in *_input functions
2021-04-05 11:54:08 +02:00
Rafał Mikrut 504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Julien Nguyen 3168c2a513 Fix GDScript variables addresses getting mixed 2021-04-04 19:03:15 +02:00
Jan Haller 0fe851da23 Fixes #47607 (forgotten statement in GDNative cleanup)
Co-authored-by: geekrelief <geekrelief@gmail.com>
2021-04-04 16:11:16 +02:00
jmb462 3a0a71fa6a Fix VisualScriptFunctionState connect to null object crash 2021-04-03 12:13:26 +02:00
Rémi Verschelde ed2f51b15f
Merge pull request #47452 from BastiaanOlij/xr_positional_tracker_ref
Change XRPositionalTracker to a reference (master)
2021-04-03 10:13:23 +02:00
Rémi Verschelde 4b6e9f3157
Merge pull request #46991 from madmiraal/rename-invert-reverse
Rename Array.invert() to Array.reverse()
2021-04-01 13:32:22 +02:00
Kyle 618dd892f5 Fix gdnative config file set as null
Fixes #

Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.
2021-03-31 15:00:31 -04:00
Rémi Verschelde 9cd1e50969
Merge pull request #47250 from BastiaanOlij/check_vulkan_version
Obtain supported Vulkan API
2021-03-31 13:45:43 +02:00
Bastiaan Olij e93c9fc4ed As GLSLang seems to be all or nothing, added our own defines 2021-03-31 21:47:25 +11:00
bruvzg 0d3fa2a125
[Complex Text Layouts] Provide access to glyph contour points. 2021-03-31 09:32:14 +03:00
Rémi Verschelde 737f09895d
Merge pull request #47131 from vnen/gdscript-export-fix
Fix a few issues with @export in GDScript
2021-03-30 15:12:04 +02:00
Rémi Verschelde 7c14e987b4
Merge pull request #47492 from vnen/gdscript-typed-arrays
GDScript: Fix array type check on constants
2021-03-30 14:37:42 +02:00
George Marques 5d9585d83b
GDScript: Fix array type check on constants
They mistakenly pointing to the wrong union member (variable instead of
constant).
2021-03-30 09:09:13 -03:00
George Marques 2b9be53243
GDScript: Implement export of typed arrays 2021-03-30 08:29:38 -03:00
George Marques 160c260495
GDScript: Allow export of enum variables
Also fix the enum type in variables to be integer.
2021-03-30 08:29:38 -03:00
George Marques 3e4ecd9669
GDScript: Show error on invalid initializer expression 2021-03-30 08:29:38 -03:00
George Marques 577a17980d
Move GDSript annotation application after type-checking
This ensures that annotations that rely on the datatype (such as
@export) can validated it timely, allowing compound expressions instead
of only literal values.
2021-03-30 08:29:36 -03:00
Rémi Verschelde d71eed2865
FBX: Fix first bone getting unnecessary '_1' suffix
Fixes #43820.

Co-authored-by: Gordon MacPherson <gordon@gordonite.tech>
2021-03-29 17:25:12 +02:00
Rémi Verschelde aba03110ba
Merge pull request #46830 from vnen/gdscript-typed-arrays
GDScript typed arrays
2021-03-29 16:47:38 +02:00
Rémi Verschelde 58d302dd5f
Merge pull request #46844 from geekrelief/gdnative_unregister_script_fix
fixes #46839, ensure library_classes is cleared and free funcs are ca…
2021-03-29 16:11:11 +02:00
George Marques 85e316a5d5
Add typed arrays to GDScript
- Use `Array[type]` for type-hints. e.g.:
  `var array: Array[int] = [1, 2, 3]`
- Array literals are typed if their storage is typed (variable
  asssignment of as argument in function all). Otherwise they are
  untyped.
2021-03-29 10:45:48 -03:00
Bastiaan Olij 454c889e61 Change XRPositionalTracker to a reference and better expose it to GDNative 2021-03-29 23:01:47 +11:00
Marcel Admiraal fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Emmanuel Leblond 9761bab753
Add support for _to_string virtual function overwrite in Pluginscript 2021-03-27 21:13:51 +01:00
Bastiaan Olij a6c989bc1b Obtain supported Vulkan API 2021-03-26 12:06:57 +11:00
PouleyKetchoupp c8dd3c7d80 Heightmap collision shape support in Godot Physics 2021-03-25 16:52:41 -07:00
Rémi Verschelde 3a5929abf3
doc: Sync classref with current source 2021-03-25 12:19:51 +01:00
K. S. Ernest (iFire) Lee 60eb3dd6ad Always have a name for gltf2 mesh, material and skins.
Co-authored-by: Lcbx <luc.courbariaux@gmail.com>
2021-03-24 00:30:22 -07:00
Aaron Franke a5324787c8
Rename some more global enums (Key, Joy, MIDI) 2021-03-23 07:13:23 -04:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde eeba8d63f8
Merge pull request #44398 from RevoluPowered/unit-tests-for-export-templates
Add unit tests for export templates
2021-03-23 00:42:29 +01:00
Rémi Verschelde 11718dbef9 Merge pull request #45562 from aaronfranke/core-modules-real_t
Use real_t in GridMap and VariantParser
2021-03-23 00:10:04 +01:00
Gordon MacPherson 6b4ff3b44b Add unit tests for export templates 2021-03-22 18:57:08 +00:00
Juan Linietsky 97a3a66220 Improved 3D Scene Importer
* Added option for importers to show an Advanced settings dialog
* Created advanced settings dialog for Scene Importer
* Cleaned up importers (remove many old/unused options)
* Added the ability to customize every node, material, mesh and animation individually
* Saving to animations and meshes to files is now a manual process, making it more predictable
* Added the ability for materials to be replaced by external files (or to be made external, up to you).
* When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it.

WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
2021-03-22 12:16:40 -03:00
Marcel Admiraal 755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
Rémi Verschelde 07f076fa4f
Merge pull request #47194 from W4RH4WK/fbx-normalize-rotations
FBX Import: Normalize rotation quaternions
2021-03-21 08:48:53 +01:00
Rémi Verschelde fa681d04b7
Merge pull request #46937 from nekomatata/soft-body-support
SoftBody support in GodotPhysics 3D
2021-03-20 21:45:20 +01:00
Rémi Verschelde 793000c6a9
Merge pull request #47139 from nekomatata/concave-backface-collision
Disable backface collision with ConcavePolygonShape by default
2021-03-20 21:43:57 +01:00
Alex Hirsch d03f4cefea FBX Import: Check bone map access for valid cluster target node id
fix #47184
2021-03-20 18:07:51 +01:00
Alex Hirsch 72d3bfc88c FBX Import: Normalize rotation quaternions
fix #47174
2021-03-20 17:46:25 +01:00
Aaron Franke affe3c817a
Use real_t in GridMap and VariantParser 2021-03-19 00:56:34 -04:00
Alex Hirsch d7ac5ba1c6 Fix missing quote in multiline GDScript string
fix #47117
2021-03-19 01:24:18 +01:00
Rémi Verschelde 47cf9985eb
Merge pull request #47128 from ArdaE/master
GLTF importer: Prevent quick accumulation of significant numerical errors in keyframe times
2021-03-19 00:14:51 +01:00
ArdaE 6770a9413b GLTF import: Prevent significant numerical errors in keyframe times
Keyframe times shift slowly in imported animations, starting with a zero shift
at the beginning and increasing and becoming erratic slowly farther into an
animation, reaching significant levels at times after about 3 minutes into an
animation. This commit fixes the issue by increasing the precision of the
floating point numbers used for keyframe time calculations. Only the most
significant cases that cause fast accumulation of errors over a short animation
duration are fixed. Other cases that would have a marginal benefit from
switching to double precision numbers are left for another PR/further analysis.
Note that this change has no impact on the runtime performance of games/apps
created using Godot. It only affects the GLTF importer.

Fixes #47127.
2021-03-18 15:55:31 -07:00
PouleyKetchoupp 7bbd545432 Disable backface collision with ConcavePolygonShape by default
Helps a lot with soft bodies and generally useful to avoid shapes to go
through the ground in certain cases.

Added an option in ConcavePolygonShape to re-enable backface collision
on specific bodies if needed.
2021-03-18 11:30:22 -07:00
Rémi Verschelde 2274d4eebc
Mono: Fix Android build after #46900 2021-03-18 17:58:21 +01:00
PouleyKetchoupp d5ea4acd2d SoftBody support in GodotPhysics 3D
- Fixed SoftBody surface update with new rendering system
- Added GodotPhysics implementation for SoftBody
- Added support to get SoftBody rid to interact with the physics server
- Added support to get SoftBody bounds from the physics server
- Removed support for unused get_vertex_position and get_point_offset
from the physics server
- Removed SoftBody properties that are unused in both Bullet and
GodotPhysics (angular and volume stiffness, pose matching)
- Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly
2021-03-18 09:04:17 -07:00
Rémi Verschelde 4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
George Marques ec806c5c5b
Added static method information the generated builtin API JSON 2021-03-17 08:33:08 -03:00
George Marques 8fddab9209
Further changes in GDNative API
- Added new_copy to all types, since trivial copy won't work for all
  types.
- Added functions to convert from String to char array types, which is
  not provided by the methods bound in Variant.
- Added operator index to String.
- Added missing cstring version of some Variant functions. They existed
  in the header but didn't have the implementation and were missing from
  the gdnative_api.json file.
- Added support for static calls on Variant types.
2021-03-17 08:26:10 -03:00
Rémi Verschelde 08ca4184f4
Merge pull request #47024 from groud/navigation
Allow Navigation to be more flexible
2021-03-17 09:18:54 +01:00
K. S. Ernest (iFire) Lee c203fbfa8c Expand bone name possibilities. 2021-03-16 15:07:30 -07:00
bruvzg b79e8c22f0
HarfBuzz: Update to version 2.8.0 2021-03-16 19:56:52 +02:00
Rémi Verschelde 69486b1059
miniupnpc: Update to version 2.2.2 2021-03-16 10:54:38 +01:00
Fabio Alessandrelli 163fc125cd [Net] Fix miniupnpc when no interface is specified
This is a tricky one, it used to work, but it was wrong, because in such
a scenario instead of passing NULL as required by the API, it would pass
a buffer containing the `\0` terminator.
This stopped working on a specific miniupnpc version, when they fixed
some network endianess issue on Windows, to which we made a workaround,
which in turn would probably result in failures when the interface is
specified.

This commit address the issue properly, by checking the specified
interface string size, and correctly passing NULL instead of the empty
string when necessary.

Also reverts the commit that introduced the bogus workaround:
e85330231c

One of those PR when the explaination is much longer then code changes
:).
2021-03-15 17:33:26 +01:00
Gilles Roudière ac7073f586 Allow Navigation to be more flexible 2021-03-15 15:58:59 +01:00
Ignacio Etcheverry 5b3b9cd63b C#: Fix disconnecting event signals twice
`disconnect_event_signals` can be called twice (when managed instance
is disposed and from the ScriptInstance destructor).
2021-03-15 07:08:10 +01:00
Rémi Verschelde 6edb0a75ab
Merge pull request #46936 from DavidSichma/match_temp_header
Fixed match test expression for temporaries
2021-03-14 15:46:53 +01:00
Rémi Verschelde 1066dbcecc
Merge pull request #46968 from sboronczyk/fix-editor-plugin-mono
Fix create c# script from editor after partial class type is necessary
2021-03-14 00:27:34 +01:00
Rémi Verschelde 7015027cbf
Merge pull request #46900 from Ev1lbl0w/bugfix-malloc_calls
Replace malloc's with Godot's memalloc macro
2021-03-13 21:55:52 +01:00
sboronczyk 094981b277 Fix create c# script after partial class type 2021-03-13 17:31:47 +01:00
Rémi Verschelde 942f5f0cb2
Merge pull request #46929 from Anshul7sp1/typosAndGrammar
Fixes small typos and grammar correction
2021-03-13 14:55:05 +01:00
Ev1lbl0w 838e7d0a8d
Replace malloc's with Godot's memalloc macro 2021-03-13 11:51:45 +00:00
Rémi Verschelde 8368f53941
Merge pull request #46954 from neikeq/reggr-46307
C#: Fix StringName leak warnings after generating bindings
2021-03-13 09:13:34 +01:00
Ignacio Etcheverry d9603b2d73 C#: Fix StringName leak warnings after generating bindings
`Main::cleanup()` prints warnings if it finds `StringName`s still alive.
We need the `BindingsGenerator` to be destructed before calling cleanup.
2021-03-13 01:16:31 +01:00
Ignacio Etcheverry ee8e5146a4 C#: Fix ScriptPathAttribute generator with none or nested namespaces
The following two bugs were fixed:
- For classes without namespace we were still generating `namespace {`
without a namespace identifier, causing a syntax error.
- For classes with nested namespaces we were generating only the innermost
part of the namespace was being generated, e.g.: for `Foo.Bar` we were
generating `namespace Bar {` instead of `namespace Foo.Bar {`.
This wasn't causing any build error, but because of the wrong namespace
Godot wasn't able to find the class associated with the script.
2021-03-13 01:04:59 +01:00
David Sichma 762bb5843b
Fixed match test expression for temporaries
Fixed that a potentially popped temporary was used for the value in
match statements.
2021-03-12 15:04:45 +01:00
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
jfons 809d88b925 Fix visibility toggle for baked GridMaps 2021-03-12 12:57:04 +01:00
Rémi Verschelde fec979b850
Merge pull request #44671 from o01eg/fix-gcc-visibility
GDNative: Fix symbols visibility for GCC
2021-03-12 09:41:56 +01:00
Alex Hirsch 09bda3f140 Always dynamically allocate PropertyTable
- `Texture::~Texture` expects `props` to be dynamically allocated.

- `GetPropertyTable` returned a pointer to an existing `PropertyTable`
  but is expected to return a newly, dynamically allocated one.

- `PropertyTable::PropertyTable()` suggests that an empty `element`
  property is valid.

fix #46876
fix #45573
2021-03-10 19:12:23 +01:00
Gilles Roudière ba1344408f Implement Navigation layers 2021-03-10 11:23:06 +01:00
Gilles Roudière a9dc53d152 Remove Navigation2D/3D nodes, and move the navigation map to the world resource 2021-03-10 11:23:06 +01:00
geekrelief 58fa4973f6 fixes #46839, ensure library_classes is cleared and free funcs are called
Co-authored-by: toasteater <48371905+toasteater@users.noreply.github.com>
Co-authored-by: Jan Haller <bromeon@gmail.com>
2021-03-09 14:32:46 -08:00
Rémi Verschelde 83b1acdc60
Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
Rémi Verschelde 26d1b30d35
Merge pull request #46174 from xill47/mono-appdomain-unhandled-exception-event
Added mono_unhandled_exception call to unhandled_exception hook
2021-03-08 13:26:47 +01:00
Ilya Kuznetsov 6061ff7ba1 Added mono_unhandled_exception call to unhandled_exception hook 2021-03-08 12:57:50 +01:00
Rémi Verschelde 9a33c1b6a6
Merge pull request #46782 from bruvzg/fix_def_theme_size
Improve bitmap font scaling. Fix default theme font size.
2021-03-08 10:03:12 +01:00
bruvzg 43c7c279d5
Improve bitmap font scaling. Fix default theme font size. 2021-03-08 09:56:40 +02:00
Rémi Verschelde 15bd2bf03f
Merge pull request #46713 from neikeq/csharp-source-generators-init
Add C# source generator for ScriptPathAttribute
2021-03-07 01:04:47 +01:00
Ignacio Etcheverry e2afe700f6 Add C# source generator for a new ScriptPath attribute
This source generator adds a newly introduced attribute,
`ScriptPath` to all classes that:

- Are top-level classes (not inner/nested).
- Have the `partial` modifier.
- Inherit `Godot.Object`.
- The class name matches the file name.

A build error is thrown if the generator finds a class that meets these
conditions but is not declared `partial`, unless the class is annotated
with the `DisableGodotGenerators` attribute.

We also generate an `AssemblyHasScripts` assembly attribute which Godot
uses to get all the script classes in the assembly, eliminating the need
for Godot to search them. We can also avoid searching in assemblies that
don't have this attribute. This will be good for performance in the
future once we support multiple assemblies with Godot script classes.

This is an example of what the generated code looks like:

```
using Godot;
namespace Foo {
	[ScriptPathAttribute("res://Player.cs")]
	// Multiple partial declarations are allowed
	[ScriptPathAttribute("res://Foo/Player.cs")]
	partial class Player {}
}

[assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })]
```

The new attributes replace script metadata which we were generating by
determining the namespace of script classes with a very simple parser.
This fixes several issues with the old approach related to parser
errors and conditional compilation.
It also makes the task part of the MSBuild project build, rather than
a separate step executed by the Godot editor.
2021-03-06 21:50:32 +01:00
Duddino c47070e165 Added some checks to prevent accessing a null collider
Previously godot would try to access
`CollisionObjectBullet::bt_collision_object` even if it was null.
Fixes #46651
2021-03-06 12:07:27 +01:00
Johannes 982a0ac348
Fix GDScript Tokenizer being very strict about the number of underscores
You can use multiple underscores in one number, just not two of them
together.
2021-03-06 01:57:37 +01:00
Rémi Verschelde 338fa05acc
Merge pull request #43768 from sjml/mac-mono-export-fix
Mono/macOS: Separate data dir into frameworks and resources for codesigning
2021-03-03 22:42:44 +01:00
Shane Liesegang 42eb09ddcc Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2021-03-03 13:54:34 +01:00
David Sichma 66a5002750
Fixed match for expression pattern
equality comparison now writes to right target address
2021-03-02 19:18:29 +01:00
George Marques 16e88f99e2
Merge pull request #42029 from ThakeeNathees/export-type-infer-bug-fix
GDScript export array/dictionary type infer bug fix
2021-03-02 12:14:57 -03:00
Rémi Verschelde d86369b590
Merge pull request #46559 from asmaloney/fix-code-completion
Script editor: Fix two special cases not being checked in code completion
2021-03-02 15:39:13 +01:00
Rémi Verschelde 75bfb016f2
Merge pull request #41897 from strank/not-in-conditional-done
Add a "not in" operator to GDScript.
2021-03-02 15:16:52 +01:00
Andy Maloney 4e89cb330b [script editor] Fix two special cases not being checked in code completion
When this code was changed for 4.0, a "break" statement inside a for loop in 3.x was changed to "return".

This means that the two special cases (autoloads and input actions) are never checked.

Removing the return lets these work properly in the editor.

(Also reorder conditionals to short-circuit and avoid expensive methods.)
2021-03-01 09:39:03 -05:00
Rémi Verschelde 21609c3bfd
Merge pull request #46470 from Faless/net/4.x_enet_timeout
Add set_peer_timeout to NetworkedMultiplayerENet.
2021-02-27 16:45:29 +01:00
Fabian 1b54de3039 Add set_peer_timeout to NetworkedMultiplayerENet. 2021-02-27 12:52:12 +01:00
Aaron Franke 3f50954ced
Add generic support to PackedScene.Instance 2021-02-25 20:49:22 -05:00
Rémi Verschelde b7b70004bc
Merge pull request #46379 from ThakeeNathees/signal-idf-not-found-fix
GDScript: False positive "Identifier not found" error on signals fixed
2021-02-25 22:30:22 +01:00
Hugo Locurcio 2e8e6e26a8 Document seamless noise having a lower contrast than non-seamless noise
See #41787.
2021-02-25 18:33:11 +01:00
Rémi Verschelde ee5ea64e83
Merge pull request #40276 from Taywee/master
remove invalid codeLensProvider value from lsp
2021-02-25 17:26:26 +01:00
Jack Linhart 03fd2b4c86 Added GridMap description to get_bake_meshes() 2021-02-25 15:42:49 +01:00
Aaron Franke 4b4721f5bd
Fix C# bindings generator for default value types 2021-02-25 08:30:48 -05:00
abaire 61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
Thakee Nathees 9869522e6a false positive "Identifier not found" error or signals fixed 2021-02-24 19:34:01 +05:30
Rémi Verschelde a527c6856b
Merge pull request #46045 from bruvzg/text_server_bmp_create
[TextServer] Restores bitmap font dynamic construction functions.
2021-02-24 12:55:36 +01:00
Rémi Verschelde 88ee248db0
Merge pull request #46307 from RandomShaper/fix_crash_mono_glue
Make glue generation shutdown more graceful
2021-02-22 21:39:01 +01:00
Pedro J. Estébanez 23907e6f19 Make glue generation shutdown more graceful 2021-02-22 11:06:33 +01:00
Marcel Admiraal 92e0a84a4c Add missing semicolons to webxr.eterns.js 2021-02-21 16:10:26 +00:00
Rémi Verschelde ed8333f6bc
Merge pull request #45158 from aaronfranke/cs-packedarray
Add C# array features from core PackedArrays
2021-02-20 09:42:30 +01:00
Rémi Verschelde bc395c2549
Merge pull request #46221 from akien-mga/doc-sync-classref
doc: Sync classref with current source
2021-02-19 15:06:50 +01:00
Rémi Verschelde 0d1d719178 doc: Sync classref with current source
And fix various bogus bindings following previous PRs.
2021-02-19 14:39:14 +01:00
bruvzg 2d66f364d9
Make FreeType optional for export templates. 2021-02-19 15:01:46 +02:00
Rémi Verschelde 310496a89f
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
Pedro J. Estébanez 8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
Eric M 49714b0963 Removed hardcoded shortcuts from /scene and converted to input actions
This removes hardcoded actions from things like LineEdit and TextEdit.

Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
reduz 64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
Rémi Verschelde 8eaea1db53
Merge pull request #45032 from neikeq/classdb-tests-for-44856
Add ClassDB tests to look for core API deps on editor API
2021-02-18 15:16:52 +01:00
Vignesh1-art a5d931033e
Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded
2021-02-18 11:12:54 +05:30
Rémi Verschelde 99fc96e7b3
Merge pull request #45955 from angad-k/fix-set-joint-i-to-name
fix set_joint_i_to_name to use the provided argument
2021-02-17 13:25:31 +01:00
Angad Kambli f038dd0761 glTF: Fix set_joint_i_to_name not using its argument
Fixes #45371.
2021-02-17 13:08:35 +01:00
Aaron Franke 614299aedb
Add C# array features from core PackedArrays 2021-02-16 15:24:44 -05:00
JestemStefan 2c71ff1119
Added signed_angle_to for Vector3 2021-02-16 05:07:33 -05:00
Rémi Verschelde b196e62709
Merge pull request #46083 from ellenhp/mono_ogg_fix
Fix mono->stereo conversion for oggs
2021-02-16 10:50:10 +01:00
Rémi Verschelde c1dc38679f
Merge pull request #46039 from ellenhp/fix-empty-mp3-crash
Warn and return when attempting to load invalid MP3s
2021-02-16 09:27:42 +01:00
Ellen Poe f993d2eeee Fix mono->stereo conversion for oggs (see #40630) 2021-02-15 20:42:45 -08:00
Ellen Poe 936767deca Fail mp3 loading when attempting to load invalid mp3s
This also adds a warning for unspecified MP3 loading error codes
2021-02-15 10:02:19 -08:00