Commit graph

4058 commits

Author SHA1 Message Date
Andrii Doroshenko (Xrayez)
1a71792655
Cross-reference GDScript load and ResourceLoader.load in classref
The GDScript `load` mention is moved from the class `ResourceLoader`
description to the `ResourceLoader.load` method description instead,
where it is more likely to be found.

(cherry picked from commit a8404cf56c)
2020-10-04 20:51:40 +02:00
Paulb23
2ef8aba8e9 Fix gdscript multiline string nested highlighting 2020-10-03 16:16:34 +01:00
Sergey Minakov
3386fac02c iOS: fix deprecations
Change deprecated method calls to new ones.
Guard iOS version dependant functionality behind availability checks.
2020-10-01 18:09:55 +03:00
Eduardo Rodrigues
f14e569ab3
Fix error message when exporting a write-only property without a setter
(cherry picked from commit aca0cede67)
2020-10-01 16:00:43 +02:00
Rémi Verschelde
8d36b7206c
Merge pull request #42460 from ThakeeNathees/signal-lines-marked-safe
[3.2] GDScript signal lines marked as safe
2020-10-01 14:18:22 +02:00
Rémi Verschelde
b83f9d47a0
Merge pull request #41830 from RandomShaper/fix_40353_3.2
Avoid warning about harmless unfulfilled yields (3.2)
2020-10-01 14:17:56 +02:00
Rémi Verschelde
3961f50176
Merge pull request #40461 from nekomatata/script-editor-init-optimization-3.2
[3.2] Optimized ScriptEditor initialization when many scripts are loaded
2020-10-01 13:58:01 +02:00
Rémi Verschelde
0a26217579
Merge pull request #41200 from madmiraal/fix-38001-3.2
[3.2] Mark the first shape as inside, not the second shape, when CSG shapes are co-planer.
2020-10-01 13:50:19 +02:00
Thakee Nathees
a69c3cace2 GDScript signal lines marked as safe
Fix: #33927
2020-10-01 17:01:11 +05:30
Rémi Verschelde
aaf0b32e91
doc: Sync classref with current source 2020-09-29 13:57:58 +02:00
Pedro J. Estébanez
d56112005f
Avoid infinite loop in GDScript at shutdown
(cherry picked from commit de4e54dd91)
2020-09-29 13:57:55 +02:00
Hugo Locurcio
7b3f9ebb94
Enable the copy_mono_root SCons option by default
This closes #41652.

(cherry picked from commit cfd564b385)
2020-09-29 13:57:55 +02:00
Hugo Locurcio
880ab559ec
Improve documentation related to printing error/warning messages
(cherry picked from commit 50f3a8e312)
2020-09-29 08:54:45 +02:00
Francois Belair
d0eedd4c23
Make LSP ignore $/ messages
Fixes #38814

(cherry picked from commit 9c273307d8)
2020-09-29 08:54:44 +02:00
Rémi Verschelde
8ca9680b13
Merge pull request #38076 from DrMoriarty/fix_pvrtc
iOS: Fix multiple issues with PVRTC import, disable ETC1
2020-09-28 10:17:22 +02:00
Pedro J. Estébanez
4cab6452d9 Fix GDScript leak avoidance
Modify usage of types so that the `Ref` created from `base_type.script_type` doesn't involve converting first to `Variant`, which will use the constructor for `Object *`, as if the argument wasn't a `Reference`, and therefore will convert back to null.
2020-09-25 01:41:31 +02:00
Hugo Locurcio
92a85b4445
Improve documentation about VideoPlayer video formats
This closes https://github.com/godotengine/godot-docs/issues/4021.

(cherry picked from commit 1efe57848a)
2020-09-24 14:43:11 +02:00
Stephan Dilly
11426cb0f7
add iOS Simulator platform
without this we have to manually drop a `x86_64` builds of gdnative libs into the Xcode project to allow running in `iOS Simulator`

(cherry picked from commit f49199bcc3)
2020-09-24 14:43:10 +02:00
Aaron Franke
ea3bbbe0f2
Add concatenation support and a new ctor to Godot.Collections.Array
(cherry picked from commit a4dcd48d16)
2020-09-24 14:43:10 +02:00
Ricardo Alcantara
197b375b89
Basis RotationQuat should be public.
(cherry picked from commit a676b8ea66)
2020-09-24 14:43:08 +02:00
Aaron Franke
1dcbcaaa0d
Change inequality comparison operators to use exact equality
(cherry picked from commit d0a1399a1b)
2020-09-24 14:43:08 +02:00
Zae
e5b357cfb1
Fix C# string.IsAbsPath()
(cherry picked from commit b5eea5cfd4)
2020-09-24 14:43:08 +02:00
Raul Santos
cf45fa7f36
Fix ExprMatch stackoverflow
(cherry picked from commit d425cf6fed)
2020-09-24 14:43:07 +02:00
Marcel Admiraal
a9b5dc56a6
Check and correct for zero scaling when unscaling Bullet basis.
(cherry picked from commit 4b14916288)
2020-09-24 14:43:06 +02:00
Marcel Admiraal
808865af97
Don't attempt to insert points into degenerate triangles.
Use a simpler degenerate triangle check that calculates area.

(cherry picked from commit 3521239d96)
2020-09-24 14:43:05 +02:00
hoontee
aa0221f0fb
Transform CSGShape collision when necessary
(cherry picked from commit fc8574fbac)
2020-09-24 14:43:05 +02:00
hoontee
8ce88d38f2
Properly handle empty CSGCombiners
(cherry picked from commit 001b6075cb)
2020-09-24 14:43:05 +02:00
Rémi Verschelde
bca2633f93
Merge pull request #41931 from RandomShaper/fix_gdscript_leaks_3.2
Fix leaks in GDScript (3.2)
2020-09-24 08:33:04 +02:00
Vasiliy Makarov
f388ea00bf iOS: Fix multiple issues with PVRTC import, disable ETC1
Fixes: #28683, #28621, #28596 and maybe others

For iOS we enable pvrtc feature by default for both GLES2/GLES3
Etc1 for iOS doesn't have any sense, so it disabled.
Fixed checks in export editor.
Fixed pvrtc ability detection in GLES2 driver.
Fixed pvrtc encoding procedure.
2020-09-23 11:13:50 +02:00
Rémi Verschelde
26512dda93
Merge pull request #42170 from Razoric480/fix-vscript-value-by-type-32
Add a VScript func to sanitize variant values (3.2)
2020-09-23 09:35:22 +02:00
Francois Belair
d35ced06a6 Add a VScript func to sanitize variant values
Backported to 3.2
2020-09-18 11:28:58 -04:00
Rémi Verschelde
c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
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
```
2020-09-18 14:09:51 +02:00
Marcel Admiraal
fc72c3fdf5 Remove the unnecessary sync() and the restrictions it imposes on 3D Physics. 2020-09-18 10:42:59 +01:00
Fabio Alessandrelli
f1b2a7d1b4
Fix certificate generation with mbedtls 2.16.8 .
When generating certificates with
`Crypto.generate_self_signed_certificate` we generate the PEM in a
buffer via `mbedtls_x509write_crt_pem`.

Since version 2.16.8, mbedtls adds spurious data at the end of the
buffer due to internal optimizations, this breaks our logic when we try
to immediately parse it and return a proper `X509Certificate` object.

This commit updates the code to find the actual PEM length to parse
using `strlen`, takes extra caution always adding the terminator to the
buffer, and slightly improve error messages.

(cherry picked from commit 60687ce778)
2020-09-15 19:27:48 +02:00
Danil Alexeev
06f3cd8bd8
Several documentation improvements
(cherry picked from commit a4c5790350)
2020-09-15 19:26:40 +02:00
Marcel Admiraal
edc4820430 Fix RigidBodyBullet areasWhereIam element shift. 2020-09-14 18:26:19 +01:00
Tom Daffin
46b4e82f92
Add mono log message to error for fatal errors
(cherry picked from commit c15fb42d45)
2020-09-14 12:07:12 +02:00
Ignacio Etcheverry
cdc9fe154f
C#: Fix csproj not synced on file move/removal from FS dock
When NormalizePath was called with an absolute
path (with drive letter) on Windows, it would
prepend a file path separator to the path, e.g.:
'\C:\Program Files\'.
Apparently this was still accepted as a valid
path by DotNetGlob and it stopped working when
we switched to MSBuildGlob.

(cherry picked from commit 1db0395950)
2020-09-13 12:35:34 +02:00
Rémi Verschelde
36fa6369fc
stb_vorbis: Increase max alloc buffer size for big Vorbis comments
The previous max worked OK for audio data, but stb_vorbis recently gained support
for Vorbis comments, which can embed up to 2^32-1 bytes of data (e.g. cover art
encoded as base64).

We use 2^30 as max which should be sufficient for most files.

Fixes #41913.

(cherry picked from commit d16f5a57c1)
2020-09-10 12:04:19 +02:00
Pedro J. Estébanez
8e64969184 Ensure cyclic dependencies between scripts are broken at exit 2020-09-09 14:57:34 +02:00
Pedro J. Estébanez
a0969662cd Prevent cyclic reference between script and its members 2020-09-09 13:51:53 +02:00
Ignacio Etcheverry
8c5ed68847
C#: Use BOM when creating a solution
At least on Windows there seems to be issues if
the solution has no BOM and contains a project
with cyrillic chars.

(cherry picked from commit 1c74fa4242)
2020-09-08 22:02:24 +02:00
Ignacio Etcheverry
e72ee23c43 [3.2] C#: Fix endless reload loop if project has unicode chars
The assembly modified time wasn't picked properly
as the path was treated as latin-1, so the file
watcher was constantly firing the event.
2020-09-08 19:47:47 +02:00
PouleyKetchoupp
43b49607bb
Fix TURN server example in WebRTC documentation
WebRTC GDNative plugin uses `credential` and not `credentials`.
74f2c78db5/src/WebRTCLibPeerConnection.cpp (L35-L37)

(cherry picked from commit 280496a2c3)
2020-09-08 13:39:18 +02:00
Pedro J. Estébanez
51844febee Avoid warning about harmless unfulfilled yields 2020-09-06 22:26:16 +02:00
Alex de la Mare
6474e036ac [3.2] Handle csproj "Remove" globs
MSBuild Item returns empty strings if an attribute isn't set (which
 caused an IndexOutOfRangeException in NormalizePath).

 We were treating Excludes incorrectly, Remove directives provide the
 intended behaviour in the auto-including csproj format.
2020-09-06 12:10:54 +10:00
Marcel Admiraal
c6cccdf0c6 Ensure header guards enclose entire header.
(cherry picked from commit f6ad1954f7)
2020-09-04 08:48:35 +02:00
Ignacio Etcheverry
9699e83e1e Fix parsing of C# files with spaces in the path
(cherry picked from commit 9e8a5e4b5a)
2020-09-04 08:24:17 +02:00
Rémi Verschelde
9efd555c58
Merge pull request #41754 from neikeq/3.2-csharp-hide-build-button-if-no-proj
[3.2] C#: Hide Build button if there's no solution to build
2020-09-04 08:20:06 +02:00
Rémi Verschelde
93eb9b554e
Merge pull request #41752 from neikeq/fix-invalidopexception-csproj-migration
[3.2] Fix InvalidOperationException when migrating from 3.2.1 or older csproj
2020-09-04 08:19:18 +02:00
Rémi Verschelde
1edd6aa404
Merge pull request #41751 from neikeq/3.2-issue-41745
[3.2] C#: Fix Godot failing to find class namespace
2020-09-04 08:16:30 +02:00
Ignacio Etcheverry
2bb251f628 [3.2] C#: Hide Build button if there's no solution to build
Same as we do with the bottom panel. Mainly to
avoid bothering if the project is not using C#.
2020-09-04 02:18:42 +02:00
Ignacio Etcheverry
f8e3a74f9e Fix InvalidOperationException when migrating from 3.2.1 or older csproj 2020-09-04 01:49:32 +02:00
Ignacio Etcheverry
b3762622be [3.2] C#: Fix Godot failing to find class namespace
Also avoid searching C# files recursively twice.
2020-09-04 01:31:38 +02:00
Ignacio Etcheverry
bd18b2ff6a [3.2] Fix 'Parameter "assembly" is null' error
This error was normally being printed when
trying to open the project assembly while
the project was not yet built.
The error should not be printed. It's the job
of this method's caller to decide whether to
print an error or not if loading failed.
2020-09-04 01:09:35 +02:00
Ignacio Etcheverry
939ed5dd5b C#: Fix Windows detection for copying MSBuild stub
Previous condition checked only the host
platform. This was a problem as our official
builds are from Linux.

(cherry picked from commit 206501a45e)
2020-09-03 09:35:41 +02:00
Hugo Locurcio
cc3b69cf7b
Reference the online documentation in collision layer/mask properties
See https://github.com/godotengine/godot-docs/pull/3863.

(cherry picked from commit c73c327bab)
2020-08-31 15:55:11 +02:00
Hugo Locurcio
afef89014b
Cross-reference GDScript built-in rounding methods to ease discovery
This closes #19315.

(cherry picked from commit 20d0f5bbd7)
2020-08-31 15:29:42 +02:00
Thaina Yu
cadd39d415
Mono: Improve MSBuildFinder logic on Windows
Support detecting both 32-bit and 64-bit installations of `vswhere.exe`.

(cherry picked from commit 5dc3900727)
2020-08-31 15:29:41 +02:00
Ignacio Etcheverry
789d7fac8a C#: Fix crash on export when incorrectly freeing MonoAssemblyName 2020-08-30 02:01:38 +02:00
Ignacio Etcheverry
a8e1a0f0bc
C#: Fix 'Parameter toolsPath cannot be null' error
(cherry picked from commit 2bd6252e92)
2020-08-25 14:36:40 +02:00
Thakee Nathees
d04d329a1f autocompletion inside comments bug fixed
Fix: #41438
2020-08-23 23:01:54 +05:30
Ignacio Etcheverry
f3ed06cfd7
Mono/C#: Fix editor using wrong project assembly path in rare cases
We were removing invalid path characters from the
name in C++ code, but the C# editor code wasn't.

(cherry picked from commit 8bb48ae57a)
2020-08-21 02:28:18 +02:00
Ignacio Etcheverry
eb30c04c4d
C#: Save newly created csproj files without BOM
(cherry picked from commit b5f6285f34)
2020-08-21 02:28:18 +02:00
Ignacio Etcheverry
a7bd28760e
C#: Fix null exception in our MSBuild logger
(cherry picked from commit 7eed8c5a0c)
2020-08-21 02:28:18 +02:00
Ignacio Etcheverry
c8845291c3
C#: Fix editor unable to play game after IDE PlayRequest
The editor wasn't clearing the debugger agent
settings properly after a processing a play
request from an IDE. This caused consequent play
attempts to fail if not launched from the IDE,
as the game would still attempt and fail to
connect to the debugger.

The concrete cause: Forgetting to clear the
`GODOT_MONO_DEBUGGER_AGENT` environment variable.

(cherry picked from commit 6e7da72648)
2020-08-21 02:28:18 +02:00
Hugo Locurcio
f90931c47a
Add more error explanations in the BMP image loader
This closes #32166 and closes #30629.

(cherry picked from commit 40485e2479)
2020-08-21 02:28:17 +02:00
Ignacio Etcheverry
c3954441f3 3.2 New csproj style with backport of Godot.NET.Sdk
This is a cherry-pick of
ced77b1e9b
with several 3.2 specific alterations.

There are a lot of build issues coming from
old style projects. At this point fixing every
single one of those would require adding patch
after patch to the project file, which is a
considerable amount work and makes the csproj
even more bloated than it already is.

As such I decided this effort would be better
spent back-porting the Sdk style support that's
already available in 4.0-dev to the 3.2 branch.

This will prevent many issues, but it will also
introduce other benefits, among them:

- While target framework stays as .NET Framework
  v4.7.2, it can be changed to .NET Standard 2.0
  or greater if desired.
- It makes it much easier to add future patches.
  They are added to Godot.NET.Sdk and the only
  change required in Godot code is to update the
  Sdk version to use.
- Default Godot define constants are also
  backported, which fixes IDE issues with the
  preprocessor.

There are a few differences in the changes
applied during patching of the csproj compared
to 4.0 with the purpose of preventing breaking
builds:

- 'TargetFramework' stays net472 both for new
  projects and when importing old ones. It can
  be manually changed to netstandard 2.0+ if
  desired though.

The following features are enabled by default for
new projects. Enabling them in imported projects
may result in errors that must be fixed manually:

- 'EnableDefaultCompileItems' is disabled as it
  can result in undesired C# source files being
  included. Existing include items are kept.
  As long as 'EnableDefaultCompileItems' remains
  disabled, Godot will continue taking care of
  adding and removing C# files to the csproj.
- 'GenerateAssemblyInfo' is disabled as it
  guarantees a build error because of conflicts
  between the existing 'AssemblyInfo.cs' and the
  auto-generated one.
- 'Deterministic' is disabled because it doesn't
  like wildcards in the assembly version (1.0.*)
  that was in the old 'AssemblyInfo.cs'.

Of importance:

This is a breaking change. A great effort was
put in avoiding build errors after upgrading a
project, but there may still be exceptions.

This also breaks forward compatibility. Projects
opened with Godot 3.2.3 won't work out of the box
with older Godot versions. This was already the
case with changes introduced in 3.2.2.

Albeit C# support in 3.2.x was still labeled as
alpha, we've been trying to treat it as stable
for some time. Still the amount of problems this
change solves justifies it, but no more changes
that break project compatibility are to be
introduced from now on (at least for 3.x).
2020-08-20 21:48:59 +02:00
Ignacio Etcheverry
4d7b7d9b73 3.2 C#: Upgrade GodotTools to nuget Microsoft.Build
This upgrade is needed in order to support
reading and editing project files that use Sdks
as well as other new features. A common example
in 3.2 is having to specify a PackageReference
version with a child element rather than the
attribute. This is no longer the case now.

Partial cherry-pick of f3bcd5f8dd
Most of the other changes from that commit were already partially
cherry-picked in 3928fe200f.
2020-08-20 21:45:34 +02:00
Ignacio Etcheverry
e1f17a0b35 3.2 C#/Mono: Check assembly version when loading
Not sure if we should check revision too, but this is good enough for what we want.
This will be needed to load the correct Microsoft.Build when we switch to the nuget version.

Manual cherry-pick of af4acb5b11 (relevant parts)
2020-08-20 21:38:33 +02:00
Thakee Nathees
d53f5b55ec Auto completion enhanced for extends and class level identifier 2020-08-17 12:54:01 +05:30
Marcel Admiraal
557dce8e72 Mark the first shape as inside, not the second shape, when CSG shapes are
co-planer.
2020-08-12 07:28:33 +01:00
Rémi Verschelde
efbeafd08c
Merge pull request #41041 from qarmin/leak_bullet_shape
[3.2] Fixes leak when creating bullet shape
2020-08-10 19:47:08 +02:00
Francois Belair
e3f16a83dc Fix line num of enums reported as the line before 2020-08-08 11:52:25 -04:00
Rafał Mikrut
808615ec3e Fixes leak when creating bullet shape 2020-08-05 10:08:05 +02:00
Hugo Locurcio
fc7451204e Improve JSON-related documentation
This closes https://github.com/godotengine/godot-docs/issues/3848.

(cherry picked from commit 930e10ffff)
2020-07-31 13:09:21 +02:00
Marcel Admiraal
c8d8134288 Ensure CSG parent's _make_dirty() is called when entering a tree.
(cherry picked from commit 9be7b30f35)
2020-07-30 22:45:17 +02:00
Rémi Verschelde
6d2f8dd827 doc: Sync classref with current source 2020-07-30 16:26:45 +02:00
Fabio Alessandrelli
e36c100365 Fix crash in ENet changing refuse_new_connections
When the host is not started.

(cherry picked from commit e5f3159a23)
2020-07-29 18:24:12 +02:00
Hugo Locurcio
4a0568b609 Document how to perform advanced string splitting using RegEx
This closes https://github.com/godotengine/godot-docs/issues/3607.

(cherry picked from commit 5f2b6bd476)
2020-07-29 18:24:00 +02:00
Rémi Verschelde
10544f1cf7 Revert "Move Bullet physics query flush from Bullet space pre-tick callback to"
This reverts commit e7d8464f87.

Fixes #40508 regression.

This will be re-applied and the regression fixed for a future 3.2.x release.
2020-07-28 11:42:04 +02:00
Nhiqill
8d5dab5a05 Pop from front to avoid infinite loop with nested classes
(cherry picked from commit 42d1b4f389)
2020-07-28 00:57:27 +02:00
Marcel Admiraal
5692bb4c81 Ensure Bullet HeightMapShape3D data width and depth are at least 2.
(cherry picked from commit 236857c92a)
2020-07-28 00:42:32 +02:00
Rémi Verschelde
400a780050 Revert "Allow Area2D and 3D mouse events without a collision layer"
This reverts commit 15850687a8.
2020-07-27 22:46:04 +02:00
Rémi Verschelde
b40f3f9740 Style: Sync other changes from new fix_style.sh and clang_format.sh 2020-07-24 10:39:18 +02:00
mega-bit
93f297e1d5 Fix typos in GodotSharp code docs
(cherry picked from commit 0ca96ae2c1)
2020-07-24 10:31:57 +02:00
Ignacio Etcheverry
accc30e5e0 C#: Fix restore not called when building game projects
(cherry picked from commit 4a30289eee)
2020-07-24 10:31:57 +02:00
Aaron Franke
e10a1e078f
[3.2] Add C# XML documentation to core C# math types 2020-07-21 21:22:54 -04:00
Aaron Franke
3ab5183ffa
[3.2] Backport core documentation changes to 3.2
Also add AABB.abs()
2020-07-21 21:22:54 -04:00
Andy Maloney
502a3d580f Remove override keyword from csharp_script.h to fix build errors
Fixes godotengine/godot#40572
2020-07-21 13:17:58 -04:00
Marcel Admiraal
98aabe111f Use difference in position to check whether motion in Bullet is too close
to zero.
2020-07-18 13:20:19 +01:00
PouleyKetchoupp
e3765e97de Optimized ScriptEditor initialization when many scripts are loaded
This change avoids the editor to freeze for several seconds when a
project with lots of scripts is loaded in the editor.

It focuses on a few heavy operations previously executed on all
previously loaded scripts:
- Initialize script resource (script validation/parsing) only
on focus
- ScriptTextEditor: code editor and edit menu are added to the
scene only on focus
- Add to recent scripts only when opening new scripts
(load/save scene metadata)
2020-07-17 09:42:11 +02:00
Emmanuel Leblond
f031e72395 Add missing has_default_value field for signals in api.json
(cherry picked from commit 37de4982ca)
2020-07-15 12:48:18 +02:00
Emmanuel Leblond
8bc44c868e Correct is_reference attribute in api.json for Reference class
(cherry picked from commit b5c80088ce)
2020-07-15 12:48:18 +02:00
Fabio Alessandrelli
18eddfc98d Funnel refuse_new_connections to Godot ENet.
(cherry picked from commit 7ec5c917d1)
2020-07-15 12:48:18 +02:00
Ryan Roden-Corrent
4677502d7c Include gdscript warning name in LSP message.
My initial attempt changed this in the gdscript code, which resulted in
a duplicate warning name in the builtin editor. We should just append
the warning name in the LSP instead.

This uses parens to match what is shown in the builtin editor.

(cherry picked from commit 8dcc39ec91)
2020-07-15 12:15:16 +02:00
Ryan Roden-Corrent
f7b994aef8 Revert "Include gdscript warning name in the warning message."
This reverts commit de3ad3b30e.

(cherry picked from commit d92fa3b547)
2020-07-15 12:15:12 +02:00
volzhs
cfda32add0 Fix overlappingObjects vector crash
use clear_overlaps() instead of clearing overlappingObjects directly

(cherry picked from commit 4e987f5ab9)
2020-07-15 12:11:31 +02:00
Rémi Verschelde
717d4cbb73
Merge pull request #40309 from madmiraal/fix-40283-3.2
[3.2] Set isScratchedSpaceOverrideModificator to false when removing a RigidBodyBullet from a space.
2020-07-13 18:00:12 +02:00
Hugo Locurcio
c88696cdb8 Improve the ENet channels documentation in NetworkedMultiplayerENet
This closes https://github.com/godotengine/godot-docs/issues/3598.

(cherry picked from commit c9b6833d00)
2020-07-13 15:15:09 +02:00
Marcel Admiraal
a3246a5ebe Set isScratchedSpaceOverrideModificator to false when removing a
RigidBodyBullet from a space.
2020-07-12 07:53:32 +01:00
Tomasz Chabora
15850687a8 Allow Area2D and 3D mouse events without a collision layer
Co-authored-by:    Tomasz Chabora <kobewi4e@gmail.com>
2020-07-11 11:14:12 +01:00
Marcel Admiraal
e7d8464f87 Move Bullet physics query flush from Bullet space pre-tick callback to
Bullet physics flush_queries() as is done in Godot physics, and remove
the pre-tick callback.
2020-07-08 11:42:29 +01:00
Marcel Admiraal
d0fb6d6971 Clear a Bullet Area's overlappingObjects vector when removing an area
from a space.

(cherry picked from commit a615d359e8)
2020-07-06 19:17:11 +02:00
Ryan Roden-Corrent
a8d4ca0e1b Include gdscript warning name in the warning message.
Occasionally you want to ignore a warning with a `warning-ignore`
comment, and you have to go into the settings to look up what the
actual name of the warning is. This patch appends the warning name to
the end of the warning so you know what string to use to ignore it,
similar to other linters like pylint.

For example

```
"The signal 'blah' is declared but never emitted.";
```

is now

```
"The signal 'blah' is declared but never emitted. (UNUSED_SIGNAL)";
```

(cherry picked from commit de3ad3b30e)
2020-07-06 16:51:17 +02:00
Thakee Nathees
9ce1fe59ea Fix: editor crash on super constructor called
Fix: #39909
(cherry picked from commit 023b3f2786)
2020-07-06 16:47:44 +02:00
endlesstravel
13d4813ddf fix crash when pass null in print array in GD.print
fix crash when pass null in print array in GD.print 2

fix crash when pass null in print array in GD.print 3

fix space

(cherry picked from commit d2461bad63)
2020-07-03 15:38:07 +02:00
Paul Herman
850f07a4d9 Expose loading TGA images in Image.
(cherry picked from commit 7d4b3e6587)
2020-07-03 13:17:57 +02:00
Rémi Verschelde
24f527b561
Merge pull request #39996 from naithar/feature/ios-gdnative
[3.2] Add support of iOS's dynamic libraries to GDNative
2020-07-03 07:48:45 +02:00
Rémi Verschelde
44a516986d
Merge pull request #39084 from madmiraal/backport-37314
[3.2] Better damping implementation for Bullet rigid bodies
2020-07-02 13:26:03 +02:00
Sergey Minakov
0e2bc779ed GDNative export: do not add fake lookup table if static lib is not used 2020-07-02 12:47:58 +03:00
Sergey Minakov
8fff25df09 GDNative Editor: Support selecting frameworks for iOS 2020-07-02 12:47:20 +03:00
Sergey Minakov
6001e10054 GDNative: support dynamic loading of iOS frameworks 2020-07-02 12:38:51 +03:00
Rémi Verschelde
3247ac4b0e
Merge pull request #39981 from madmiraal/fix-39919-3.2
[3.2] Fix CSG Visual Bug.
2020-07-01 08:48:09 +02:00
Marcel Admiraal
22ff17793c Use is_equal_approx() instead of vertex_snap when checking if ray is
colliding with equiplanar CSG faces.
2020-06-29 19:48:47 +01:00
Marcel Admiraal
8e120230a1 Create degenerate triangles when inserting an edge into a CSG face.
They will be deleted when the faces are merged, but their edges are
needed for merging faces.
2020-06-29 16:40:53 +01:00
Rémi Verschelde
b833296cbb
Merge pull request #39943 from bruvzg/macos_apple_silicon_3
[macOS, 3.2] Add support for the Apple Silicon (ARM64) build target.
2020-06-29 15:30:03 +02:00
bruvzg
43888ebfaf
[macOS, 3.2] Add support for the Apple Silicon (ARM64) build target. 2020-06-29 14:43:29 +03:00
Tomasz Chabora
5b7eb3fd3f Improve the preload and load descriptions
(cherry picked from commit 13298ed873)
2020-06-29 10:58:25 +02:00
Mark Kuo
cb9bc18102 VideoStreamGDNative: close file in cleanup
We should close the file handle when we are done.

(cherry picked from commit 3b05d2c989)
2020-06-29 10:57:59 +02:00
Rémi Verschelde
34c5133e6a
Merge pull request #39604 from Faless/js/3months_backport
[HTML5 - 3.2] Backport most changes/improvement in master.
2020-06-26 20:50:58 +02:00
Rémi Verschelde
d6ff55f30b
Merge pull request #39784 from neikeq/3.2-visualstudio-support
[3.2] C#: Add Visual Studio support
2020-06-26 20:49:35 +02:00
Ignacio Etcheverry
c682410379 Mono/C#: Fix unhandled exception not being printed
For some reason `mono_unhandled_exception` is not
printing the exception as its comment claims.
Use `mono_print_unhandled_exception` instead.

(cherry picked from commit f87ae395ee)
2020-06-26 08:10:24 +02:00
Rémi Verschelde
c8586d3837
Merge pull request #39840 from neikeq/3.2-use-/restore-instead-of-/t-restore
[3.2] Mono/C#: Use /restore instead of /t:restore when building
2020-06-26 08:08:40 +02:00
Ignacio Etcheverry
abc453f9b6 [3.2] Mono/C#: Use /restore instead of /t:restore when building
Documentation recommends not to use /t:restore
together with other targets (like /t:build),
as it messes with the environment.
2020-06-25 23:57:44 +02:00
Ignacio Etcheverry
7af6a4cc50 [3.2] Fix DebugPlay request handler ignoring BuildBeforePlaying
This must have been missed when backporting the new protocol to 3.2.
2020-06-25 21:20:44 +02:00
Rémi Verschelde
8f28e0861f
Merge pull request #39762 from naithar/feature/ios-modules
Enable iOS modules and fix missing symbols errors (3.2)
2020-06-24 22:50:05 +02:00
Ignacio Etcheverry
d0f365fe0f [3.2] C#: Fix completion request with case insensitive resource path
Sometimes Visual Studio documents have the root path all in upper case.
Since Godot doesn't support loading resource files with a case insensitive path,
this makes script resource loading to fail when the Godot editor gets code
completion requests from Visual Studio.
This fix allows the resource path part of the path to be case insensitive. It
still doesn't support cases where the rest of the path is also case insensitive.
For that we would need a proper API for comparing paths. However, this fix
should be enough for our current cases.
2020-06-23 21:04:08 +02:00
Ignacio Etcheverry
d8af79140e [3.2] C#: Add VisualStudio support 2020-06-23 21:01:54 +02:00
Sergey Minakov
45a6628b15 SCons: Enable iOS modules for ARKit and Camera 2020-06-22 23:23:03 +03:00
PouleyKetchoupp
d2aa3031dc Fix crashes with invalid shapes in BulletPhysicsDirectSpaceState queries
(cherry picked from commit 8b0232bf29)
2020-06-22 12:03:21 +02:00
Rémi Verschelde
327479472e Revert "return boxed long when marshalling a godot int to mono runtime in dynamic contexts"
This reverts commit 42a31501a8.

It breaks compat as is and needs some further work before it can be
cherry-picked for 3.2.x.
2020-06-22 08:35:21 +02:00
Rémi Verschelde
f99cbb94cc Export: Rename 'Windows Universal' to 'UWP'
It's otherwise too easy to be confused between 'Windows Desktop' (Win32)
and 'Windows Universal' (UWP).

(cherry picked from commit 08ef0aab16)
2020-06-21 21:39:44 +02:00
Rémi Verschelde
804b53bdbb
Merge pull request #37500 from madmiraal/check-motion-before-bullet-sweep-3.2
[3.2] Check for motion in cast_motion() before doing Bullet convexSweepTest().
2020-06-21 18:31:52 +02:00
Marcel Admiraal
b006f5402d Check for motion in cast_motion() before doing Bullet convexSweepTest().
Also ensure that default closest_safe and closest_unsafe values are
defined in cast_motion() and before cast_motion() is called.
2020-06-21 16:28:01 +01:00
Marcel Admiraal
fa0ee28826 Check if point's index exists before adding it to the list of points
that need to split faces when avoiding creating degenerate faces
while merging CSG faces.
2020-06-21 14:41:05 +01:00
Michael Belousov
42a31501a8 return boxed long when marshalling a godot int to mono runtime in dynamic contexts
(cherry picked from commit 60fcefba69)
2020-06-19 16:17:27 +02:00
Hugo Locurcio
88c22cb648 Document Mono-specific classes
This fully documents all Mono-specific classes.

(cherry picked from commit 24a8d43272)
2020-06-18 11:33:18 +02:00
Rémi Verschelde
bf913d6917 DocData: Skip language-specific ClassDoc without methods/constants
Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.

(cherry picked from commit ba0db95909)
2020-06-18 11:29:28 +02:00
Rémi Verschelde
d8b543c991 DDS: Fix loading files without DDSD_CAPS or DDSD_PIXELFORMAT
MSDN says:

> When you write .dds files, you should set the DDSD_CAPS and
> DDSD_PIXELFORMAT flags, and for mipmapped textures you should also
> set the DDSD_MIPMAPCOUNT flag. However, when you read a .dds file,
> you should not rely on the DDSD_CAPS, DDSD_PIXELFORMAT, and
> DDSD_MIPMAPCOUNT flags being set because some writers of such a file
> might not set these flags.

https://docs.microsoft.com/en-us/windows/win32/direct3ddds/dds-header

¯\_(ツ)_/¯

Fixes #39516.

(cherry picked from commit 0f21249a2d)
2020-06-18 11:29:28 +02:00
Thakee Nathees
438f1a8238 Fix: Ctrl + Click not working for subclasses
(cherry picked from commit 95b0a00d2c)
2020-06-18 11:29:28 +02:00
Thakee Nathees
fc92f83c30 Debugger stepping to incorrect line fix
Fix: #39296
(cherry picked from commit fc89c5c76d)
2020-06-18 11:29:28 +02:00
Thakee Nathees
931a927a40 shodowed var warning for for loop counter
Fix: #39268
(cherry picked from commit 54835a5302)
2020-06-18 10:51:45 +02:00
Thakee Nathees
bf9df88a7c GDScript debugger incorrect error line fixed
if the first line of an else or an elif throws a runtime error the
debugger shows incorrect line number.

(cherry picked from commit 9325671faa)
2020-06-18 10:51:45 +02:00
Fabio Alessandrelli
806b23208f Fix modules with closure compiler. 2020-06-18 09:21:14 +02:00
Rémi Verschelde
1cf8652945
Merge pull request #39263 from ThakeeNathees/is-operation-fail
[3.2] Fix `is` operation fail on get_script()
2020-06-16 16:28:43 +02:00
Rémi Verschelde
93e20a4cd4 GDScript LSP: Fix wrong error checks added in #39385
Reverts `latest_client_id` back to 0, as I misunderstood how the client
IDs are assigned and, without further testing and debugging, I can't
say if this was a bug or a valid default value.
Similarly, a `latest_client_id` of -1 is no longer raising an error.

Fixes #39548.

(cherry picked from commit 786f4ada35)
2020-06-15 14:34:35 +02:00
Maganty Rushyendra
87f999274b Fix RegEx example in class doc and correct typo
Fix minor errors to do with `search_all` example in RegEx and
typo in RegExMatch class docs.

(cherry picked from commit e5d93f7a66)
2020-06-15 14:34:35 +02:00
Maganty Rushyendra
158e8ee051 Enable Unicode support for RegEx class
Build PCRE2 thirdparty library with unicode support. RegEx objects
in Godot can now be used to recognize unicode strings.

(cherry picked from commit 9f10f6779c)
2020-06-11 10:00:06 +02:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00