Commit graph

5251 commits

Author SHA1 Message Date
Rémi Verschelde 82f688ce9b
Merge pull request #48913 from lyuma/gltf_named_binds_dedup
Fix incorrect skin deduplication when using named binds
2021-05-21 11:19:11 +02:00
Lyuma 5a9eee6b1a gltf: Fail gracefully when a mesh instance fails. 2021-05-20 20:28:32 -07:00
Lyuma 60f620411e Fix incorrect skin deduplication when using named binds 2021-05-20 20:26:11 -07:00
Rémi Verschelde 37a417e838
Merge pull request #48904 from fire/gltf-img-failure
When one invalid image fails, it should only fail that single image.
2021-05-21 00:32:48 +02:00
K. S. Ernest (iFire) Lee a81f4dd5a7 When one invalid image fails, it should only fail that single image.
Move to a more graceful degradation 3d asset import model.
2021-05-20 14:30:19 -07:00
Tomasz Chabora b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
Rémi Verschelde 78d85de13b
Merge pull request #48805 from radishes/noise-image-offset
Add support for generating noise images with an offset
2021-05-20 21:00:38 +02:00
Casey Foote 97c8d9f348 Add support for generating noise images with an offset. 2021-05-20 08:20:23 -07:00
Rémi Verschelde 4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Rémi Verschelde 169268ae20
Merge pull request #48657 from Calinou/test-add-gdscript
Add a unit test suite for GDScript
2021-05-19 20:49:03 +02:00
Yuri Roubinsky 7b261d1cb7 Show colored rects for autocompletion of Color constants in functions 2021-05-19 14:40:03 +03:00
Rémi Verschelde 95bb7207f3
Merge pull request #46773 from trollodel/TreeItem+
Improve TreeItem API and allow to move nodes
2021-05-18 10:49:45 +02:00
George Marques cdb3726fe6
Merge pull request #48347 from Blackiris/fix-temporary-key-not-released
GDScript: Fix temporary value not released when used as a dictionary key
2021-05-17 18:50:25 -03:00
trollodel bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
Rémi Verschelde 6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
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
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
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