Commit graph

3147 commits

Author SHA1 Message Date
Rémi Verschelde d15090e275
Merge pull request #30909 from Kaligule/patch-1
Add a reference to pow to the description of exp.
2019-07-30 00:06:30 +02:00
Rémi Verschelde adffd9aaef
Merge pull request #30935 from YeldhamDev/gdnative_plugin_fix
Fix 'GDNativeLibrary' editor being incorrectly opened
2019-07-29 21:38:37 +02:00
Rémi Verschelde baa1d0c3d0
Merge pull request #30923 from NilsIrl/better_dropdown
Improve platform selection in the GDNativeLibrary dock
2019-07-29 21:38:21 +02:00
Michael Alexsander Silva Dias 147990cb6d Fix 'GDNativeLibrary' editor being incorrectly opened 2019-07-29 15:05:49 -03:00
Rémi Verschelde b90ef52ece Find trailing whitespace and indentation in gdnative_api.json 2019-07-29 18:48:21 +02:00
Kaligule a2c81a7455 Add a reference to pow to the description of exp.
This might be especially usefull since godot script doesn't support ** or ^ as operators, so beginners might search for the exponential function, when what they really need is the pow function.

This is exactly what happened to me and since I couldn't find helpfull information in the documentation I had to look it up online, where I found the answer on a helpfull [reddit thread](https://www.reddit.com/r/godot/comments/3mvwz0/how_do_i_do_exponents_in_godot/).

@akien-mga told me how to reference methods here:
godotengine#30909
2019-07-29 18:17:52 +02:00
NilsIrl d69409338b Improve platform selection in the GDNativeLibrary dock
* Replace button text with currently selected platforms
* Expand button size horizontally
2019-07-29 14:54:08 +02:00
Rémi Verschelde d06da7193d
Merge pull request #30869 from NilsIrl/#30841
Replace radion buttons with checkboxes in GDNativeLibrary editor
2019-07-29 10:11:56 +02:00
Aaron Franke 7dbbb5eac7
[Mono] Deprecate Set methods
These silently fail, so they should be removed. I accidentally added most of these last year, trying to make everything else consistent with Quat, sorry!

Also, a few tiny nitpicking changes are included, like whitespace and misspellings.
2019-07-28 17:49:22 -04:00
Fabio Alessandrelli d6c9b377b9 Fix WebSocketClient crash when unref during signal
Always call disconnect before emitting signals, to avoid calling it on a
freed object if the user decides to unreference it in a signal.
2019-07-28 15:23:20 +02:00
NilsIrl ba63e0a5a2 Replace radion buttons with checkboxes in GDNativeLibrary editor 2019-07-27 16:46:14 +02:00
Rémi Verschelde 1107799de5
Merge pull request #30849 from bojidar-bg/7898-mixed-indentation
Disallow using of both tabs and spaces for indentation in the same file
2019-07-27 10:48:31 +02:00
Ignacio Etcheverry d54df7b904 C#: Fix Transform2D.AffineInverse() 2019-07-27 02:15:29 +02:00
Bojidar Marinov f12f3cf726
Disallow using of both tabs and spaces for indentation in the same file
Closes #7898
2019-07-26 21:24:34 +03:00
Rémi Verschelde 140e7e5edf
Merge pull request #30788 from Chaosus/direction_to_gdnative
Added Vector2/3.direction_to methods to GDNative
2019-07-26 18:58:25 +02:00
Ignacio Roldán Etcheverry 6697ad2c4f
Merge pull request #30842 from neikeq/fix-custom-props-msbuild
Mono: Fix custom defines for Mono's MSBuild; remove xbuild
2019-07-26 18:33:52 +02:00
Ignacio Etcheverry 8821569689 Mono: Fix custom defines for Mono's MSBuild; remove xbuild
Mono's MSBuild and System/VisualStudio's MSBuild expect a different format for surrounding property values with quotes on the command line.

xbuild does not seem to support semicolons in property values from the command line: https://xamarin.github.io/bugzilla-archives/16/16465/bug.html
It's a good time to just remove xbuild support entirely.
2019-07-26 17:17:17 +02:00
Ignacio Roldán Etcheverry a82420fbe8
Merge pull request #30825 from neikeq/heya
Fix incorrectly updating csproj and not closing build issues file
2019-07-26 16:54:11 +02:00
Ignacio Etcheverry 4e84478f4e Fix incorrectly updating csproj and not closing build issues file 2019-07-25 21:06:40 +02:00
Ignacio Roldán Etcheverry 3a68b24171
Merge pull request #30820 from neikeq/issue-28394
Mono: Don't try to update project assemblies from project manager
2019-07-25 19:00:10 +02:00
Ignacio Etcheverry c9befa63d2 Mono: Don't try to update project assemblies from project manager
Previously, when running the project manager, we would try to load the API assemblies from the project and fail because we were not editing any project. This would make us try to copy the prebuilt API assemblies to the project. Since there is no project, it would try to copy them to the executable location. This would fail if Godot doesn't have permissions to write to that location.
This commit fixes that by instead trying to load the prebuilt API assemblies in the first place, if running the project manager.
2019-07-25 17:52:45 +02:00
Rémi Verschelde 1481d299ea
Merge pull request #30776 from akien-mga/editor-configurable-float-step
Inspector: Make default float step configurable
2019-07-25 10:33:45 +02:00
Rémi Verschelde 336846e547 Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
This was a regression in 3.1 and later from the new inspector, where
PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to
be a normal PROPERTY_HINT_RANGE which also automatically increments its
value when keyed in the animation player.

To avoid code duplication, I made the frames properties use the actual
PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS
usage flag instead.
2019-07-25 09:29:51 +02:00
Ignacio Etcheverry c0cdbb7938 Mono: Fix regression: external editors not working on Windows 2019-07-24 23:19:24 +02:00
Ignacio Etcheverry 513cc78f85 Mono: Add option to keep running after unhandled exceptions
By default, an unhandled exception will cause the application to be terminated; but the project setting `mono/unhandled_exception_policy` was added to change this behaviour.
The editor is hard-coded to never terminate because of unhandled exceptions, as that would make writing editor plugins a painful task, and we cannot kill the editor because of a mistake in a thirdparty plugin.
2019-07-24 23:19:15 +02:00
Chaosus bf237f651c Added direction_to to GDNative 2019-07-24 11:16:20 +03:00
Rémi Verschelde aa062c54fc
Merge pull request #25090 from Chaosus/string_count
Added String.count method
2019-07-24 08:32:42 +02:00
Michael Alexsander Silva Dias 12ae7a4c02 Update some dead links in the codebase 2019-07-23 21:06:12 -03:00
Chaosus 080c0bb7fe Added count method to String 2019-07-23 18:55:54 +03:00
Rémi Verschelde d844e30614 Inspector: Make default float step configurable
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).

Supersedes #25470.
Partial fix for #18251.
2019-07-23 17:31:38 +02:00
Rémi Verschelde 4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde 77724fde60 Fix type mismatch in iOS interface orientation checks
Not sure why this error popped up when I enabled C++11 on the codebase,
but I guess this should fix it.
2019-07-22 20:31:15 +02:00
Rémi Verschelde 5dae2ea777 SCons: Enable C++11 on the whole codebase
**Important:** This does not mean *yet* that C++11 features should be used
in contributions to Godot's codebase.

For now this change is done solely for feature branches working on Vulkan
support and GDScript typed instruction sets for Godot 4.0, which will both
use C++11 features and are based on the master branch.

The plan is to start porting the codebase to C++11 after Godot 3.2 is
released, following upcoming guidelines on the subset of new features that
should be used, and when/how to use them.

We will advertise clearly when C++11 contributions are open, especially
once we start a coordinated effort to port Godot's massive codebase. In the
meantime, please bear with us and good ol' C++03. :)
2019-07-22 17:17:30 +02:00
Rémi Verschelde 66d09a6b4c SCons: Fix uses of [].append instead of env.add_source_files()
Also added support for SCons project-absolute paths (starting with #) and
warning about duplicates in add_source_files(), and fixed
default_controller_mappings.gen.cpp being included twice after first build
due to *.cpp globbing.

Part of #30270.
2019-07-22 15:08:32 +02:00
Rémi Verschelde 07e289963c doc: Sync classref with current source 2019-07-22 12:27:52 +02:00
Ignacio Etcheverry 0197d86ab4 Mono: Fix editor API assembly not being updated
If both the core and editor API assemblies are missing or out of sync, Godot will only update the former and then abort when trying to load them again because the latter was not updated. Godot will update it correctly the next time it's started, but this should not be needed and it should work the first time. This commit fixes that.
2019-07-22 00:16:24 +02:00
Ignacio Roldán Etcheverry 4379395892
Merge pull request #30710 from neikeq/issue-30526
Fix mono module build errors for release templates
2019-07-20 16:20:49 +02:00
Ignacio Etcheverry ec679dfffa Fix mono module build errors for release templates 2019-07-20 15:52:26 +02:00
Rémi Verschelde 60efd67034
Merge pull request #30693 from Chaosus/lerp_angle
Added lerp_angle built-in function
2019-07-20 13:37:13 +02:00
Rémi Verschelde e466dc2daa
Merge pull request #30698 from Anutrix/assimp-pass-by-ref
Changed large const string values to const string ref in some assimp functions
2019-07-20 12:06:58 +02:00
Rémi Verschelde d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
Chaosus 6694c119d0 Added lerp_angles built-in function
Co-authored-by: Xrayez <https://github.com/Xrayez>
Co-authored-by: DleanJeans <https://github.com/DleanJeans>
2019-07-20 12:59:41 +03:00
qarmin 6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
unknown 1b4d3f7d56 Changed large const string values to string ref in some assimp functions 2019-07-20 00:53:21 +05:30
Ivan Hilaire 5d88f74677 Remove added pluginscript resource format loaders and savers on cleanup
Properly release added resource loader and save references. Otherwise PluginScript API
may cause "ObjectDB Instances still exist!" warnings and segmentation faults on exit.
2019-07-19 22:13:44 +03:00
Rémi Verschelde f796779f7c
Merge pull request #23310 from aaronfranke/posmod-int
Add integer posmod and rename default arg names
2019-07-19 15:07:49 +02:00
K. S. Ernest (iFIre) Lee bdf54a7f9e Visualscript: Add types for base type get and set. 2019-07-19 00:04:46 -07:00
Aaron Franke a60f242982 Add integer posmod and rename default arg names
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator.

I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
2019-07-18 16:33:43 -04:00
Rémi Verschelde 950153757b
Merge pull request #30648 from NilsIrl/useless_casts
Remove useless casts to String
2019-07-18 09:34:55 +02:00
Bojidar Marinov 8336590154
Fix stack underflows when yielding twice
Also, refactor GDScriptFunctionState::_signal_callback, removing some excessive repetition.
Fixes #30269.
2019-07-17 23:48:49 +03:00
Andrii Doroshenko (Xrayez) 422a8ffe02 Fix BMP loader to distinguish between compression types
Some of the values in compression enumeration represent uncompressed formats:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57

This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.
2019-07-17 20:28:35 +03:00
Nils ANDRÉ-CHANG 074115338e Remove useless casts to String 2019-07-17 11:31:42 +01:00
Andrii Doroshenko (Xrayez) d5c5aabbf2 Fix BMP loader incorrectly interpreting color table size
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.
2019-07-17 01:43:33 +03:00
Rémi Verschelde 7b1ee28a03
Merge pull request #30567 from NilsIrl/static_func_inside_class
Show static functions inside classes in method list
2019-07-16 08:53:02 +02:00
Rémi Verschelde efd55631e2 doc: Sync classref with current source 2019-07-15 20:45:30 +02:00
Nils ANDRÉ-CHANG 9e3455cb1e Show static functions inside classes in method list 2019-07-15 17:16:57 +01:00
Rémi Verschelde 75f2575f28
Merge pull request #30552 from kawa-yoiko/match-unreachable
Fix unreachable code detection in match statements
2019-07-15 08:13:57 +02:00
Ignacio Roldán Etcheverry 7f3490c5e1
Merge pull request #30584 from neikeq/yatta
Mono: Better handling of missing/outdated API assemblies
2019-07-14 19:39:26 +02:00
Ignacio Etcheverry e59ac40712 Mono: Better handling of missing/outdated API assemblies
Remove the old API assembly invalidation system. It's pretty simple since now the editor has a hard dependency on the API assemblies and SCons takes care of prebuilding them.
If we fail to load a project's API assembly because it was either missing or outdated, we just copy the prebuilt assemblies to the project and try again. We also do this when creating the solution and before building, just in case the user removed them from the disk after they were loaded.
This way the API assemblies will be always loaded successfully. If they are not, it's a bug.

Also fixed:

- EditorDef was behaving like GlobalDef in GodotTools.
- NullReferenceException because we can't serialize System.WeakReference yet. Use Godot.WeakRef in the mean time.
2019-07-14 19:17:07 +02:00
Shiqing 206d515783 Fix unreachable code detection in match statements 2019-07-13 19:31:49 +08:00
Rémi Verschelde eb98c5e047
Merge pull request #30129 from fire/xatlas_update
[WIP] Update xatlas to latest upstream commit (1efe581).
2019-07-11 19:44:55 +02:00
unknown f236b460e5 Some small fixes to warnings in python scripts 2019-07-11 22:26:04 +05:30
Ignacio Etcheverry 4061e132ff Mono: Add old TTRs to GodotTools 2019-07-11 13:59:06 +02:00
Rémi Verschelde 518e23424e pcre2: Update to upstream version 10.33 2019-07-11 10:35:39 +02:00
Ignacio Roldán Etcheverry 2c6daf73f3
Merge pull request #30502 from neikeq/chotto-matte-kudasai
Mono: Fix Api HintPath and update old game projects
2019-07-10 22:36:06 +02:00
Ignacio Roldán Etcheverry 1700ab9bc6
Merge pull request #30501 from neikeq/dispose-godotsharpexport
Mono: Fix null dereference in EditorExportPlatformAndroid
2019-07-10 22:35:54 +02:00
Ignacio Etcheverry 9eb0729a05 Mono: Fix Api HintPath and update old game projects
Fixed Api assembly references with more than one HintPath.
Also made the editor update old C# projects use the new Api assembly HintPaths.
2019-07-10 22:00:31 +02:00
Ignacio Etcheverry 2a8294ff24 Mono: Fix null dereference in EditorExportPlatformAndroid
We need to dispose the GodotSharpExport export plugin before the editor destroys EditorSettings. Otherwise, if the GC disposes it at a later time, EditorExportPlatformAndroid will be freed after EditorSettings already was, and its device polling thread will try to access the EditorSettings singleton, resulting in null dereferencing.
2019-07-10 21:51:47 +02:00
Ignacio Roldán Etcheverry c3da4f854d
Merge pull request #30486 from neikeq/fix-indexoutofbounds-msbuildfinder
Fix IndexOutOfBounds in FindMsBuildToolsPathOnWindows
2019-07-10 21:43:17 +02:00
Rémi Verschelde 34d7484039
Merge pull request #30455 from qarmin/const_reference
Pass by reference to const
2019-07-10 15:43:15 +02:00
Ignacio Roldán Etcheverry 8b778f6234
Merge pull request #30489 from neikeq/fix-nullexc-on-gengameproj
Mono: Fix null exception in GenerateGameProject
2019-07-10 15:40:25 +02:00
Ignacio Etcheverry caf20492cf Mono: Fix null exception in GenerateGameProject
Also fix pdb files for GodotTools.*.dll assemblies not being copied to the output directory.
2019-07-10 15:03:05 +02:00
Ignacio Roldán Etcheverry 63c4d5af72
Merge pull request #30485 from neikeq/remove-frameworkpathoverride-from-scons
SCons no longer passes FrameworkPathOverride to MSBuild
2019-07-10 13:35:40 +02:00
Ignacio Etcheverry ace0c6ce38 Fix IndexOutOfBounds in FindMsBuildToolsPathOnWindows 2019-07-10 13:30:03 +02:00
Ignacio Etcheverry c0a4f12fcc SCons no longer passes FrameworkPathOverride to MSBuild 2019-07-10 13:19:52 +02:00
Ignacio Etcheverry 2da83a278b Mono: Add missing GodotTools.sln 2019-07-10 12:30:12 +02:00
qarmin 01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
K. S. Ernest (iFire) Lee d81d29dcbf Update xatlas to b7d7bb. 2019-07-09 15:24:10 -07:00
Ignacio Etcheverry d3f48f88bb Fix EditorNavigationMeshGenerator registered in Core API
Also added an option to output a json file with all the ClassDB registered classes and its members. This can be used to compare the API of two different builds by a simple diff.
2019-07-09 23:33:29 +02:00
Rémi Verschelde d2e620b8fc
Merge pull request #30463 from neikeq/fix-search-dirs
Fix export templates ignoring assemblies in 'res://.mono/assemblies'
2019-07-09 21:59:32 +02:00
Ignacio Etcheverry 4af03e52bd Make SCons check for System MSBuild before Mono's 2019-07-09 16:49:06 +02:00
Ignacio Etcheverry df6d1656fe Fix export templates ignoring assemblies in 'res://.mono/assemblies' 2019-07-09 16:49:02 +02:00
Rémi Verschelde 2fd902a08f
Merge pull request #30438 from Calinou/use-color-constructors
Use base `Color()` constructors instead of `Color::html()`
2019-07-09 08:30:10 +02:00
Rémi Verschelde dcffa0ee64
Merge pull request #30434 from Faless/ws/wslay_fix_handshake_break
Fix WebSocketClient consuming data during hanshake
2019-07-09 08:28:01 +02:00
Rémi Verschelde 29ca79bd68
Merge pull request #30428 from neikeq/gitcheckout-b
Misc Mono Fixes
2019-07-09 08:26:48 +02:00
Hugo Locurcio 28d3a6051c
Use base Color() constructors instead of Color::html()
This results in slightly smaller binaries (-17 KB for an editor binary)
as no strings need to be allocated.
2019-07-08 21:17:10 +02:00
Fabio Alessandrelli 3e305ea036 Fix WebSocketClient consuming data during hanshake
Was missing a break of the while loop on connection.
This potentially caused early data frames to be trashed.
2019-07-08 19:24:27 +02:00
Ignacio Etcheverry 069af23bdb Mono: Fix build errors with tools=no 2019-07-08 18:07:20 +02:00
Ignacio Etcheverry dd22cc7527 C#: Fix some crashes during assemblies reloading 2019-07-08 18:07:20 +02:00
Ignacio Etcheverry aa3b8f7dbb Fix Godot.Object.ToString() infinite recursion
Should not be using Variant to String conversion as that would call ToString() again
2019-07-08 18:07:20 +02:00
Ignacio Etcheverry 5ed3d34cd9 Fix --generate-mono-glue bug when directory doesn't exist
DirAccess::get_full_path(path) only works if the path exists. Implement our own abspath function.
2019-07-08 18:07:15 +02:00
Ignacio Etcheverry 2c83255013 Fix C# bindings detection of abstract classes
ClassDB::can_instance was changed recently breaking our code, as the editor is not yet initialized. Check ClassInfo::creation_func directly.
2019-07-08 15:13:57 +02:00
Ignacio Etcheverry b0cbf4e2b2 Fix InvalidCastException when loading script metadata
Old value wasn't string so we have to keep that in mind
2019-07-08 15:12:04 +02:00
Rémi Verschelde 9da5fdc955
Merge pull request #30419 from Faless/ws/wslay_server_proto
(Re-)Implement subprotocols in websocket server.
2019-07-08 08:18:00 +02:00
Rémi Verschelde af80182016
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
Fabio Alessandrelli 11452dcf91 (Re-)Implement subprotocols in websocket server. 2019-07-08 07:48:26 +02:00
qarmin 9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Remi Rampin ddfd67401f DOC: Fix spelling
See also https://github.com/godotengine/godot-docs/pull/2595
2019-07-06 16:54:01 -04:00
Rémi Verschelde ba211bd58c
Merge pull request #30352 from bojidar-bg/28727-enum-value-check
Fix parsing of enums allowing for juxtaposed identifiers
2019-07-06 20:28:53 +02:00