Commit graph

3264 commits

Author SHA1 Message Date
Rémi Verschelde 40a9cc66a9
Merge pull request #31871 from aaronfranke/equal-approx-inf
Check for exact equality before approximate equality
2019-09-03 12:00:56 +02:00
Bojidar Marinov 3ca7b4ee45
Fix uninitialized arrays and dictionaries retaining value
Fixes #28978
2019-09-03 10:39:04 +03:00
Rémi Verschelde 10b040ab20
Merge pull request #31893 from bojidar-bg/25081-gdscript-index-self
Re-allow indexing on objects and other non-builtin types
2019-09-02 20:25:14 +02:00
Rémi Verschelde 85955c5f25
Merge pull request #31843 from 2shady4u/parserCtrlClick
Solves ctrl+click on functions by ignoring the cursor
2019-09-02 19:56:35 +02:00
Bojidar Marinov e3d05fa42d
Re-allow indexing on "self" and object types in GDScript
Fixes #25081
2019-09-02 20:18:15 +03:00
Rémi Verschelde eb38bc6c0a gdscript: Fix build after #24925
The PR did not use the ScriptCodeCompletionOption system introduced
later on, and somehow this did not generate a merge conflict even
though neighboring code was changed.
2019-09-02 16:31:43 +02:00
Rémi Verschelde 877912b23c
Merge pull request #24925 from Mr-Slurpy/typed-autoload
Added autoloads as a potential type.
2019-09-02 16:05:05 +02:00
Rémi Verschelde d767edb9b3
Merge pull request #21443 from deepmax/ord_function
Add ord() function to return Unicode code point of a string of length one
2019-09-02 15:28:15 +02:00
shaderbeast dbd253d7a2 Solves ctrl+click on functions by ignoring the cursor
Obeyed CLANG format rules


Obeying CLANG format rules attempt 2


Obeying CLANG format rules attempt 3


Clean up


Fixed runaway while loop


Removed int initialization
2019-09-02 13:46:38 +02:00
Hugo Locurcio 7e01986ce1
Make JSONRPC constants uppercase for consistency with other classes 2019-09-01 23:48:38 +02:00
Rémi Verschelde 7dceba3afc
Merge pull request #31587 from RevoluPowered/feature/fbx-importer
FBX Importer
2019-09-01 22:14:17 +02:00
Gordon MacPherson ad214c0356 Assimp FBX Import support
Issues fixed:
- Updated assimp to latest and backported fixes into godot.
- Fixed file scale being ignored from FBX file.
- Fixed bone removal
- Implemented proper armature binding
- Fixed recursion not always going through the entire path
- Implemented assimp global scaling system
- Fixed assimp global scale process to support unit conversion
- Implemented proper fbx scaling
- Fixed asserts caused by missing faces in some models which could crash
- Fixed valid bone removal
- Fixed root node being overwriten by assimp which caused data loss
- Fixed armature construction so that it works with multiple roots
- Implemented basic support for FBX standard materials
- Refactoring to improve code quality and improve function reuse.
- Simplified node creation from assimp scene into subsections: create_light, create_mesh, create_bone.
- Creating meshes is now done after hierarchy is created so that the skeleton is always available.
- Added support to assimp to support file scale in all formats which call SetFileScale.
- Many other fixes provided into assimp.

Known issues:
- FBX pivots from Maya do not currently work. (workaround: for now use blender import and export to remove pivot tracks)
- Hierarchy creates an extra node for each mesh - this was done intentionally but we intended to do a pass to remove these as they're a required node.
- When an animated mesh has not executed any animation the rest pose is wrong.

Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2019-09-01 19:08:34 +01:00
Aaron Franke f8b4cf0fc4
Check for exact equality before approximate equality 2019-09-01 14:02:14 -04:00
Chaosus89 8fd8589547 Fix resizer icon visiblity on light theme in GraphNode 2019-09-01 09:12:26 +03:00
Ignacio Etcheverry 5a6070dde3 Mono: Force preemptive thread suspend mode as a temporary workaround 2019-08-30 01:33:50 +02:00
Rémi Verschelde a5e0aa32d9
Merge pull request #31770 from neikeq/supercedes-31008
Fix GodotTools.ProjectEditor HintPaths for referenced packages
2019-08-29 21:16:49 +02:00
Ignacio Etcheverry 6d2883c9bf Fix GodotTools.ProjectEditor HintPaths for referenced packages 2019-08-29 18:19:01 +02:00
Rémi Verschelde 65d61d0360 doc: Sync classref with current source 2019-08-29 15:33:52 +02:00
Thomas Karcher 02ed79f7f7
Updated description for "stepify"
Mentioned the possibility to use stepify as a rounding function; +code examples
2019-08-29 14:03:18 +02:00
Rémi Verschelde b97169740e
Merge pull request #31741 from akien-mga/lsp-requires-websocket-jsonrpc
GDScript: Disable LSP if either jsonrpc or websocket are disabled
2019-08-29 08:37:40 +02:00
Rémi Verschelde 7995ce03f3
Merge pull request #31738 from bojidar-bg/31056-class_name-extends
Remove check for class_name and extends order
2019-08-29 08:33:51 +02:00
Rémi Verschelde 65d1b0b427
Merge pull request #31729 from aaronfranke/mono-color
[Mono] Various Color fixes and improvements
2019-08-28 21:29:47 +02:00
Masoud Montazeri 5565f5591f Add ord() function to return Unicode code point of a string of length one 2019-08-28 16:14:11 +02:00
Rémi Verschelde 4a6b445a93
Merge pull request #31728 from fire/improve-uvatlas
Tweak xatlas and import new version b4b5426
2019-08-28 15:46:58 +02:00
Rémi Verschelde b791efdb16
Merge pull request #31737 from bojidar-bg/31455-stack-underflow
Fix yield check in GDScriptFunction
2019-08-28 15:36:08 +02:00
Rémi Verschelde 4aed4b44b6
Merge pull request #31454 from lliberadzki/gridmap-navmesh-baking
Support baking gridmap navmesh.
2019-08-28 15:29:54 +02:00
Rémi Verschelde b994124df3 GDScript: Disable LSP if either jsonrpc or websocket are disabled
Follow-up to #29780.
2019-08-28 13:29:37 +02:00
Rémi Verschelde 46ad60385b
Merge pull request #29780 from GodotExplorer/gdscript-lsp
Add Language Server Protocol for GDScript
2019-08-28 13:06:51 +02:00
Bojidar Marinov b70b16a20f
Remove check for class_name and extends order
Closes #31056
2019-08-28 12:05:21 +03:00
Bojidar Marinov 112aa6e367
Fix yield check in GDScriptFunction
Fixes #31455
2019-08-28 11:15:43 +03:00
K. S. Ernest Lee c3c805aff8 Tweak xatlas and import new version b4b5426
* Avoid xatlas crash
* Enable alignment and disable bruteforce for speedups
* Update xatlas to b4b5426
* Delete old patches
2019-08-28 01:12:56 -07:00
Rémi Verschelde 538328898b Style: Fix copyright headers in new files 2019-08-28 09:19:52 +02:00
Rémi Verschelde 185072015f
Merge pull request #31606 from toasteater/fix/nativescript-new-json-return-type
Fix the return type of NativeScript::new in API json
2019-08-28 09:15:40 +02:00
Michael Alexsander Silva Dias a8826ad3b8 Make 'break' and 'continue' be marked as safe 2019-08-27 23:10:33 -03:00
Aaron Franke 34ab6549b1
[Mono] Various Color improvements
I also slid in a fix to C++ Vector3 > and >=
2019-08-27 22:05:18 -04:00
Rémi Verschelde 92ead83913 Mono: Fix OSX build due to invalid function call 2019-08-27 09:48:54 +02:00
Rémi Verschelde 1cea44de19
Merge pull request #31607 from Calinou/improve-gdscript-messages
Improve writing style in GDScript error/warning messages
2019-08-26 21:58:33 +02:00
toasteater e2121c97ae Make VarArg methods return types show up as Variant in API json
VarArg methods have the return type Object in the API json for GDNative. This
can cause undefined behavior in some language bindings due to lack of
documentation on VarArg methods' behavior.

This changes the MethodInfo of:

- CSharpScript::_new
- GDScript::_new
- PluginScript::_new
2019-08-26 16:36:51 +00:00
Ignacio Roldán Etcheverry be99e7b68f
Merge pull request #31680 from neikeq/fix-android-gen-sources
Fix 'android_mono_config.gen.cpp' not compiled first time it's generated
2019-08-26 18:28:12 +02:00
Ignacio Etcheverry aa805e2699 Fix 'android_mono_config.gen.cpp' not compiled first time it's generated 2019-08-26 17:46:57 +02:00
Rémi Verschelde 57afa90f0c
Merge pull request #31652 from Calinou/csharp-alpha-dialog-android
Mention Android support in the C# alpha dialog message
2019-08-26 10:18:27 +02:00
Ignacio Etcheverry 3af8bd071e Set C# 7 as LangVersion for GodotTools and Godot API projects
This will make it harder for someone to accidentally commit code that requires a newer version.
2019-08-25 15:53:47 +02:00
Hugo Locurcio 27f5ab2d7b
Mention Android support in the C# alpha dialog message 2019-08-25 15:08:32 +02:00
lamonte 1df0e88ae8 default is only supported by 7.1, reverted to support 7.0 out of the box (no conflict) 2019-08-25 06:48:37 -05:00
Hugo Locurcio a4794af5df
Improve writing style in GDScript error/warning messages
This uses double quotes everywhere for consistency.
2019-08-23 20:55:50 +02:00
Rémi Verschelde 51d50e167d
Merge pull request #31094 from aaronfranke/vector-sign-mod-etc
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-23 09:07:47 +02:00
Rémi Verschelde ccf294b92f
Merge pull request #31566 from Faless/ssl/fix_custom_cert
Fix StreamPeerSSL connect_to_stream w/ custom cert.
2019-08-22 20:44:20 +02:00
Fabio Alessandrelli 17d5b471b9 Better error handling in SSLContext, Crypto 2019-08-22 16:49:11 +02:00
Fabio Alessandrelli 99f657d89f Fix StreamPeerSSL connect_to_stream w/ custom cert
Follow up on #29871.
Was checking the wrong parameter, causing the code to ignore provided
stream-specific SSL certificate.
2019-08-22 16:42:37 +02:00
Ignacio Etcheverry dae2a335c5 Make sure '.mono/metadata/' exists before creating file
Fixes #31549
2019-08-22 14:32:55 +02:00
Fabio Alessandrelli b223b207c4 Fix regression in StreamPeerSSL
Validate that base stream is valid before accepting/connecting.
Also remove unnecessary includes.
2019-08-22 00:14:01 +02:00
Rémi Verschelde 22df2b79b6
Merge pull request #30851 from TheDevelo/webrtc-buffer
Allow setting buffer size of WebRTCDataChannel
2019-08-21 21:17:48 +02:00
Robert Fuchs 5f9ed1979d Allow setting buffer size of WebRTCDataChannel 2019-08-21 13:27:56 -05:00
Rémi Verschelde 99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
Fabio Alessandrelli ce5a3f56a6 Rewrite StreamPeerSSL with SSLContext helper class
connect_to_stream now accepts optional parameter to specify which
certificates to trust.
Implement accept_stream (SSL server) with key/cert parameters to specify
the RSA key and X509 certificate resources.
2019-08-21 16:59:38 +02:00
Fabio Alessandrelli dd8107caa4 New CryptoMbedTLS Crypto implementation.
Allows random bytes, RSA keys, and X509 certificates generation.
2019-08-21 16:59:38 +02:00
Rémi Verschelde a8db4c848d
Merge pull request #31395 from ptrojahn/floatsarenasty
Replace is_zero_approx(A.distance_to(B)) with A==B
2019-08-20 12:54:40 +02:00
Rémi Verschelde f2c9252b6e
Merge pull request #31483 from Faless/ws/fix_double_relay
Fix WebSocketServer relaying message twice.
2019-08-20 12:49:15 +02:00
Fabio Alessandrelli d1539db2c6 Fix WebSocketServer relaying message 2 times.
The WebSocketMultiplayerPeer was relaying the same message two times,
both in _server_relay and _process_multiplayer (which was only supposed
to store the packet, given the server was one of the destination).

_process_multiplayer now only store the packet, and calls _server_relay
which will relay the message to other clients if needed.
2019-08-19 18:18:13 +02:00
Paul Trojahn 7c9c6df7e4 Replace is_zero_approx(A.distance_to(B)) with A==B
Related to #22988 (Fixes the holes in the shape of
the first comment)
2019-08-19 18:16:58 +02:00
Fabio Alessandrelli 17be67b8c7 WebSocketServer now sanitize destination peers.
When relaying messages in multiplayer mode.
Could cause a crash in case a malicious client sends a bogus packet and
for those cases where a peer has just disconnected and a message arrive
from another peer with the disconnected one as destination.
2019-08-19 17:26:07 +02:00
Fabio Alessandrelli c19871af6d Move CryptoCore to it's own folder.
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
lukasz.liberadzki 82acd436b4 Baking gridmap navmesh. 2019-08-18 13:24:58 +02:00
Aaron Franke 092346d82b
Add Vector2/3 sign and posmod functions, misc additions
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
2019-08-17 18:31:55 -04:00
Rémi Verschelde d3153c28f0 Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is
(conditionally defines the error message).

There are a few ERR_EXPLAINC calls for C-strings where String is not included
which can stay as is to avoid adding additional _MSGC macros just for that.

Part of #31244.
2019-08-17 13:31:22 +02:00
Rémi Verschelde 188a10df8b
Merge pull request #31263 from Chaosus/vs_plugin
Plugin support for visual shaders
2019-08-14 15:52:21 +02:00
Yuri Roubinski 33e9fce1bb Plugin support for visual shaders 2019-08-14 15:52:27 +03:00
Rémi Verschelde 6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde 8995d95da0
Merge pull request #31347 from neikeq/monodevelop-addin
C#: Add Ide Connection library and server for the editor
2019-08-14 11:39:41 +02:00
Rémi Verschelde f8574da2c2
Merge pull request #31338 from Calinou/reorganize-menus
Reorganize various menus for consistency and conciseness
2019-08-13 16:52:42 +02:00
Rémi Verschelde 5f1dce4354
Merge pull request #31336 from Calinou/scons-libs-use-lists
Always use lists for `LIBS` in SCons
2019-08-13 12:32:57 +02:00
Hugo Locurcio 9e1c23a353
Reorganize various menus for consistency and conciseness
- Clean up the recent scripts dialog to match the recent scenes dialog
- Add "..." at the end of shortcuts that cause a modal dialog to appear

This closes #31148.
2019-08-13 11:52:10 +02:00
Rémi Verschelde 4403744ef9
Merge pull request #31335 from Xenoamor/bugfix/GridMapListTextCutoff
Fix GridMap list text not expanding when palette is resized
2019-08-13 08:32:48 +02:00
Hugo Locurcio 05daf5c78b
Always use lists for LIBS in SCons
This closes #31288.
2019-08-12 22:31:55 +02:00
Xenoamor 69438149f5
Fix GridMap list text not expanding when palette is resized
This is to close #31304
2019-08-12 21:14:20 +01:00
Ignacio Etcheverry bda461c2b1 Add C# language editor icon 2019-08-12 18:57:26 +02:00
Ignacio Roldán Etcheverry 3c78837218
Merge pull request #31322 from neikeq/mono-gitignore-override-sln
Make git no longer ignore solution files inside the mono module
2019-08-12 16:50:18 +02:00
Ignacio Etcheverry 33c0d47273 Make git no longer ignore solution files inside the mono module 2019-08-12 15:59:06 +02:00
Rémi Verschelde 37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
Rémi Verschelde 5441aaf768
Merge pull request #31228 from aaronfranke/identity-constants
Add Basis constants and format Transform constants
2019-08-12 12:42:30 +02:00
Rémi Verschelde b1de92fbdf
Merge pull request #31314 from BastiaanOlij/fix_api_struct_gen
Fix self reference issue in core structures for GDNative plugins
2019-08-12 11:45:33 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Bastiaan Olij bf9a97c2cb Fix self reference issue in core structures for GDNative plugins 2019-08-12 19:21:32 +10:00
Robin Hübner 8aeade74db Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/' 2019-08-12 10:15:54 +02:00
geequlim e5b91a15e6 Improve code compeletion for virtual methods with signatures 2019-08-11 14:06:39 +08:00
geequlim 72d11cd173 Add optional goto definition support for native symbols
This action will show help for target symbol in godot editor and bring the godot editor window to foreground
Improved markdown documentation for symbols.
2019-08-11 13:30:15 +08:00
Geequlim 666ed89011 Add generate script api to dictionary support
Expose GDScriptLanguageProtocol singleton and classes for editor plugins (Not visiable in class tree)
Fix minor bug in symbol resolve
2019-08-11 13:30:15 +08:00
Geequlim 9618b0c63e Check client workspace directory is valid
Drop test initialize message sent to client
Remove unused code property for the parser class
2019-08-11 13:30:15 +08:00
Geequlim b2f02317fa Improve symbol resolve for inner classes
Only level one inner classes would be resolved currently but it sould cover most real world use case
Improve documation parseing for const values
Improve documation format for native symbols
2019-08-11 13:30:15 +08:00
Geequlim 76c9e4ceb7 Improved performance for completion and symbol resolvation.
Improved uri and workspace path translatation on windows platform.
The smart resolvation is much faster than builtin's in the server side.
The smart resolve mode is still disabled as default as the clients might be slow with a planty of completion items.
2019-08-11 13:30:15 +08:00
geequlim fa6d6a329c Add optional smart resolve sulotion
The smart resolvaion can guess most symbols but it might be slow so disabled by default users can turn on it in the editor setting
2019-08-11 13:30:15 +08:00
geequlim 37aafaaa9c Add a symbol pool to cache all native symbols and workspackes symbols.
Implement hover
Implement completion documentation resolve
Implement hover documentation
Implement go to definition
2019-08-11 13:30:15 +08:00
geequlim f58560ac36 Add GDScript Language Protocol plugin 2019-08-11 13:30:15 +08:00
geequlim 61ed6efa5b Add JSONRPC-2.0 implementation as a module 2019-08-11 13:30:15 +08:00
Aaron Franke 85f13a0d24
Add Basis constants and format Transform constants 2019-08-09 11:34:54 -07:00
Rémi Verschelde 3ea33c0e45
Merge pull request #31221 from neikeq/err-explain-to-msg-mono
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'modules/mono'
2019-08-09 12:40:05 +02:00
Rémi Verschelde 80c7cb6378
Merge pull request #31227 from profan/fix/err-explain-usages
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories.
2019-08-09 12:28:06 +02:00
Ignacio Etcheverry c55ce204b3 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'modules/mono'
And 'CRASH_*_MSG' as well.

Also make error messages puntuation and quotation more consistent.
2019-08-09 12:13:21 +02:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Cameron Reikes 2339e85b78 Expression before 'is' may be null 2019-08-09 01:24:03 -07:00