Commit graph

4930 commits

Author SHA1 Message Date
Rémi Verschelde
fc28de64c4
Merge pull request #43856 from vnen/gdscript-some-fixes
A couple of GDScript fixes
2020-11-25 17:13:41 +01:00
Rémi Verschelde
a5ee8d881f
Merge pull request #43775 from vnen/gdscript-fix-stack
GDScript: Fix mishandling of stack pointers
2020-11-25 16:25:51 +01:00
George Marques
ed3d8f31df
GDScript: Fix return of cast expression on compilation
It was mistakenly returning the source instead of the result.
2020-11-25 11:37:51 -03:00
George Marques
fb3dc2670a
GDScript: Fix range() being treated as array when optimized out
The call of range() in a for loop is optimized to use int or vectors, to
avoid allocating an array, however the type was set as array still. With
the new typed VM this is an issue as the type mismatch the actual value,
resulting in wrong instructions to be selected.
2020-11-25 11:35:07 -03:00
George Marques
2e528ef382
GDScript: Fix mishandling of stack pointers
- Replace the for loop temporaries by locals. They cause conflicts with
  the stack when being popped, while locals are properly handled in the
  scope.
- Change the interface for the codegen so the for loop list doesn't live
  through the whole block if it's a temporary.
- Keep track of the actual amount of local variables in the stack. Using
  the size of the map is misleading in cases where multiple locals have
  the same name (which is allowed when there's no shadowing).
- Added a few debug checks for temporaries, to avoid them being wrongly
  manipulated in the future. They should not live more than a line of
  code.
- Rearrange some of compiler code to make sure the temporaries don't
  live across blocks.
2020-11-25 11:24:13 -03:00
Rémi Verschelde
d76806d322
Core: Always enable ptrcall, remove PTRCALL_ENABLED define
ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.

It no longer makes sense to make it optional.
2020-11-25 14:08:17 +01:00
Marcel Admiraal
4f654dad13 Fix useless assignement in webrtc/library_godot_webrtc.js 2020-11-25 10:09:53 +00:00
Rémi Verschelde
50db0e66ac
Merge pull request #43747 from Faless/js/4.0_lint
[HTML5] Linting, fixes.
2020-11-23 12:38:17 +01:00
Fabio Alessandrelli
4617a7fa9c [HTML5] Run eslint --fix.
Should I write a poem about this whole new world? ;)
2020-11-23 12:15:18 +01:00
Eric M
efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Rémi Verschelde
a248e6f8c3
Merge pull request #43781 from MaxMutantMayer/regex_unit_tests
Move and add new RegEx test cases
2020-11-23 10:07:07 +01:00
Rémi Verschelde
4ed42bfc29
Merge pull request #43725 from vnen/gdscript-typed-vm-2
GDScript: Typed VM Take 2
2020-11-23 09:59:20 +01:00
Maximilian Mayer
7edb50a31c Move and add new RegEx test cases
Test cases for 'RegEx' are moved from 'test_string.h' to own test suite
in 'test_regex.h'. Additionally, new tests are introduced and '_init' is
removed as it isn't implemented/used anywhere.
2020-11-22 22:48:03 +01:00
Hugo Locurcio
1a616726cf
Document that WebM videos don't support the alpha channel 2020-11-22 17:43:07 +01:00
George Marques
5518e2a68e
GDScript: Add faster instruction for validated constructor
Only for built-in types.
2020-11-21 13:30:17 -03:00
George Marques
e0dca3c6b6
GDScript: Add typed iterate instructions 2020-11-21 13:24:50 -03:00
George Marques
52ab64db69
GDScript: Add faster call instructions for builtin methods
Methods from builtin types can be called by using the function pointer
when the argument and base types are known at compile time.
2020-11-21 13:24:50 -03:00
George Marques
d8b22097f2
GDScript: Add faster call instructions for native methods 2020-11-21 13:24:50 -03:00
George Marques
5aeb390cd7
GDScript: Add speficic set/get instructions
When the base type is known at compile-time, we can get a direct
function pointer that is faster than the regular set/get paths.
2020-11-21 13:24:49 -03:00
George Marques
1ad5c926dc
GDScript: Add faster operator for known types
It now uses the direct operator function pointer, which increases
performance in evaluation.
2020-11-21 13:24:49 -03:00
George Marques
c707d6fe71
GDScript: Gather instructions arguments beforehand
Almost all instructions need variant arguments. With this change they
are loaded in an array before each instruction call. This makes the
addressing code be localized to less places, improving compilation
overhead and binary size by a small margin.

This should not affect performance.
2020-11-21 13:24:49 -03:00
George Marques
b6519d0d03
GDScript: Split Function code into multiple files
To improve organization and reduce the size of compilation units.
2020-11-21 13:24:49 -03:00
Fabio Alessandrelli
a82f70ea9f [HTML5] Libraries refactor for linting.
Initial work to make liniting easier.

This includes:
- Rename http_request.js to library_godot_http_request.js.
- Rename externs.js to engine.externs.js.
- New library_godot_runtime.js (GodotRuntime) wraps around emscripten
  functions.
- Refactor of XMLHttpRequest handler in engine/preloader.js.
- Few fixes to bugs spotted by early stage linting.
2020-11-21 14:22:40 +01:00
Rémi Verschelde
a655de89e3
doc: Warn about using Node internal processing
See #43689.

Also 'fixed' some spelling for behavior in publicly visible strings.
(Sorry en_GB, en_CA, en_AU, and more... Silicon Valley won the tech spelling
war.)
2020-11-20 09:52:37 +01:00
Marcel Admiraal
112e2fdfc3 Fix godot_js_websocket_send function unused assignment. 2020-11-17 18:28:39 +00:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde
d7176e9040
Merge pull request #42167 from madmiraal/fix-42108
Remove the unnecessary sync() and the restrictions it imposes on 3D Physics.
2020-11-16 09:32:48 +01:00
Rémi Verschelde
f763a2a3db
Merge pull request #43250 from aaronfranke/strext-lstrip
Add LStrip, RStrip, and HexEncode to C#
2020-11-16 09:15:45 +01:00
Aaron Franke
4b272b18ea
Improve comments in Color documentation 2020-11-13 23:31:19 -05:00
Andrea Catania
98daa0af6b Fixes crash when returns . 2020-11-13 15:09:52 +01:00
George Marques
8bcd345782
GDScript: Fix native class not set with inheritance 2020-11-13 10:35:24 -03:00
Grzegorz Puławski
c49810046e Removing unneeded FuncRef code in C# 2020-11-11 21:57:42 +01:00
reduz
635d33dc6c Refactor variant built-in methods yet again.
* Using C-style function pointers now, InternalMethod is gone.
* This ensures much better performance in typed code.
* Renamed builtin_funcs to utility_funcs, to avoid naming confusion
2020-11-11 16:36:36 -03:00
Rémi Verschelde
fb2151089c
Merge pull request #43372 from aaronfranke/clamp-fixes
Minor clamp and float fixes
2020-11-11 13:20:19 +01:00
Rémi Verschelde
10fd107599
Merge pull request #43443 from Faless/js/4.0_audio_worklet
[HTML5] Port inline JS code to libraries, AudioWorklet support.
2020-11-11 10:07:28 +01:00
Aaron Franke
ee79fc627c
Minor clamp and float fixes 2020-11-10 14:30:07 -05:00
Sergey Minakov
30783d57cc iOS Modules: separate main platform code from modules
Moved previously builtin modules 'GameCenter', 'AppStore', 'iCloud' to separate modules to be represented as plugin.
Modified 'ARKit' and 'Camera' to not be builtin into engine and work as plugin.
Changed platform code so it's not affected by the move.
Modified Xcode project file to remove parameters that doesn't make any effect.
Added basic '.gdip' plugin config file.
2020-11-10 16:28:29 +03:00
Gustav
0ddd4097a6 Fix completion for built-in load function 2020-11-10 12:00:08 +01:00
Rémi Verschelde
263f731924
Merge pull request #43434 from sneik15/patch-1
Updated gd_glue.cpp to work in the variant refactoring (Mono enabled)
2020-11-10 11:56:18 +01:00
Fabio Alessandrelli
e2083871eb [HTML5] Port JavaScript inline code to libraries.
The API is implemented in javascript, and generates C functions that can
be called from godot.
This allows much cleaner code replacing all `EM_ASM` calls in our C++
code with plain C function calls.
This also gets rid of few hacks and comes with few optimizations (e.g.
custom cursor shapes should be much faster now).
2020-11-10 11:42:51 +01:00
Fabio Alessandrelli
05261cceaf Fix gdnative build when WebRTC module is disabled. 2020-11-10 11:42:51 +01:00
Rémi Verschelde
68067b8d97
Merge pull request #43423 from Calinou/doc-assert-avoid-side-effects
Clarify that code in `assert()` should avoid side effects
2020-11-10 11:31:28 +01:00
Adrian Adeva
74f98de223
Updated gd_glue.cpp to work with the latest changes in the variant refactoring
Without this change the engine dont compile with the mono module enabled.
2020-11-10 11:13:54 +01:00
Rémi Verschelde
b51dca64a6
Merge pull request #43383 from vnen/gdnative-string-header
GDNative: Define special char types in string.h
2020-11-10 09:40:26 +01:00
Rémi Verschelde
0f249f5c0a
Variant: Sync docs with new constructors, fixups after #43403
Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
2020-11-09 23:39:53 +01:00
Hugo Locurcio
d6c7073bd7
Clarify that code in assert() should avoid side effects 2020-11-09 21:48:24 +01:00
Rémi Verschelde
9d2e8f2f27
Variant: Rename Type::_RID to Type::RID
The underscore prefix was used to avoid the conflict between the `RID` class
name and the matching enum value in `Variant::Type`.

This can be fixed differently by prefixing uses of the `RID` class in `Variant`
with the scope resolution operator, as done already for `AABB`.
2020-11-09 16:29:04 +01:00
reduz
221a2a1742 Refactored variant constructor logic 2020-11-09 08:54:43 -03:00
Aaron Franke
6b54d7dde1
Add HexEncode to C# 2020-11-09 03:25:51 -05:00
Aaron Franke
c89af1d433
Add LStrip and RStrip to C# strings 2020-11-09 03:24:46 -05:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
George Marques
82576371ef
GDNative: Define special char types in string.h
Those are standard types in C++ but not in C.

This also removes the wchar header which is not needed anymore and use
stddef.h instead (which is needed for size_t).
2020-11-07 16:09:14 -03:00
reduz
05de7ce6ca Refactored variant setters/getters
-Discern between named, indexed and keyed
-Get direct access to functions for typed GDScript and GDNative bindings
-Small changes to some classes in order to work with the new setget binder
2020-11-07 15:16:15 -03:00
Rémi Verschelde
329d2c1ced
Merge pull request #42947 from Calinou/image-load-bmp-from-buffer
Add `Image.load_bmp_from_buffer()` for run-time BMP image loading
2020-11-07 16:38:09 +01:00
Yuri Roubinsky
156e4043b4 [Mono] Added Shuffle method to Array 2020-11-07 11:26:54 +03:00
reduz
f2397809a8 Refactored Variant Operators.
-Using classes to call and a table
-For typed code (GDS or GDNative), can obtain functions to call prevalidated or ptr.
2020-11-06 12:45:50 -03:00
Yuri Roubinsky
38fb26794b Exposed randi_range to global funcs + renamed rand_range to randf_range 2020-11-06 17:06:26 +03:00
Rémi Verschelde
52c1b5fc41
Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
2020-11-06 10:17:12 +01:00
Rémi Verschelde
c35517f07e
Merge pull request #42724 from theoway/error_message_fix_call_recursive
Fixes the misleading message when a non-existing function name is passed to TreeItem.call_recursive()
2020-11-05 00:46:28 +01:00
Rémi Verschelde
424cd00f8b
doc: Sync classref with current source + fixup some bindings
Includes various changes triggered by the refactoring of method bindings.
2020-11-04 15:38:26 +01:00
Rémi Verschelde
bd13e82080
Merge pull request #41516 from Lunatoid/allow-object-new
Fixed ParseError when calling Object.new()
2020-11-03 13:08:48 +01:00
Hugo Locurcio
7adb6b91b3
Remove Color.contrasted() as its behavior is barely useful
Returning the most contrasting color isn't a trivial task, as there
are often many possible choices. It's usually best left for the user
to implement using a script.
2020-11-03 04:46:08 -05:00
Mateo de Mayo
531958b2f0 Fix crash due to unreachable code in properties 2020-10-30 22:21:50 -03:00
Mateo de Mayo
f388177aed Fix crash by adding nullcheck for uninitialized constants 2020-10-29 01:11:19 -03:00
Rémi Verschelde
c11992ed48
Merge pull request #43029 from neikeq/offline-nuget-fallback
C#: Make editor create NuGet fallback folder for Godot packages
2020-10-27 08:07:58 +01:00
Rémi Verschelde
f594f31823
Merge pull request #43088 from neikeq/fix-custom-event-signal-hot-reload
C#: Fix custom event signals crash on hot-reload
2020-10-27 08:07:33 +01:00
bruvzg
b506f9b5aa
Fix uninitialized GridMapEditor::node and InputMapEditor::setting variables. 2020-10-26 22:57:11 +02:00
Rémi Verschelde
825ab3b784
Merge pull request #42817 from akien-mga/vulkan-sdk-1.2.154.0
vulkan: Sync loader, headers and glslang to sdk-1.2.154.0
2020-10-26 15:15:19 +01:00
Ignacio Etcheverry
34960cb936 C#: Fix custom event signals crash on hot-reload
Cleanup and re-initialization of event signals before
and after hot-reload should be working correctly now.
2020-10-26 07:00:51 +01:00
Hugo Locurcio
a1d9c67f43
Optimize SVG using svgcleaner --multipass
This decreases the editor binary size by about 8 KB.
2020-10-25 10:02:37 +01:00
Rémi Verschelde
d3dd8fb0f3
Merge pull request #42848 from Tadaboody/bugfix/gridmap_visibility
Setting visibility on GridMaps parent now works. Closes #41374.
2020-10-25 00:33:55 +02:00
Andrii Doroshenko (Xrayez)
650ae413ce GDNative XR: remove redundant config.py
It's not an engine module. This is handled by GDNative's
`SCsub` instead, as done for other subdirectories already.
2020-10-24 23:04:07 +03:00
Yuri Roubinsky
b09e60ef1a
Merge pull request #43026 from Chaosus/color_autocompletion
Shows ColorRect in Color constants autocompletion
2020-10-23 19:18:20 +03:00
Yuri Roubinsky
4c65dc975c Shows ColorRect in Color constants autocompletion 2020-10-23 19:03:50 +03:00
Ignacio Etcheverry
64b5ee7010 C#: Make editor create NuGet fallback folder for Godot packages
Main benefits:
- Projects can be built offline. Previously you needed internet
  access the first time building to download the packages.
- Changes to packages like Godot.NET.Sdk can be easily tested
  before publishing. This was already possible but required
  too many manual steps.
- First time builds are a bit faster, as the Sdk package doesn't
  need to be downloaded. In practice, the package is very small
  so it makes little difference.

Bumped Godot.NET.Sdk to 4.0.0-dev3 in order to enable the
recent changes regarding '.mono/' -> '.godot/mono/'.
2020-10-23 10:54:49 +02:00
Ignacio Etcheverry
f06f91281c C#: Re-work solution build output panel
- Removed item list that displayed multiple build
  configurations launched. Now we only display
  the last build that was launched.
- Display build output next to the issues list.
  Its visibility can be toggled off/on.
  This build output is obtained from the MSBuild
  process rather than the MSBuild logger. As such
  it displays some MSBuild fatal errors that
  previously couldn't be displayed.
- Added a context menu to the issues list with
  the option to copy the issue text.
- Replaced the 'Build Project' button in the panel
  with a popup menu with the options:
  - Build Solution
  - Rebuild Solution
  - Clean Solution
- The bottom panel button was renamed from 'Mono'
  to 'MSBuild' and now display an error/warning icon
  if the last build had issues.
2020-10-23 07:49:39 +02:00
Hugo Locurcio
0209e3790e
Add Image.load_bmp_from_buffer() for run-time BMP image loading
This partially addresses
https://github.com/godotengine/godot-proposals/issues/676.
2020-10-20 23:52:45 +02:00
Rémi Verschelde
ef62e93677
Merge pull request #42943 from vnen/gdscript-local-scope-fix
Fix handling of scope for local GDScript variables
2020-10-20 21:00:57 +02:00
George Marques
96884ef41e
Merge pull request #41983 from ThakeeNathees/array-const-folding-bug-fix
Array/Dictionary Nodes no more reduced to array/dictionary variant
2020-10-20 15:43:07 -03:00
George Marques
11c05642fe
GDScript: Fix handling of scope for local variables 2020-10-20 14:57:31 -03:00
George Marques
48b91b900d
GDScript: Add initialization for the language before debug tests
This ensures that the tests will use a full environment with correct
settings so global classes and autoloads can be properly found.
2020-10-20 10:07:03 -03:00
Yuri Roubinsky
4f4287243c Removed underscore from GraphEdit begin/end_node_move signals 2020-10-20 09:22:40 +03:00
George Marques
5ddfc657ab
Merge pull request #42067 from ThakeeNathees/for-loop-stack-overriden-fix
GDScript: for loop override stack variable bug fix
2020-10-19 20:21:14 -03:00
Marcel Admiraal
7f26ce4486 Set Bullet collision shape index to zero when using a single shape
or ConcavePolygonShape3D.
2020-10-19 11:51:11 +01:00
reduz
ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
Aaron Franke
029de52001
Add GetStringFromUTF8 and GetStringFromASCII 2020-10-17 04:17:29 -04:00
Umang Kalra
c37f633216 Fixes the misleading error message for call_recursive method for TreeItems 2020-10-17 12:30:36 +05:30
Tomer Keren
fe52c6b0b7 Setting visibility on GridMap now works. Closes #41374.
Continuing the work from f43a0ef327,
It seems the maps visibility was not actually set and a flase value was propogated to the meshes
Trying to set the maps visibility directly (Using `set_visibility` causes the map to no longer to recieve visibility notifications, instead this approach was chosen
2020-10-16 14:04:24 +03:00
Rémi Verschelde
5971a97a0c
Merge pull request #42649 from madmiraal/reapply-41806
Reapply -Avoid adding margin twice along capsule Y axis
2020-10-15 17:20:22 +02:00
Rémi Verschelde
148ad49c93
vulkan: Sync loader, headers and glslang to sdk-1.2.154.0
Actually sdk-1.2.154.1 for Vulkan-Loader.

glslang is updated to bacaef3237c515e40d1a24722be48c0a0b30f75f which is the
known-good version for Vulkan-ValidationLayers 1.2.154.0.

COPYRIGHT.txt was synced with the current version of the glslang LICENSE.txt,
and `glslang/register_types.cpp` now uses the upstream definition for its
default builtin resource instead of hardcoding it.
2020-10-15 12:29:42 +02:00
Hugo Locurcio
802c1e4df1
Link the Random number generation tutorial in the class reference 2020-10-14 18:03:29 +02:00
Rémi Verschelde
f2002afae7
Merge pull request #42731 from opl-/fix/csharpscript-load-code-duplication
Fix code duplication in CSharpScript
2020-10-13 09:57:38 +02:00
Rémi Verschelde
4efcb4c442
Merge pull request #42592 from madmiraal/fix-42567
Initialise Bullet RigidBody friction to the expected value of 1.0
2020-10-13 09:51:53 +02:00
opl-
e4d20ae373 Fix code duplication in CSharpScript
Removes code duplication between `CSharpScript::reload()` and `CSharpScript::initialize_for_managed_type()`.

Removes a redundant `CSharpScript::update_exports()` call in `CSharpLanguage::reload_assemblies()` as `CSharpScript::reload()` already calls it when appropriate.

Fixes missing update of RPC information in `CSharpScript::initialize_for_managed_type()`.
2020-10-13 06:46:34 +02:00
Tomasz Chabora
aadc8d54a4 Bind missing constant in VisualScriptPropertyGet 2020-10-12 19:39:15 +02:00
Rémi Verschelde
a33fe75050
doc: Sync classref with current source 2020-10-09 15:04:15 +02:00
Rémi Verschelde
1af3cf15c2
Mono: Fix typo in Godot.NET.Sdk.nuspec
Fixes #42666.
2020-10-09 13:37:07 +02:00
Rémi Verschelde
6dc41b3ad2
Merge pull request #42623 from lolleko/incorrect-macos-platform-name-csharp
C# GodotTools: Replace platform Identifier "OSX" with "macOS"
2020-10-09 08:17:06 +02:00
George Marques
fe6109101f
Merge pull request #41881 from ThakeeNathees/crash-on-builtin-constructor
GDScript crash on builtin type constructor fix
2020-10-08 19:35:35 -03:00
Marcel Admiraal
0e12a0c66a Reapply -Avoid adding margin twice along capsule Y axis
Co-authored-by: Andrea Catania <info@andreacatania.com>
2020-10-08 16:22:38 +01:00
Lorenz Junglas
7e2b495435 Adressed Review
Identifier "macOS" => "MacOS"
Platform/SDK name reverted to "osx"
2020-10-08 13:51:19 +02:00
Lorenz Junglas
519f369795 C# GodotTools: Replace platform Identifier "OSX" with "macOS"
Because `Strings OS_OSX::get_name() const` now returns "macOS" (15a9f94346)
The C# GodotTools were still using "OSX" as identifier a few things were borken (e.g. dotnet/msbuild detection).
2020-10-08 13:51:19 +02:00
Andrea Catania
2e8cb8a9e2 Fixed #41040 in an alternative way now that #39726 is reverted 2020-10-08 13:10:48 +02:00
Andrea Catania
1829c67762 Revert "Optimized physics object spawn time and optimized shape usage when the shape is not scaled"
This reverts commit 7709a83493.
2020-10-08 12:22:59 +02:00
Andrea Catania
8827e315d4 Revert "- Enhanced the flush mechanism by flushing only needed thing."
This reverts commit 8d0d6d6921.
2020-10-08 12:16:12 +02:00
Rémi Verschelde
104cfaefcd
Merge pull request #42610 from jak6jak/set_values
Fixed a bug which caused Set Index to not function
2020-10-08 10:23:29 +02:00
Jacob Edie
d76457a7f3 added temp variable because *p_inputs[2] is the same as *p_outputs[0] 2020-10-06 22:12:47 -04:00
Aaron Franke
bea7d61fd9
Improve the Vector2 rotated code in C# 2020-10-06 15:57:47 -04:00
Marcel Admiraal
47431dbb8e Initialise Bullet RigidBody friction to the expected value of 1.0 2020-10-06 09:10:05 +01:00
Rémi Verschelde
3556bc48a1
Merge pull request #42439 from Xrayez/doc-gdscript-load-and-resloader-xref
Cross-reference GDScript `load` and `ResourceLoader.load` in classref
2020-10-04 20:48:07 +02:00
Rémi Verschelde
b5eea37fb0
Merge pull request #42518 from Duroxxigar/update-getter-and-setters
Updated getters and setters names for toplevel
2020-10-03 21:53:35 +02:00
Paulb23
ee4a1c99a7 Switch from recursion to iterative for backfilling colour regions 2020-10-03 14:58:55 +01:00
Duroxxigar
4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Rémi Verschelde
0d07a935e9
Merge pull request #42503 from naithar/feature/ios-cleanup-arc
[4.0] [iOS] Switch to ARC. Refactoring and cleanup.
2020-10-02 15:18:03 +02:00
Sergey Minakov
3cd1cb53a0 iOS: Refactoring
Enabled ARC for iOS.
Weakify/Strongify macros for objc blocks.
Removed old version checks.
Specific types for ObjC++ modules to exclude unneeded bridging.
Separate DeviceMetrics class for device specific data.
Replaced old/deprecated functionality.
2020-10-02 15:04:51 +03:00
Marcel Admiraal
5278e07095 Check entire basis column for zero size when unscaling Bullet basis. 2020-10-02 10:30:08 +01:00
Rémi Verschelde
a1c27228ae
Merge pull request #42480 from ssw99/sprintf-function-bug-fix
Fix extra padding for numbers with signs
2020-10-02 10:26:15 +02:00
Aaron Franke
439be614f4
Link to demos from within the class reference 2020-10-01 23:57:21 -04:00
Serhat
9f2cdfea82 Fixed padding bug of sprintf function 2020-10-02 00:25:42 +03:00
Rémi Verschelde
39ea52f36f
Merge pull request #41829 from RandomShaper/fix_40353
Avoid warning about harmless unfulfilled yields
2020-10-01 14:17:34 +02:00
Andrii Doroshenko (Xrayez)
a8404cf56c 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.
2020-09-30 23:03:36 +03:00
Eduardo Rodrigues
aca0cede67 Fix error message when exporting a write-only property without a setter 2020-09-29 15:48:56 -03:00
Rémi Verschelde
bd12dc33d9
Merge pull request #38704 from aaronfranke/mono-dotgodot
Rename the ".mono" folder to ".godot/mono"
2020-09-28 14:35:18 +02:00
Rémi Verschelde
e66013a6f1
Merge pull request #42262 from akien-mga/ios-pvrtc-fixes
iOS: Fix multiple issues with PVRTC import, disable ETC1
2020-09-28 10:17:38 +02:00
Pedro J. Estébanez
de4e54dd91 Avoid infinite loop in GDScript at shutdown 2020-09-26 19:21:09 +02:00
Rémi Verschelde
41c735fe50
Style: Fix black formatting after #42332
Somehow it did not run CI checks so we missed that one.

Also pin `black` version to latest upstream release.
2020-09-25 15:49:37 +02:00
Hugo Locurcio
cfd564b385
Enable the copy_mono_root SCons option by default
This closes #41652.
2020-09-25 11:08:01 +02:00
Rémi Verschelde
3e4627ab6f
Merge pull request #42283 from Calinou/doc-print-push-error-warning
Improve documentation related to printing error/warning messages
2020-09-24 15:16:27 +02:00
Rémi Verschelde
fc8904236b
Merge pull request #42070 from Razoric480/ignore-cancel-request
Make LSP ignore $/cancelRequest msgs
2020-09-24 15:15:25 +02:00
Hugo Locurcio
50f3a8e312
Improve documentation related to printing error/warning messages 2020-09-24 14:23:53 +02:00
Rémi Verschelde
a6bb4f70e0
Merge pull request #42293 from ricardoalcantara/fix_basis_csharp
Basis RotationQuat should be public.
2020-09-24 08:16:24 +02:00
Ricardo Alcantara
a676b8ea66 Basis RotationQuat should be public. 2020-09-24 00:59:54 -03:00
Aaron Franke
42e70a77ef
Rename the ".mono" folder to ".godot/mono" 2020-09-23 15:42:29 -04:00
Rémi Verschelde
72aaf81518
Merge pull request #42259 from zaevi/fix-mono-IsAbsPath
Fix C# string.IsAbsPath()
2020-09-23 18:12:27 +02:00
Rémi Verschelde
7b1de6deda
Merge pull request #42126 from Calinou/doc-videoplayer-formats
Improve documentation about VideoPlayer video formats
2020-09-23 15:40:50 +02:00
Hugo Locurcio
1efe57848a
Improve documentation about VideoPlayer video formats
This closes https://github.com/godotengine/godot-docs/issues/4021.
2020-09-23 14:28:16 +02:00
Vasiliy Makarov
313006adb8 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 all backends
Etc1 for iOS doesn't have any sense, so it disabled.
Fixed checks in export editor.
Fixed pvrtc encoding procedure.

Edit by Akien: Forward-ported from #38076, this may not make sense as is for
Godot 4.0, but it's important that we have the latest code in sync with 3.2
for when more rendering backends and proper iOS support are added back.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-09-23 11:22:51 +02:00
Rémi Verschelde
6f50571eff
Merge pull request #42195 from extrawurst/patch-1
add iOS Simulator platform
2020-09-23 09:13:41 +02:00
Zae
b5eea5cfd4 Fix C# string.IsAbsPath() 2020-09-23 13:53:35 +08:00
Rémi Verschelde
0923a1f700
Merge pull request #41426 from madmiraal/fix-bullet-zero-scale
Check and correct for zero scaling when unscaling Bullet basis.
2020-09-20 09:24:50 +02:00
Stephan Dilly
f49199bcc3
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`
2020-09-19 15:09:36 +02:00
Rémi Verschelde
a332e2f5b2
Merge pull request #41861 from Razoric480/fix-vscript-value-by-type
Add a function to sanitize variant values in visual script
2020-09-18 17:36:01 +02:00
Francois Belair
a598c77058 Add a VScript func to sanitize variant values
Fixes #27611
2020-09-18 11:19:53 -04:00
Rémi Verschelde
cff43e5326
Merge pull request #41930 from RandomShaper/fix_gdscript_leaks
Fix leaks in GDScript
2020-09-18 16:18:57 +02:00
Rémi Verschelde
3e78963bb9
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 13:44:25 +02:00
Marcel Admiraal
41209efa7f Remove the unnecessary sync() and the restrictions it imposes on 3D Physics. 2020-09-18 10:43:31 +01:00
Thakee Nathees
119936d939 GDScript: for loop override stack variable bug fix
Fix: #42050
2020-09-18 01:22:22 +05:30
Raul Santos
d425cf6fed
Fix ExprMatch stackoverflow 2020-09-16 15:44:52 +02:00
Fabio Alessandrelli
60687ce778 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.
2020-09-15 18:47:51 +02:00
Francois Belair
9c273307d8 Make LSP ignore $/ messages
Fixes #38814
2020-09-15 09:49:26 -04:00
Rémi Verschelde
3a8a0bc5d3
Merge pull request #42061 from madmiraal/fix-41743
Fix Bullet prioritised list of Areas a RigidBody is a member of element shift.
2020-09-15 09:13:15 +02:00
Marcel Admiraal
7e73dd0b2e Fix RigidBodyBullet areasWhereIam element shift. 2020-09-14 18:43:21 +01:00
Danil Alexeev
a4c5790350 Several documentation improvements 2020-09-14 20:02:19 +03:00
Tom Daffin
c15fb42d45 Add mono log message to error for fatal errors 2020-09-13 19:53:06 -06:00
Rémi Verschelde
4331bea18c
Merge pull request #42000 from aaronfranke/cs-arr-concat
Add concatenation support and a new constructor to Godot.Collections.Array
2020-09-13 08:12:48 +02:00
Ignacio Etcheverry
1db0395950 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.
2020-09-13 03:46:27 +02:00
Aaron Franke
a4dcd48d16
Add concatenation support and a new ctor to Godot.Collections.Array 2020-09-12 18:15:24 -04:00
Thakee Nathees
3886a2f9f6 Array/Dictinoary no more reduced to array/dictionary variant
Fix: #41377
Fix: #20436
Fix: #41953
2020-09-11 19:46:20 +05:30
Andrii Doroshenko (Xrayez)
174b6e817f Move GDNative String tests to respective module
GDNative-specific tests moved out of main `tests/` folder into
`modules/gdnative/tests`.

Include path for GDNative headers are still hardcoded in `tests/SCsub`,
but made conditional now.

Also fixed test case tag typos.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2020-09-11 14:51:38 +03:00
Marcel Admiraal
3070d0b735 Remove unused Python local variables. 2020-09-11 11:39:15 +01:00
Paulb23
4d7df24d46 Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit 2020-09-10 20:35:28 +01:00
Rémi Verschelde
43930aaa28
Merge pull request #41806 from AndreaCatania/AndreaCatania-patch-4
Avoid adding margin twice along capsule Y axis
2020-09-10 17:47:20 +02:00
Marcel Admiraal
e3d698dae9 Remove unused Python imports. 2020-09-10 11:38:52 +01:00
Pedro J. Estébanez
e25f5e791e Ensure cyclic dependencies between scripts are broken at exit 2020-09-10 01:34:42 +02:00
Pedro J. Estébanez
95828161d4 Prevent cyclic reference between script and its members 2020-09-10 01:26:07 +02:00
reduz
e3eacbc8a6 Make EXR import format support all depths and channel configurations 2020-09-09 16:51:32 -03:00
Rémi Verschelde
d16f5a57c1
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.
2020-09-09 20:50:41 +02:00
Rémi Verschelde
36e2c39f0c
Merge pull request #41904 from akien-mga/fix-clang6-compat-mutexlock
GDScript: Fix MutexLock usage, fixes Clang 6 compat
2020-09-09 15:58:28 +02:00
Rémi Verschelde
1c881c973b
GDScript: Fix MutexLock usage, fixes Clang 6 compat
Fixes #41852.
2020-09-09 14:56:57 +02:00
Aaron Franke
d0a1399a1b
Change inequality comparison operators to use exact equality 2020-09-08 18:10:58 -04:00
Rémi Verschelde
2410016638
Merge pull request #41709 from ThakeeNathees/dictionary-indexing-bug-fix
Fixed parser error when indexing a dictionary.
2020-09-08 21:38:14 +02:00
Rémi Verschelde
bd34d38bf8
Merge pull request #41888 from neikeq/sln-bom
C#: Use BOM when creating a solution
2020-09-08 20:22:30 +02:00
Ignacio Etcheverry
1c74fa4242 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.
2020-09-08 20:06:07 +02:00
Ignacio Etcheverry
ac471ff563 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:53:39 +02:00
Thakee Nathees
279a11bbda GDScript crash on builtin type constructor fix
Fix: #41848
2020-09-08 18:33:53 +05:30
Rémi Verschelde
af00bb998e
Merge pull request #41875 from nekomatata/webrtc-doc-turn-server
Fix TURN server example in WebRTC documentation
2020-09-08 13:37:23 +02:00
PouleyKetchoupp
280496a2c3 Fix TURN server example in WebRTC documentation
WebRTC GDNative plugin uses `credential` and not `credentials`.
74f2c78db5/src/WebRTCLibPeerConnection.cpp (L35-L37)
2020-09-08 11:10:57 +02:00
Rémi Verschelde
3c42d5789f
Merge pull request #38308 from bruvzg/sad_security_circus
Adds PCK encryption support (using script encryption key for export).
2020-09-07 17:12:01 +02:00
Pedro J. Estébanez
f76a13dea0 Avoid warning about harmless unfulfilled yields 2020-09-06 22:30:46 +02:00
Rémi Verschelde
c39224a90d
Merge pull request #41813 from madmiraal/add-missing-header-guards
Fix header guards in modules.
2020-09-06 21:07:25 +02:00
Marcel Admiraal
5a376cb061 Fix header guards in modules:
- Add missing header guards to various modules' register_types.h
- Add header guard to basis_universal/texture_basisu.h.
- Ensure header guard encloses entire header in
  webrtc/webrtc_data_channel_js.h.
2020-09-06 16:13:59 +01:00
Rémi Verschelde
859322343c
Merge pull request #41803 from ThakeeNathees/parameter-type-infer-bug-fix
GDScript: parameter infer type bug fix
2020-09-06 15:22:44 +02:00
Andrea Catania
53e42930d9
Avoid adding margin twice along capsule Y axis 2020-09-06 11:33:27 +02:00
Thakee Nathees
89489a3cac GDScript: parameter infer type bug fix
Fix: #41772
2020-09-06 13:26:52 +05:30
Alex de la Mare
8dbd7155b5 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 11:34:04 +10:00
bruvzg
f043eabdd8
Adds PCK encryption support (using script encryption key for export).
Change default encryption mode from ECB to CFB.
2020-09-05 14:53:39 +03:00
bruvzg
82cd97b675
Fix Mono path utils char types. 2020-09-04 22:20:08 +03:00
Rémi Verschelde
605d7b7e82
Merge pull request #41760 from ThakeeNathees/null-dereference-on-gdscript-function-fix
null pointer dereference at GDScriptFunction::call crash fix
2020-09-04 14:45:31 +02:00
Thakee Nathees
75d4511cb5 null pointer dereference at GDScriptFunction::call fix 2020-09-04 15:24:09 +05:30
Rémi Verschelde
5c55c41c9d
Merge pull request #41753 from neikeq/csharp-hide-build-button-if-no-proj
C#: Hide Build button if there's no solution to build
2020-09-04 08:19:53 +02:00
Rémi Verschelde
15efe040f9
Merge pull request #41747 from neikeq/issue-41446
Fix parsing of C# files with spaces in the path
2020-09-04 08:16:56 +02:00
Rémi Verschelde
90601bb659
Merge pull request #41750 from neikeq/issue-41745
C#: Fix Godot failing to find class namespace
2020-09-04 08:15:49 +02:00
Rémi Verschelde
d1b0b1962d
Merge pull request #41748 from neikeq/issue-41712
Fix 'Parameter "assembly" is null' error
2020-09-04 08:13:46 +02:00
Ignacio Etcheverry
173f7d800b 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:07:12 +02:00
Ignacio Etcheverry
a0ef3ba5c8 C#: Fix Godot failing to find class namespace 2020-09-04 01:26:05 +02:00
Ignacio Etcheverry
136181bb50 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:08:44 +02:00
Ignacio Etcheverry
9e8a5e4b5a Fix parsing of C# files with spaces in the path 2020-09-04 01:01:10 +02:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Thakee Nathees
4fc14e8e11 fixed parser error when indexing a dictionary.
Fix: #41707
2020-09-03 18:04:54 +05:30
Marcel Admiraal
f6ad1954f7 Ensure header guards enclose entire header. 2020-09-03 11:29:42 +01:00
Rémi Verschelde
d84954a281
Merge pull request #41459 from Paulb23/nested_color_regions
Fix colour region end key seach and start key order
2020-09-03 11:32:04 +02:00
Ignacio Etcheverry
206501a45e 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.
2020-09-03 09:09:04 +02:00
bruvzg
d73609c774
Fix GDScript codegen leak. 2020-09-02 22:42:49 +03:00
Marcel Admiraal
cba4a93a34 Merge python EnvironmentError, IOError and WindowsError into OSError. 2020-09-02 15:58:07 +01:00
Andrii Doroshenko (Xrayez)
0cc05c5a31 Register GDScript test tools as test commands to run via command-line 2020-09-02 01:43:26 +03:00
Lunatoid
07053d0c6a Fixed ParseError when calling Object.new()
Fixes #41462 where calling Object.new() in GDScript gave an error.
I fixed it by adding exclusion when checking if the name is a builtin
type to exclude objects with a comment detailing why.
2020-09-02 00:11:58 +02:00
Andrii Doroshenko (Xrayez)
6b7e50ab34 Move GDScript tests to respective folder under modules 2020-09-02 01:09:32 +03:00
George Marques
635c6a0a18
Add GDScript disassembler 2020-09-01 14:36:30 -03:00
George Marques
745ca3059d
Change GDScript compiler to use codegen abstraction 2020-09-01 14:36:22 -03:00
George Marques
82273ebc01
Add GDScript code generation interface
Implement the abstraction by targeting the current VM.
2020-09-01 14:27:19 -03:00
George Marques
a889084864
GDScript: Don't mark function parameters as constant
They can be reassigned as if it were a local variable.
2020-09-01 09:26:28 -03:00
George Marques
c8e10aa20b
GDScript: Properly set class inheritance for global classes 2020-09-01 09:26:28 -03:00
George Marques
164cc8705b
GDScript: Check for missing exponent when parsing numbers
Also forbid multiple underscores in a row as numeric separator.
2020-09-01 09:26:28 -03:00
George Marques
f8fa5e4738
GDScript: Fix analysis of singleton dependencies
Sometimes a singleton might depend on another before they are fully
compiled so we can't rely on globals in this case.
2020-09-01 09:26:28 -03:00
George Marques
edb4caf24e
GDScript: Allow "extends" to be used inside inner class 2020-09-01 09:26:27 -03:00
George Marques
34dc689ad4
GDScript: Allow "self" to be used in class level 2020-09-01 09:26:27 -03:00
George Marques
1ddb9b1a52
GDScript: Don't try to parse constant scripts that aren't valid
Since it's likely that they won't parse correctly.
2020-09-01 09:26:27 -03:00
Aaron Franke
a6ff389a55
Simplify html_is_valid and allow it to work with 3 and 4 hex digits 2020-09-01 02:07:35 -04:00
Aaron Franke
ecd6a893b4
Change Color HTML conversion from ARGB to RGBA
Also add support for 3 and 4 digit values in C#. Now it actually matches the HTML/CSS spec.
2020-09-01 02:07:35 -04:00
Rémi Verschelde
2cfc5b8680
Merge pull request #40993 from Calinou/doc-collision-layer-mask
Reference the online documentation in collision layer/mask properties
2020-08-31 15:32:44 +02:00
Hugo Locurcio
c4903a603b
Add link titles for all links in the class reference
This makes them display in a nicer way in the editor help.
(The title will display instead of the full URL.)
2020-08-31 14:22:07 +02:00
Rémi Verschelde
db5ea78b7b
Merge pull request #41613 from neikeq/possibly
Fix clang-tidy warnings due to semicolon after mono module macros
2020-08-30 12:04:16 +02:00
Rémi Verschelde
30029e1d7f
Merge pull request #41611 from neikeq/issue-41444
C#: Fix crash on export when incorrectly freeing MonoAssemblyName
2020-08-30 12:02:55 +02:00
Ignacio Etcheverry
8c7553a076 Fix clang-tidy warnings due to semicolon after mono module macros
This also enforces them to end with a semicolon.
2020-08-30 02:17:04 +02:00
Ignacio Etcheverry
99740850a2 C#: Fix InvalidCastException on export 2020-08-30 01:55:21 +02:00
Ignacio Etcheverry
7c7d724453 C#: Fix crash on export when incorrectly freeing MonoAssemblyName 2020-08-30 01:48:43 +02:00
Thaina Yu
5dc3900727
Mono: Improve MSBuildFinder logic on Windows
Support detecting both 32-bit and 64-bit installations of `vswhere.exe`.
2020-08-29 12:55:29 +02:00
Hugo Locurcio
20d0f5bbd7
Cross-reference GDScript built-in rounding methods to ease discovery
This closes #19315.
2020-08-28 17:04:22 +02:00
Rémi Verschelde
46809332dd
Merge pull request #41547 from vnen/gdscript-2-fixes
Some more GDScript fixes
2020-08-28 10:36:09 +02:00
George Marques
5033d5c71c
GDScript: Fix crash when parsing properties 2020-08-26 16:08:19 -03:00
George Marques
b2b45987d0
GDScript: Show error when there's an inheritance cycle 2020-08-26 16:01:08 -03:00
George Marques
4a3fca47e5
GDScript: Add recursion depth limit for completion
To avoid crashes when there's a dependency loop.
2020-08-26 15:38:23 -03:00
George Marques
ff16ba1eaa
GDScript: Fix crash when completing code with signals 2020-08-26 15:13:42 -03:00
George Marques
8ccf88a206
GDScript: Fix issues when deriving from other scripts 2020-08-26 14:50:27 -03:00
Rémi Verschelde
9d8f3496e8
Merge pull request #40443 from SkyLucilfer/PluralsSupport
Added plurals and context support to Translation
2020-08-25 12:11:56 +02:00
Lyuma
0851d6dcdf Fix regression in FBX import caused by Skeleton3D
A change in commit f7fdc87 changed the Skeleton3D "pose" property from PROPERTY_USAGE_EDITOR to PROPERTY_USAGE_NOEDITOR.
This should have had no effect, however it turns out assimp was assigning to the pose property.

This change adjusts the FBX import to only get_bone_rest/set_bone_rest, not set_bone_pose.
2020-08-25 01:17:39 -07:00
George Marques
722be9aaef
GDScript: Don't fail to load constants if they're not a literal
It's still okay as long as it's a constant value. This should already
been validated by the analyzer.
2020-08-24 09:15:33 -03:00
Ignacio Etcheverry
2bd6252e92 C#: Fix 'Parameter toolsPath cannot be null' error 2020-08-24 11:24:08 +02:00
George Marques
ca90c9c9a9
GDScript: Properly resolve external inner classes from preload
This gets the correct parser and class node when resolving from a full
GDScript reference.
2020-08-23 12:55:27 -03:00
George Marques
d36d7e2a1c
GDScript: Use pointer instead of references in cache
They are not supposed to be kept alive and this is cleaner and less
error-prone than unreferencing the elements.
2020-08-23 12:55:27 -03:00
George Marques
58f5c2bab6
Merge pull request #41238 from MarianoGnu/gdscript-export-resource
Fix GdScript Analyzier not detecting Resource subclass correctly
2020-08-23 11:04:52 -03:00
Paulb23
6cdcdbc242 Fix color region end key seach and start key order 2020-08-22 19:55:44 +01:00
Marcel Admiraal
4b14916288 Check and correct for zero scaling when unscaling Bullet basis. 2020-08-22 08:16:13 +01:00
Rémi Verschelde
0559d1001c
Merge pull request #41410 from neikeq/no-bom-on-csproj-creation
C#: Save newly created csproj files without BOM
2020-08-21 02:02:17 +02:00
Rémi Verschelde
ebc194c258
Merge pull request #41409 from neikeq/fix-null-in-msbuild-logger
C#: Fix null exception in our MSBuild logger
2020-08-21 01:58:54 +02:00
Ignacio Etcheverry
b5f6285f34 C#: Save newly created csproj files without BOM 2020-08-21 01:48:56 +02:00
Ignacio Etcheverry
7eed8c5a0c C#: Fix null exception in our MSBuild logger 2020-08-21 01:47:47 +02:00
Ignacio Etcheverry
8bb48ae57a 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.
2020-08-21 01:42:47 +02:00
Rémi Verschelde
eb9cbdc369
Merge pull request #41381 from vnen/gdscript-2-fixes
A few more GDScript fixes
2020-08-19 22:17:44 +02:00
George Marques
a880f590e4
GDScript: Make subscript access be properly type checked 2020-08-19 14:35:26 -03:00
George Marques
846856728b
GDScript: Show error when function return type is missing 2020-08-19 14:09:45 -03:00
George Marques
15b16ec0ce
GDScript: Fix signal parameters not respecting commas 2020-08-19 11:32:48 -03:00
George Marques
cd3f51c67c
GDScript: Check duplicate keys in dictionaries and enums 2020-08-19 11:14:16 -03:00
George Marques
f9ad0b30fa
GDScript: Allow preload() to be used with constant expressions 2020-08-19 10:45:00 -03:00
George Marques
a52e457ada
GDScript: Allow keywords to be used in $ notation 2020-08-19 10:19:05 -03:00
SkyJJ
ce3461dc88 Update GDScriptTranslationParserPlugin to use GDSriptParser instead of RegEx. 2020-08-19 03:10:51 +02:00
SkyJJ
396f2eee82 Update POT generation to handle context and plurals 2020-08-19 03:01:52 +02:00
Rémi Verschelde
f568cede8d
Merge pull request #41362 from neikeq/fix-play-issues-after-ide-play-request
C#: Fix editor unable to play game after IDE PlayRequest
2020-08-19 01:33:59 +02:00
Ignacio Etcheverry
6e7da72648 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.
2020-08-19 00:14:57 +02:00
Rémi Verschelde
9218f0f1b0
Merge pull request #41352 from Calinou/bmp-loader-error-explanations
Add more error explanations in the BMP image loader
2020-08-18 23:22:43 +02:00
George Marques
35176247af
GDScript: Allow enum values to be set to constant expressions
Also allow them to access previous values wihout referencing the enum.
2020-08-18 17:44:20 -03:00
George Marques
99d4ea8c79
GDScript: Allow supertype objects to be assigned to a subtype variable
It allows `get_node()` to be used with typed variables

This is marked as unsafe to warn the user.
2020-08-18 15:12:51 -03:00
Hugo Locurcio
40485e2479
Add more error explanations in the BMP image loader
This closes #32166 and closes #30629.
2020-08-18 19:41:40 +02:00
George Marques
8bc9b3a2ae
GDScript: Allow implicit type conversion when constructing variants
Incidentally fix error message when no valid constructor is found which
was missing an end parenthesis.
2020-08-18 13:12:18 -03:00
George Marques
8088e9e6ac
GDScript: Add script to cache on reload
This ensures that scripts created without a resource loader are properly
included in the cache (such as builtin scripts) and are not tried to be
loaded from the disk.
2020-08-18 11:21:09 -03:00
George Marques
0f9923e67f
GDScript: Allow empty files to be valid scripts 2020-08-17 21:32:49 -03:00
George Marques
3abb3c0d6e
GDScript: Fix crash when superclass file is non-existent
Incidentally, allow EOF to be an end of statement.
2020-08-17 21:30:39 -03:00
George Marques
fda6f3b600
GDScript: Fix LSP getting wrong union value on unnamed enums 2020-08-17 21:10:30 -03:00
George Marques
d06ce2f11e
GDScript: Fix editor crash when writing @tool annotation 2020-08-17 21:02:49 -03:00
George Marques
f374021d52
GDSript: Prevent crash when completing unary operators 2020-08-17 20:49:04 -03:00
George Marques
9ecd042e78
GDScript: Allow "match" to be used as an identifier
This is needed to call the String.match() function.
2020-08-17 20:14:46 -03:00
George Marques
d45e1befe3
GDScript: Fix wrong argument check for formatting operator 2020-08-17 19:49:54 -03:00
Andrii Doroshenko (Xrayez)
6f426c3360 Port ClassDB tests to use doctest
Extracted the most minimal core initialization functionality from
`setup()` and `setup2()` so that `ClassDB` could be tested properly
(input, audio, rendering, physics etc, are excluded).

Display and rendering servers/singletons are not initialized at all.

Due to the fact that most subsystems are disabled, fixed various crashes in the
process (in order):
- `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while
  `register_scene_types()`);
- `make_default_theme` which depends on `RenderingServer`;
- `XRServer` singleton access while calling `register_modules_types()`;
- hidden bug in a way joypads are cleaned up (MacOS and Linux only).

Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`.

ClassDB tests:

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-08-16 16:41:02 +03:00
Mariano Suligoy
a8c01df647 Fix GdScript Analyzier not detecting Resource subclass correctly 2020-08-13 19:46:57 -03:00
Rémi Verschelde
ef607b0137
Merge pull request #41229 from madmiraal/fix-csg
Don't attempt to insert points into degenerate triangles when creating CSG shapes.
2020-08-13 23:19:49 +02:00
Marcel Admiraal
3521239d96 Don't attempt to insert points into degenerate triangles.
Use a simpler degenerate triangle check that calculates area.
2020-08-13 16:23:14 +01:00
George Marques
adc1f95d97
Merge pull request #41224 from ThakeeNathees/fix-ctrl+click-not-working
Fix: ctrl + click not working on script member
2020-08-13 10:25:46 -03:00
Thakee Nathees
c6dc73f9be Fix: ctrl + click not working 2020-08-13 17:35:17 +05:30
Rémi Verschelde
3b3d82f40f
Merge pull request #41199 from madmiraal/fix-38001
Mark the first shape as inside, not the second shape, when CSG shapes are co-planer.
2020-08-13 10:16:33 +02:00
George Marques
9413446b2d
Merge pull request #41104 from vnen/gdscript-assignment-tidy
Tidy up assignment operator check
2020-08-12 08:54:48 -03:00
Marcel Admiraal
5b1e6e35be Mark the first shape as inside, not the second shape, when CSG shapes are
co-planer.
2020-08-12 08:01:02 +01:00
Rémi Verschelde
cf05486d8e
Merge pull request #41055 from snichols/null-callee-fix
Fix crash with null callee
2020-08-11 15:15:43 +02:00
Rémi Verschelde
3044b8f15a
Merge pull request #40935 from hoontee/master-3
Transform CSGShape collision when necessary
2020-08-11 11:58:36 +02:00
Rémi Verschelde
920f8c86ec
Merge pull request #40919 from hoontee/master-2
Properly handle empty CSGCombiners
2020-08-11 11:57:18 +02:00
Paulb23
5cf2cf8646 Fix colour region continuation over blank lines, issue 41120 2020-08-08 15:36:46 +01:00
George Marques
69c81309cc
Merge pull request #40673 from ThakeeNathees/gdscript-op-eval-validation
GDScript operator evaluation validation bug fix
2020-08-08 10:52:40 -03:00
George Marques
1f14068727
Merge pull request #40951 from bruvzg/gds_cleanup
[GDScript] Add static HashMap cleanup.
2020-08-08 10:44:57 -03:00
George Marques
3aef60591b
GDScript: Tidy up assignment operator check
The operator is already gathered by the parser, no need to do it again
in the analyzer.
2020-08-08 10:37:51 -03:00
George Marques
241e709462
Merge pull request #41062 from ThakeeNathees/unsafe-arithmatic-assignment-bug-fix
GDScript: unsafe arithmetic assignment bug fix
2020-08-06 10:51:48 -03:00
Thakee Nathees
38c7d080e8 GDScript: unsafe arithmetic assignment bug fix
Fix: #41051
2020-08-06 11:12:26 +05:30
Stephen Nichols
fbd07bf3bf Adding error message for empty grouping expression 2020-08-05 14:42:33 -05:00
Stephen Nichols
8a13be50ab Fixing null callee crash. 2020-08-05 14:41:46 -05:00
Andrea Catania
6831da630f
Merge pull request #40989 from madmiraal/fix-40739
Reload Bullet space override modifier even when RigidBody is inactive.
2020-08-05 13:54:25 +02:00
Rafał Mikrut
ac1b2da96e Fixes leak when creating bullet shape 2020-08-05 10:04:04 +02:00
George Marques
9adf6d3441
Merge pull request #40690 from ThakeeNathees/arithmetic-assign-type-check-bug-fix
GDScript arithmetic assignment type check bug fix
2020-08-03 09:26:09 -03:00
Hugo Locurcio
c73c327bab
Reference the online documentation in collision layer/mask properties
See https://github.com/godotengine/godot-docs/pull/3863.
2020-08-03 13:58:51 +02:00
Marcel Admiraal
3a05ca9c2b Reload Bullet space override modifier even when RigidBody is inactive. 2020-08-03 11:39:16 +01:00
unknown
561af0c17d Fixed tiny grammar issues in error messages 2020-08-03 14:03:28 +05:30
bruvzg
ee973f5b90
[GDScript] Add static HashMap cleanup. 2020-08-01 22:08:12 +03:00
hoontee
fc8574fbac Transform CSGShape collision when necessary 2020-08-01 01:45:22 -05:00
hoontee
001b6075cb
Properly handle empty CSGCombiners 2020-07-31 10:11:26 -05:00
Rémi Verschelde
ba853f86af
Merge pull request #40903 from Calinou/doc-json
Improve JSON-related documentation
2020-07-31 10:39:56 +02:00
Hugo Locurcio
930e10ffff Improve JSON-related documentation
This closes https://github.com/godotengine/godot-docs/issues/3848.
2020-07-31 09:56:11 +02:00
Rémi Verschelde
9833f9cc11 doc: Fix typo in BBcode tag 2020-07-30 16:24:37 +02:00
Marcel Admiraal
9be7b30f35 Ensure CSG parent's _make_dirty() is called when entering a tree. 2020-07-30 13:34:37 +01:00
SkyJJ
9cd1ef573c Refix GDScriptTranslationParser leak 2020-07-29 23:17:58 +02:00
Rémi Verschelde
fa6cd2cd77
Merge pull request #40838 from Faless/dtls/enet_refuse_fix
Fix crash in ENet changing refuse_new_connections
2020-07-29 18:06:19 +02:00
Fabio Alessandrelli
e5f3159a23 Fix crash in ENet changing refuse_new_connections
When the host is not started.
2020-07-29 17:53:41 +02:00
Rémi Verschelde
157958c77c
Merge pull request #40823 from Calinou/doc-string-split-regex
Document how to perform advanced string splitting using RegEx
2020-07-29 12:42:15 +02:00
Hugo Locurcio
5f2b6bd476 Document how to perform advanced string splitting using RegEx
This closes https://github.com/godotengine/godot-docs/issues/3607.
2020-07-29 12:12:01 +02:00
Lyuma
68566b7bec GDScript: Fix crash caused by inconsistent get_member 2020-07-29 02:56:03 -07:00
Rémi Verschelde
a6916d1f17
Merge pull request #40678 from aaronfranke/string-float64
Make all String float conversion methods be 64-bit
2020-07-28 01:27:34 +02:00
Rémi Verschelde
932b75e247 doc: Sync classref with current source 2020-07-28 01:08:44 +02:00
Aaron Franke
56e2c6c704
Make all String float conversion methods be 64-bit 2020-07-27 18:38:53 -04:00
Rémi Verschelde
4e825539e5
Merge pull request #40762 from SkyLucilfer/PackedSceneLeak
Fix EditorTranslationParser leak
2020-07-28 00:31:46 +02:00
Rémi Verschelde
5f28ab6566
Merge pull request #40771 from Xrayez/scons-verbose-builders
SCons: Refactor running commands through builders
2020-07-28 00:30:55 +02:00
Rémi Verschelde
3edcccafd9
Merge pull request #40777 from Nhiqill/fix_mono_nested_class_reload
Pop from front to avoid infinite loop with nested classes
2020-07-28 00:26:14 +02:00
Andrii Doroshenko (Xrayez)
d86de6c98e SCons: Refactor running commands through builders
A new `env.Run` method is added which allows to control the verbosity
of builders output automatically depending on whether the "verbose"
option is set. It also allows to optionally run any SCons commands in a
subprocess using the existing `run_in_subprocess` method, unifying
the interface. `Action` objects wrap all builder functions to include a
short build message associated with any action.

Notably, this removes quite verbose output generated by `make_doc_header`
and `make_editor_icons_action` builders.
2020-07-28 00:09:21 +03:00
Rémi Verschelde
c845e20add Revert "Allow Area2D and 3D mouse events without a collision layer"
This reverts commit 7eebb06b55.
2020-07-27 22:45:01 +02:00
Nhiqill
42d1b4f389 Pop from front to avoid infinite loop with nested classes 2020-07-27 16:36:56 -04:00
George Marques
04f46aea8d
GDScript: Fix crash on 'await' completion 2020-07-27 17:17:39 -03:00
SkyJJ
0e54ba0486 Fix EditorTranslationParser leak 2020-07-27 17:02:53 +02:00
Rémi Verschelde
3e87022ecc
Merge pull request #40252 from AndreaCatania/flush
Improved Bullet Physics flush algorithm, Lazy collision filter reload, Shape reload regression fix.
2020-07-27 13:57:47 +02:00
Rémi Verschelde
bd9fc75768
Merge pull request #40706 from akien-mga/style-fix-file_format-macos
Fix code format scripts compat with non-GNU Unices
2020-07-27 13:27:56 +02:00
Rémi Verschelde
c71e189efd Style: Fix code format scripts compat with non-GNU Unices
It's too hard to get compatibility between GNU and BSD sed,
so let's just use perl oneliners.

And improve it to also remove trailing tabs, not just spaces.
2020-07-27 13:11:44 +02:00
Rémi Verschelde
3e99059129
Merge pull request #40714 from ThakeeNathees/Object-type-bug-fix
GDScript: "Object" datatype changed from BUILTIN to NATIVE
2020-07-27 08:50:16 +02:00
Andrea Catania
8d0d6d6921 - Enhanced the flush mechanism by flushing only needed thing.
- Flushing Areas before anything else.
- Make sure to correctly fetch gravity when the integrate_forces function is used
- Lazy reload body when layer and mask changes
- Shapes are reloaded just before the physics step starts.
- Improved some other parts of the code.
- Added override keyword
- Using LocalVector
2020-07-27 08:25:47 +02:00
Rémi Verschelde
dc456059a4
Merge pull request #40595 from neikeq/godot-net-sdk-and-net-standard
C#: Switch games to MSBuild Sdks and .NET Standard
2020-07-26 20:47:35 +02:00
Rémi Verschelde
f940e5e000 CI: Install master version of psf/black
Until https://github.com/psf/black/pull/1328 makes it in a stable release,
we have to use the latest from Git.

Apply new style fixes done by latest black.
2020-07-26 19:48:25 +02:00
Rémi Verschelde
33d423e240
Merge pull request #39898 from Meriipu/master_gdscript
GDScript: Clarified/fixed inaccuracies in the built-in function docs.
2020-07-26 17:12:13 +02:00
Rémi Verschelde
c75f4c06f0
Merge pull request #40647 from Xrayez/blank-tabs-fix
Make unsaved scripts in the script editor more user-friendly
2020-07-26 17:11:31 +02:00
Rémi Verschelde
b2096ba53e
Merge pull request #40670 from vnen/remove-multilevel-call
Remove multilevel calls
2020-07-26 17:09:41 +02:00
Rémi Verschelde
94ff5ee535
Merge pull request #40655 from madmiraal/fix-40636
Ensure Bullet HeightMapShape3D data width and depth are at least 2.
2020-07-26 17:09:02 +02:00
Rémi Verschelde
b35be146da
Merge pull request #40720 from Xrayez/modules-tests
Enable support for C++ modules tests
2020-07-26 17:04:41 +02:00
Andrii Doroshenko (Xrayez)
60f53140b8 Enable support for C++ modules tests
Modules-specific tests can be written under respective module folders.
Each module should have "tests" folder created with the tests implemented
as `doctest` headers, so they can be collected by the buildsystem and
included directly in `tests/test_main.cpp` to be compiled.
2020-07-26 17:41:46 +03:00
Andrii Doroshenko (Xrayez)
7247247522 Make unsaved scripts in the script editor more user-friendly
Unsaved scripts were previously displayed with blank tabs, which are
mostly a result of deleted or improperly moved scripts.

This patch makes sure that those kind of scripts are displayed as
"[unsaved]" now, and ensures that scripts are removed from the list
while deleting scripts from the filesystem dock preventing the unsaved
tabs to appear in the first place (a user is already prompted with
"no undo" warning while deleting any file).

A user is always prompted to save those "[unsaved]" scripts if they
attempt to close them without saving in any case except as described
above.
2020-07-26 16:05:44 +03:00
Rémi Verschelde
5700429e4e
Merge pull request #33760 from nekomatata/script-editor-init-optimization
Optimized ScriptEditor initialization when many scripts are loaded
2020-07-26 14:05:56 +02:00
Thakee Nathees
194c2aa7e2 GDScript: "Object" datatype changed from BUILTIN to NATIVE
Fix: #40656
2020-07-26 08:00:55 +05:30
Thakee Nathees
5ba46ddf8e GDScript arithmetic assignment type check bug fixed
Fix: #40686
2020-07-26 06:46:13 +05:30
Sergey Minakov
66be375eb0 Modules: update modules to be built for iOS
Using 'available' checks to fix deprecation compilation errors
Additional checks for simulator
2020-07-25 21:55:15 +02:00
Meriipu
7f9bfee0ac 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.
2020-07-25 20:26:02 +02:00
Ignacio Etcheverry
ced77b1e9b C#: Switch games to MSBuild Sdks and .NET Standard
Godot.NET.Sdk
-------------

Godot uses its own custom MSBuild Sdk for game
projects. This new Sdk adds its own functionality
on top of 'Microsoft.NET.Sdk'.

The new Sdk is resolved from the NuGet package.

All the default boilerplate was moved from game
projects to the Sdk. The default csproj for
game project can now be as simple as:

```
<Project Sdk="Godot.NET.Sdk/4.0.0-dev2">
  <PropertyGroup>
    <TargetFramework>netstandard2.1</TargetFramework>
  </PropertyGroup>
</Project>
```

Source files are included by automatically so
Godot no longer needs to keep the csproj in sync
when creating new source files.

Define constants
----------------

Godot defines a list of constants for conditional
compilation. When exporting games, this list also
included engine 'features' and platform 'bits'.
There were a few problems with that:

- The 'features' constants were only defined when
  exporting games. Not when building the game for
  running in the editor player.
- If the project was built externally by an IDE,
  the constants wouldn't be defined at all.

The new Sdk assigns default values to these
constants when not built from the Godot editor,
i.e.: when built from an IDE or from the command
line. The default define constants are determined
from the system MSBuild is running on.

However, it's not possible for MSBuild to
determine the set of supported engine features.
It's also not possible to determine if a project
is being built to run on a 32-bit or 64-bit
Godot executable.

As such the 'features' and 'bits' constants had
to be removed.
The benefit of checking those at compile time
was questionable, and they can still be checked
at runtime.

The new list of define constants includes:

- GODOT
- GODOT_<PLATFORM>
  Defaults to the platform MSBuild is running on.
- GODOT_<PC/MOBILE/WEB>
- TOOLS
  When building with the 'Debug' configuration
  (editor and editor player).
- GODOT_REAL_T_IS_DOUBLE
  Not defined by default unless $(GodotRealTIsDouble)
  is overriden to be 'true'.

.NET Standard
-------------

The target framework of game projects was changed
to 'netstandard2.1'.
2020-07-25 19:22:01 +02:00
Thakee Nathees
04dfb78d23 GDScript operator evaluation validation bug fix
Fix: #40665
2020-07-24 23:32:29 +05:30
George Marques
2b9d9bc364
Remove multilevel calls
In general they are more confusing to users because they expect
inheritance to fully override parent methods. This behavior can be
enabled by script writers using a simple super() call.
2020-07-24 14:13:58 -03:00
George Marques
e6b44b93c3
GDScript: Allow "new()" to be called in non-static functions 2020-07-24 13:45:23 -03:00
Marcel Admiraal
236857c92a Ensure Bullet HeightMapShape3D data width and depth are at least 2. 2020-07-24 13:40:26 +01:00
Rémi Verschelde
3811fb919e
Merge pull request #40598 from vnen/gdscript-2.0
GDScript 2.0 (again)
2020-07-24 01:04:57 +02:00
mega-bit
0ca96ae2c1 Fix typos in GodotSharp code docs 2020-07-22 22:46:04 +02:00
Rémi Verschelde
9a586defed VisualScript: Fix -Wduplicate-branches warning
When VSDEBUG is a no-op (default), those branches did the same (nothing).
2020-07-22 16:57:28 +02:00
George Marques
a0f54cb95e
Wrap up GDScript 2.0 base implementation 2020-07-22 11:07:51 -03:00