Commit graph

4252 commits

Author SHA1 Message Date
Johannes Witt 00b70f60bb
Fix CSG Path Polygon cache being removed after connect
fixes #30229

(cherry picked from commit bab36f1273)
2021-04-29 13:07:11 +02:00
Marcel Admiraal d8607d8045
Fix CSGMesh undo not refreshing gizmo
(cherry picked from commit 4311c2f66e)
2021-04-27 13:42:42 +02:00
Marcel Admiraal 84dc716d0d
Fix empty CSGShape error
(cherry picked from commit decdf4fcbc)
2021-04-27 13:42:10 +02:00
Francois Belair 3111910331
Make LSP update the filesystem of changed scripts
This updates global classes and exposes base member variables.
Fixes #39713

(cherry picked from commit b16bb33a5b)
2021-04-26 11:54:01 +02:00
kleonc 9201ffa9a2
Improve some argument names for core types
(cherry picked from commit 4d7f642fb3)
2021-04-26 11:50:31 +02:00
Rémi Verschelde aa84787fb4
lightmapper: Disable build if raycast module can't build
We need to propagate the hacky checks from the raycast config to the
lightmapper config, as the failure of a `can_build()` check is not notified to
other modules (which might even be checked further depending on the processing
order in SConstruct).

A more thorough fix would be to change SConstruct to do two loops on modules:
one to check `can_build()` and disable modules which can't build, then another
one to rechecked `can_build()` with the new lineup and do further config.
But there would be more risk for regressions than with this ad hoc hack.

Similar story for the `platform/x11/detect.py` change... oh my eyes :(

(cherry picked from commit a2c68d9da7)
2021-04-22 19:43:12 +02:00
Rémi Verschelde 66625962bf
embree: Allow building against system library on Linux
(cherry picked from commit b266cc2315)
2021-04-22 18:07:35 +02:00
JFonS 33d6b1f68f
CPU lightmapper environment energy fixes.
* Better handling of the scene's environment energy in the lightmapper
  bakes.
* Fixed a bug where ProceduralSky::get_panorama() returned a reference
  instead of a copy.
* Removed includes to Embree's internal header files.

(cherry picked from commit 2db2d1153d)
2021-04-22 18:07:16 +02:00
Rémi Verschelde b616f41573
fbx: Fix include for zlib that broke unbundling
It's possible to link against system zlib on Linux, so we should use system paths.

(cherry picked from commit 93b7406138)
2021-04-22 17:28:57 +02:00
bruvzg e86d086573
Fix crash on GDNative API json generator exit.
(cherry picked from commit a4423c82f8)
2021-04-22 17:28:25 +02:00
Hugo Locurcio f0d1bedc74
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.

(cherry picked from commit ea46639e22)
2021-04-20 20:16:42 +02:00
Ignacio Roldán Etcheverry 83494c30fe 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:24:00 +02:00
Hugo Locurcio cd4906ee0b
Document secure wss:// caveats for WebSocketClient
See https://github.com/godotengine/godot/issues/37739.

(cherry picked from commit a56e37545b)
2021-04-12 00:23:44 +02:00
Lyuma 5cf5e7e3d3 Fix crash on importing empty .fbx file for 3.x 2021-04-08 02:52:15 -07:00
Rémi Verschelde ed44e2806f
doc: Fix markup issues in classref 2021-04-07 11:52:44 +02:00
Alex Hirsch 6a7ee81610
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

(cherry picked from commit 09bda3f140)
2021-04-07 11:26:19 +02:00
Marcel Admiraal 1e28e234c5
Check for the use of an empty shape in Bullet Kinematic collisions
(cherry picked from commit ff9a6c4e39)
2021-04-06 22:37:35 +02:00
Bastiaan Olij 5228871e26
Only cleanup meta data if GDNative library is reloadable and we're about to unload it
(cherry picked from commit 81131bd844)
2021-04-06 10:03:41 +02:00
Jan Haller f64d9423a5
Fixes #47607 (forgotten statement in GDNative cleanup)
Co-authored-by: geekrelief <geekrelief@gmail.com>
(cherry picked from commit 0fe851da23)
2021-04-05 12:02:56 +02:00
Francois Belair 4e8e887748 Implement LSP didDeleteFiles to clear diagnostics
Fixes #43133
2021-04-01 13:41:53 -04:00
Kyle b38a36923a
Fix gdnative config file set as null
Fixes #45997.

Setting a GDNativeLibrary config file as null or any other object but a ConfigFile will now cause an error.

(cherry picked from commit 618dd892f5)
2021-03-31 21:32:12 +02:00
geekrelief 2bf0b2996a
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>
(cherry picked from commit 58fa4973f6)
2021-03-29 16:26:40 +02:00
Rémi Verschelde acbd1e8b02
Merge pull request #46781 from BastiaanOlij/gdn_set_interface
Add set_interface for access by GDNative
2021-03-26 11:27:27 +01:00
Rémi Verschelde 015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Paul Joannon 596169d7df
class reference proofreading
(cherry picked from commit 8455e901f3)
2021-03-26 09:49:07 +01:00
Bastiaan Olij 717f3227ec ARVR GDNative enhancements:
- add set_interface function
- add access to depth buffer
- add supplying a depth buffer from an ARVR plugin
2021-03-25 22:37:47 +11:00
Francois Belair 7f8fe58825 Make LSP parser aware of variables in sub-blocks
Fixes #43164 and Fixes godotengine/godot-vscode-plugin#207
2021-03-24 16:52:38 -04:00
Rémi Verschelde 92daf26043
SCons: Don't pass -msse2 to MSVC for Embree
This is a flag only supported by GCC/Clang.
2021-03-24 13:13:18 +01:00
Rémi Verschelde 1aba997d75
doc: Sync classref with 3.3 version bump 2021-03-23 13:40:34 +01:00
Alex Hirsch 44855c40da
FBX Import: Normalize rotation quaternions
fix #47174

(cherry picked from commit 72d3bfc88c)
2021-03-23 13:16:09 +01:00
Matthew A. Robinson b4455ffd75 Add mutex protecting script bindings map from getting corrupted 2021-03-22 20:26:44 -04:00
Alex Hirsch 2c93256432
FBX Import: Check bone map access for valid cluster target node id
fix #47184

(cherry picked from commit d03f4cefea)
2021-03-20 23:09:02 +01:00
Rémi Verschelde a0f56b5459
Mono: Fix Android build after #46900
(cherry picked from commit 2274d4eebc)
2021-03-18 17:58:49 +01:00
Ilya Kuznetsov cacf96962d
Added mono_unhandled_exception call to unhandled_exception hook
(cherry picked from commit 6061ff7ba1)
2021-03-17 15:17:02 +01:00
Rémi Verschelde 33628c482f
miniupnpc: Update to version 2.2.2
(cherry picked from commit 69486b1059)
2021-03-17 15:16:59 +01:00
Rémi Verschelde e6b291b152
Mono: Bump Godot.NET.Sdk to 3.3.0
Using only 3.3 results in a build warning.

Follow-up to #47055.
2021-03-17 14:46:26 +01:00
Rémi Verschelde 0341251d0f
Bump version to 3.3-rc
We decided to rename the upcoming 3.2.4 release to 3.3 to better reflect that
it is a significant feature release, and not a maintenance update.

The `3.2` branch was also renamed to `3.x` and will now be the development
branch for future 3.x releases (3.3, 3.4, etc.).
2021-03-16 12:16:36 +01:00
Hugo Locurcio ee8661158c
Document the valid input range for acos() and atan()
(cherry picked from commit d359e159da)
2021-03-16 11:37:26 +01:00
Haoyu Qiu 871843bbdc Fix uninitialized GridMapEditor::node 2021-03-16 10:20:56 +08:00
Fabio Alessandrelli 50f0f51604 [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:
388adac947

One of those PR when the explanation is much longer then code changes
:).
2021-03-15 18:12:05 +01:00
Ev1lbl0w a586f9daae
Replace malloc's with Godot's memalloc macro
(cherry picked from commit 838e7d0a8d)
2021-03-13 22:01:27 +01:00
Ignacio Etcheverry 10c8438178
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.

(cherry picked from commit d9603b2d73)
2021-03-13 21:56:31 +01:00
jfons ab3b7a57f2 Fix visibility toggle for baked GridMaps
(cherry picked from commit 809d88b925)
2021-03-12 13:26:10 +01:00
Rémi Verschelde 3f246ebeed
Merge pull request #46932 from JFonS/fix_lm_capture_env
[3.2] Batch of lightmapper fixes and minor improvements
2021-03-12 12:30:36 +01:00
JFonS e2c28675ef Batch of lightmapper fixes and minor improvements
- Fix objects with no material being considered as fully transparent by the lightmapper.
- Added "environment_min_light" property: gives artistic control over the shadow color.
- Fixed "Custom Color" environment mode, it was ignored before.
- Added "interior" property to BakedLightmapData: controls whether dynamic capture objects receive environment light or not.
- Automatically update dynamic capture objects when the capture data changes (also works for "energy" which used to require object movement to trigger the update).
- Added "use_in_baked_light" property to GridMap: controls whether the GridMap will be included in BakedLightmap bakes.
- Set "flush zero" and "denormal zero" mode for SSE2 instructions in the Embree raycaster. According to Embree docs it should give a performance improvement.
2021-03-12 12:00:53 +01:00
O01eg 18eca32761 Fix visibility for GCC
(cherry picked from commit 1393ededfd)
2021-03-12 10:07:48 +01:00
Rémi Verschelde 0d8182d2b1 NoiseTexture: Fix regression in starting thread
Was a regression from #45618.

Fixes #46907.
2021-03-11 21:58:53 +01:00
Duddino aabb8d78ef 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

(cherry picked from commit c47070e165)
2021-03-07 22:51:06 +01:00
Rémi Verschelde 558d524bcb Mono: Don't use C++17 [[maybe_unused]] to preserve C++14 compatibility
The 3.2 branch compiles against the C++14 standard to keep good compatibility
with somewhat older compilers.

Fixes #45839.
2021-03-05 23:28:09 +01:00
Shane Liesegang 4d06a5c2b0 Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 42eb09ddcc)
2021-03-04 12:21:17 +01:00
Fabian 2aafe2b25e Add set_peer_timeout to NetworkedMultiplayerENet.
(cherry picked from commit 1b54de3039)
2021-03-02 10:26:14 +01:00
Aaron Franke b2d723b039 Add generic support to PackedScene.Instance
(cherry picked from commit 3f50954ced)
2021-03-02 10:26:14 +01:00
Bastiaan Olij 9c296bcb59 Fix duplicate check for bone names in FBX import 2021-03-02 10:55:29 +11:00
Jack Linhart 8190305075 Added GridMap description to get_bake_meshes()
(cherry picked from commit 03fd2b4c86)
2021-02-25 22:37:29 +01:00
Hugo Locurcio b3c01392fd Document seamless noise having a lower contrast than non-seamless noise
See #41787.

(cherry picked from commit 2e8e6e26a8)
2021-02-25 22:37:04 +01:00
Taylor C. Richberger 59b82e1b6a remove invalid codeLensProvider value from lsp
codeLensProvider was false, it may not be a boolean like some of the other providers can, only optionally present.

(cherry picked from commit 91ce8d5fff)
2021-02-25 22:34:56 +01:00
Rémi Verschelde 92d59d0879 SCons: Properly handle overriding default values to bool options
The `dev=yes` and `production=yes` options work as aliases to set a number of
options, while still aiming to allow overriding specific options if the user
wishes so. (E.g. `production=yes use_lto=no` should work to enable production
defaults *but* disable LTO.)

That wasn't working as `ARGUMENTS.get()` returns a string and not a boolean as
expected by `BoolVariable`, and this wasn't flagged as a bug... So added a
helper method using SCons' `BoolVariable._text2bool` to do the conversion
manually.
2021-02-24 10:20:46 +01:00
Rémi Verschelde 6b2cfa416c SCons: Work around compilation issue on Linux ARM64
Fixes #45687.

This is really just a band-aid, our current buildsystem doesn't work well for
cross-compilation and needs a thorough refactoring to do so.
2021-02-23 14:08:45 +01:00
Pedro J. Estébanez 6f4f49c1d5 Make glue generation shutdown more graceful
(cherry picked from commit 23907e6f19)
2021-02-22 21:40:16 +01:00
Angad Kambli 327586f582 fix minor issue in smooth step function's documentation
(cherry picked from commit 892060fa47)
2021-02-22 14:16:42 +01:00
Marcel Admiraal e89ba5fb49 Add missing semicolons to webxr.eterns.js
(cherry picked from commit 92e0a84a4c)
2021-02-22 10:17:23 +01:00
Vignesh1-art 13871deb57 Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded

(cherry picked from commit a5d931033e)
2021-02-18 23:46:54 +01:00
Rémi Verschelde 001aaa7131
Merge pull request #45356 from asmaloney/fix-lightmap-raycaster-compile
[3.2] Fix sign comparison error in lightmap_raycaster.cpp
2021-02-18 21:09:29 +01:00
Pedro J. Estébanez 4485b43a57 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` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 12:23:25 +01:00
Pedro J. Estébanez 6d89f675b1 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez 8f6a636ae7 Modernize Semaphore
- Based on C++11's `mutex` and `condition_variable`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez 4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
JFonS 71d4e47452 Fix missing include in MacOS builds 2021-02-17 11:19:28 +01:00
Ellen Poe fc0419d84a
Fix mono->stereo conversion for oggs (see #40630)
(cherry picked from commit f993d2eeee)
2021-02-16 14:27:40 +01:00
Ellen Poe 5db83defcd
Fail mp3 loading when attempting to load invalid mp3s
This also adds a warning for unspecified MP3 loading error codes

(cherry picked from commit 936767deca)
2021-02-16 14:27:40 +01:00
Rafał Mikrut 54b6a7b8b7
Fix memory leak in Xatlas module
(cherry picked from commit e57b8d79ec)
2021-02-16 14:27:38 +01:00
Bastiaan Olij 8aa022f99c
Only unload the library when no NativeScript objects exist if the reloadable flag is true. If it is false it is likely the library does other things and can't be unloaded
(cherry picked from commit ae7675065a)
2021-02-16 14:27:38 +01:00
JFonS 56bf256d76 Add options to reduce lightmaps disk usage.
Added BakedLightmap.use_hdr and BakedLightmap.use_color properties
that can reduce the flie size of lightmap texture at the expense of quality.

Changed the denoiser to work in a single buffer, reducing RAM
usage. Also added the `-mstackrealign` flag in the denoiser compilation
for MinGW builds. This flag helped fix a bug in Embree, so I want to see
if it will help fix GH #45296.
2021-02-16 13:20:27 +01:00
JFonS 7241139356 Backport EXR compression support from master 2021-02-15 12:51:55 +01:00
Meriipu 347a9df0a1
GDScript: Clarified/fixed inaccuracies in the built-in function docs.
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.

Clarified what it means to be approximately equal.

nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.

Added a few examples/clarifications/edge-cases.

(cherry picked from commit 7f9bfee0ac)
2021-02-11 13:12:06 +01:00
Gordon MacPherson 53aee600d3 fixed bug in vertex duplication breaking meshes 2021-02-09 16:33:46 +00:00
Kanabenki 3abe6ae281
Snap VisualScript comment to grid when resizing
(cherry picked from commit 07fb7f9888)
2021-02-08 22:36:36 +01:00
Rémi Verschelde f36c529ad0
Merge pull request #45752 from JFonS/cpu_lightmapper_fixes
Assorted CPU lightmapper fixes
2021-02-06 11:44:52 +01:00
JFonS 27c1e65969 Assorted CPU lightmapper fixes
- Fix crash when a ray hits a texel with a UV2 coordinate exactly
  equal to 1.0.
- Take BakedLightmap extents into account.
- Clear capture data between bakes.
- Fix minor issues with seam correction.
2021-02-05 19:18:19 +01:00
Hugo Locurcio 4a74f6f3b7 Document that GridMap doesn't support visual layers or cull masks
See #40245.

(cherry picked from commit 95fda7e881)
2021-02-05 10:26:03 +01:00
bruvzg 9e4cecc8ea [Mono] Use the same search logic for both MSBuild and dotnet, add custom search paths on macOS.
(cherry picked from commit e304f716c7)
2021-02-05 09:29:29 +01:00
Rémi Verschelde f42f6ed01c
Merge pull request #45702 from hpvb/fix-tga-crash-32
[3.2] Fix a crash in the TGA loader with malformed input
2021-02-04 14:47:37 +01:00
Hein-Pieter van Braam-Stewart 113b5ab1c4 Fix a crash in the TGA loader with malformed input 2021-02-04 13:10:03 +01:00
zaevi f94dffd2de
Fix C# string.Hash()
(cherry picked from commit baac70c27e)
2021-02-02 13:30:54 +01:00
David Snopek 0eb6dfa04a
Remove reference to CanvasLayer in WebXR example, because it can cause rendering issues in AR.
(cherry picked from commit f6e8da3661)
2021-02-02 13:02:46 +01:00
Ivan Shakhov 7ecc2561cd
Fix off by one error navigating to line number in Rider
Fixes https://github.com/JetBrains/godot-support/issues/61

(cherry picked from commit deef9a73a5)
2021-02-02 13:02:46 +01:00
Rémi Verschelde 07f169af72
Merge pull request #45353 from asmaloney/fix-lightmapper_cpu-compile-error
[3.2] Fix undeclared identifier error (rand) in lightmapper_cpu
2021-02-02 12:35:42 +01:00
Hugo Locurcio 351efc334e
Fix WebXRInterface code sample in the class reference
This also fixes the code sample's indentation to look correct in the
editor help.
2021-01-31 00:00:25 +01:00
Aaron Franke 226528097e
[3.2] Backport hex_to_int/bin_to_int zero check and C# changes 2021-01-28 09:24:44 -05:00
David Snopek 5625dc502c Prevent fatal error in WebXR when 'immersize-ar' loses and regains tracking 2021-01-27 20:22:40 -06:00
Rémi Verschelde 9ba95970ad
Merge pull request #45445 from dsnopek/webxr-mono
[3.2] Support mono devices in WebXR
2021-01-27 21:11:56 +01:00
geekrelief 311ca0c6f2
Removes the gdnative library when no script (gdns) references it any longer. This enables hot reload for gdnative.
(cherry picked from commit cc5d8bb5ad)
2021-01-26 22:10:29 +01:00
Ignacio Etcheverry 44d8669364
C#: Fix System.Collections.Generic.List marshalling
(cherry picked from commit da90364adf)
2021-01-26 17:00:17 +01:00
Rémi Verschelde 9f2c24e8ce
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.

(cherry picked from commit 76c6007aa6)
2021-01-26 17:00:15 +01:00
Rémi Verschelde 21746ce714
Merge pull request #45347 from lucasvanmol/patch-1
[3.2] Fix highlight color for class attributes that are also keywords
2021-01-26 15:56:29 +01:00
Rémi Verschelde 061f87e064
Merge pull request #45336 from naithar/feature/plugins-migration-3.2
[3.2] [iOS] iOS Plugins Migration
2021-01-26 15:06:46 +01:00
Yuri Sizov a9552cefa2 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:34 +03:00
David Snopek dca9f09386 Support mono devices in WebXR 2021-01-25 08:36:29 -06:00
Andy Maloney 95cc19d320 Fix sign comparison error in lightmap_raycaster.cpp
Compiling with latest clang on macOS produces this error:

comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]

This file is not present in 4.0/master.
2021-01-21 16:07:25 -05:00
Andy Maloney 85377e96d2 Fix undeclared identifier error in lightmapper_cpu.cpp
Compiling with latest clang on macOS produced this error: use of undeclared identifier 'rand'.

Fixes godotengine/godot#45342

This file is not present in 4.0/master.
2021-01-21 13:07:30 -05:00