Commit Graph

4680 Commits

Author SHA1 Message Date
Rémi Verschelde 31dbc59c39
tinyexr: Sync with upstream 1.0.1
Removes miniz as a bundled dependency, relies on our own zlib instead.

Includes a couple commits ahead of `v1.0.1` tag to fix MinGW builds.

(cherry picked from commit 46d3effa99)
2021-11-20 11:48:49 +01:00
Marcel Admiraal 702529d63e Give each RigidBody its own DirectBodyState wrapper. 2021-11-20 08:17:04 +00:00
Marcel Admiraal 2176b694ac
Trigger RigidBodyBullet space override updates when Area properties change.
(cherry picked from commit 41d85ed5a9)
2021-11-18 20:31:41 +01:00
Marcel Admiraal 84af1d9248
Update Bullet Area overlaps when Area properties or shapes change.
(cherry picked from commit 0d3e8538ef)
2021-11-18 20:31:40 +01:00
Marcel Admiraal 14ecd66a21
Ignore Bullet collision contact points with distance = 0
(cherry picked from commit 27b52f6c46)
2021-11-18 20:27:24 +01:00
Marcel Admiraal 4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
David Cambré fb7c23f30b Fixes the copy paste issue in the visual script editor.
Moves copy and paste in their own functions so copy_nodes_request and paste_nodes_request are able to work.
Applies paste offset to the last mouse clicked position.
2021-11-16 16:49:15 +01:00
Rémi Verschelde 3ac2999f22
Replace Godot docs URL with `$DOCS_URL` in XML class reference 2021-11-15 17:22:47 +01:00
kobewi 175870ccc7
Show built-in script names in the debugger
(cherry picked from commit 3b320cd9fe)
2021-11-15 17:22:47 +01:00
Daniel Kolesa 5fe78a3a25
Add support for PowerPC family
(cherry picked from commit 3a84a64d2f)
2021-11-15 17:22:46 +01:00
Rémi Verschelde 5752457854
Merge pull request #54911 from akien-mga/3.x-modules-check-enabled 2021-11-12 14:49:39 +01:00
Rémi Verschelde 6f4858f184
Modules: Make sure to include `modules_enabled.gen.h` where needed
Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <aksoftware91@gmail.com>
2021-11-12 13:45:33 +01:00
Hugo Locurcio 4c88a82f50
Move Mono unhandled exception setting to be located within a subsection
Settings that aren't within a subsection are difficult to reach when
other settings do have a subsection.

This also adds documentation for the project setting.
2021-11-10 20:57:35 +01:00
Rémi Verschelde 5defa1c167
Merge pull request #54805 from Klowner/3.4-gltf-cubic-spline-interpolate
Fix incorrect glTF cubic spline interpolation times/values size error
2021-11-10 08:04:43 +01:00
PouleyKetchoupp b93aeec4a2 Fix errors in KinematicBody when floor is destroyed or removed
In all physics servers, body_get_direct_state() now silently returns
nullptr when the body has been already freed or is removed from space,
so the client code can detect this state and invalidate the body rid.

In 2D, there is no change in behavior (just no more errors).

In 3D, the Bullet server returned a valid direct body state when the
body was removed from the physics space, but in this case it didn't
make sense to use the information from the body state.
2021-11-09 15:15:40 -07:00
Rémi Verschelde b0cd38b7e3
Merge pull request #42625 from RandomShaper/fix_dict_3.2 2021-11-09 15:55:43 +01:00
Mark Riedesel 999bba6916 Fix glTF cubic spline track interpolation incorrectly reporting times/values size mismatch (3.4 specific) 2021-11-09 09:47:37 -05:00
Pedro J. Estébanez a7aad78fd0 Add recursive comparison to Array and Dictionary
...and expose it to GDScript.

Co-authored-by: Emmanuel Leblond <emmanuel.leblond@gmail.com>
2021-11-09 15:08:22 +01:00
Hugo Locurcio 63d214f04b
Remove hash symbol in front of opcode error messages in GDScript
The hash symbol creates spurious issue references on GitHub if
the message is posted outside a code block, which means some issues
have a lot more references than originally intended.
2021-11-09 12:20:51 +01:00
Rémi Verschelde 3be409aa5e
Merge pull request #54039 from nekomatata/fix-soft-body-memory-corruption-bullet-3.x 2021-11-08 23:59:05 +01:00
Rémi Verschelde 2f10793467
Merge pull request #54117 from Pineapple/dont-ignore-type-mismatch-in-setter 2021-11-08 19:26:58 +01:00
Rémi Verschelde bd828c4d81
Merge pull request #54227 from akien-mga/3.x-gdscript-multiline-indexing 2021-11-08 15:03:24 +01:00
Rémi Verschelde d0b1e3d002
Merge pull request #53942 from raulsntos/no-boxing 2021-11-08 13:15:25 +01:00
Rémi Verschelde 837f2c5f82
Merge pull request #54746 from neikeq/issue-42076
C#: Don't use ActivityThread to determine Android nativeLibraryDir
2021-11-08 10:02:48 +01:00
Ignacio Roldán Etcheverry 690bf12c4c C#: Don't use ActivityThread to determine Android nativeLibraryDir 2021-11-08 02:35:06 +01:00
Rémi Verschelde 14c366ddd7
Bump version to 3.5-beta 2021-11-05 16:10:17 +01:00
Ignacio Roldán Etcheverry e282ee0a48 C#: Fix property set call boxing value when unboxed was expected 2021-11-03 13:02:53 +01:00
Ignacio Etcheverry b775573a21 Don't box params on Native->C# calls with Variant params
Godot uses Variant parameters for calls to script methods.
Up until now we were boxing such parameters when marshalling
them for invokation, even if they were value types.

Now Godot allocates the marshalled parameters on the stack,
reducing the GC allocations resulted from boxing.
2021-11-03 13:02:53 +01:00
Yuri Sizov d764e1fae7 Fix maximum allowed size atlas in CPU lightmapper 2021-11-02 15:50:50 +03:00
BimDav 084b21c4a8 expose Variant operator= to GDNative 2021-11-02 12:11:27 +01:00
Rémi Verschelde e4996887ca
Merge pull request #48625 from The-O-King/compression_options 2021-11-02 08:58:22 +01:00
Lyuma e575b27b15 3.x backport glTF: Fix override materials and non-empty arrays
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
2021-11-01 23:40:12 -07:00
Omar El Sheikh 203295f17d Added Mesh Compression Import Options
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed

Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors

Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions

Supports all current importers (obj, fbx, collada, gltf)
2021-11-01 12:54:28 -04:00
Raul Santos 21f68e7bdb
Ensure C# script properties are added to the end
Ensures that the `get_property_list` and `get_script_property_list`
methods push the script properties to the end of the given list, this
prevents the script property from appearing after the script variables.
2021-10-30 16:55:21 +02:00
Max Hilbrunner 6a92a2e92d Websockets: Fix buffer size checks in put_packet() 2021-10-29 15:43:17 +02:00
Rémi Verschelde 14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde 87c80f529f
clang-format: Enable `BreakBeforeTernaryOperators`
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 14:50:33 +02:00
Rémi Verschelde 1b65550ec7
clang-format: Various fixes to comments alignment from `clang-format` 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde 42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde 23955fc282
Merge pull request #54262 from raulsntos/csproj-globbing-3.x 2021-10-26 21:56:58 +02:00
Rémi Verschelde 5d0ec1779d
Merge pull request #54272 from pycbouh/gdscript-ignore-groups-completion-3.x 2021-10-26 20:02:01 +02:00
Yuri Sizov b3fc278dcf Ignore property groups and categories in GDScript code completion 2021-10-26 20:01:49 +03:00
Max Hilbrunner e29126914d
Save all 64 bits of get_ticks_msec() in more cases
(cherry picked from commit 5dc02eb8b0)
2021-10-26 18:23:31 +02:00
Raul Santos ced4f3519d Avoid modifying csproj globbing includes
Check if the found globbing include already matches the new path on
moving scripts to avoid modifying users' csproj files.
2021-10-26 18:21:19 +02:00
Lyuma e49f8c5823 3.x: Fix validation errors due to chunk padding and empty skins.
GLB chunk padding length calculation was backwards and missing for the BIN chunk.
Fixed error caused by "skins":[] when no skins were present.
Finally, encode animations before textures to avoid accessor misalignment due to texture byteLength.
2021-10-25 21:17:13 -07:00
Rémi Verschelde 92664f03a9
GDScript: Support multiline indexing with `[]`
Fixes #35417.
2021-10-25 15:50:59 +02:00
Raul Santos da419bbeed Keep order for C# exported members 2021-10-24 21:14:20 +02:00
Aaron Franke 5659120af3
[3.x] Add support for the RISC-V architecture
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:23 -05:00
Bartłomiej T. Listwon 5a7bd296af Don't ignore the type mismatch in setter function 2021-10-22 12:43:13 +02:00
PouleyKetchoupp 63f6d91a1a Fix SoftBody memory corruption when using invalid mesh
In case of failure the new soft body wasn't created but the previous one
wasn't destroyed, causing discrepancies with visual server updates.
2021-10-20 10:39:16 -07:00
Rémi Verschelde 89076410de
WebM: Disable SIMD optimization with YASM on Windows
It triggers a crash when playing V9 videos.

Could likely be fixed if anyone wants to work on it, but so far nobody seems to
want to and WebM support is dropped in 4.0, so this workaround should help for
now.

Fixes #50862.
2021-10-18 15:48:45 +02:00
Rémi Verschelde fddbbf445b
SCons: Fix missing mono `.gen.cpp` sources after #53860
(cherry picked from commit d6aab5c1bf)
2021-10-16 16:47:08 +02:00
Raul Santos 977898709f Fix hint_string for C# enum arrays 2021-10-15 19:07:31 +02:00
Rémi Verschelde f04a1bec63
Merge pull request #53628 from raulsntos/fix-list-marshal-3.x 2021-10-15 17:36:00 +02:00
Rémi Verschelde b8761569f6
Merge pull request #53582 from raulsntos/mono-marshal-generics-3.x 2021-10-15 17:35:32 +02:00
Rémi Verschelde 5ff8d0e8a7
Merge pull request #53577 from raulsntos/fix-mono-to-variant-array-3.x 2021-10-15 17:35:09 +02:00
Raul Santos 059750cd0d Support marshaling generic Godot.Object
Allows using generic C# types in signals as long as they inherit
from `Godot.Object`.
2021-10-13 18:22:06 +02:00
Ev1lbl0w e57f8fd083
Fix VisualScript crash with null object 2021-10-13 12:19:29 +01:00
M. Huri 37ccfb18ff Fixed a typo in csg module 2021-10-12 11:13:29 +07:00
Yuri Sizov b6b65e08d1 Remove redundant String operation from GDScript enum exports 2021-10-11 02:12:30 +03:00
Infinixius 0f328bcbdc
Fix small typos regarding WebSocketPeer
(cherry picked from commit 547ed239c0)
2021-10-10 12:27:47 +02:00
Raul Santos fd160b642e Fix C# List<T> marshalling 2021-10-10 11:41:37 +02:00
Rémi Verschelde 302ad4e600
Merge pull request #52918 from Calinou/add-new-light-attenuation-3.x 2021-10-08 23:08:49 +02:00
Hugo Locurcio 85e080fcc0
Backport new 3D point light attenuation as an option
This provides more realistic lighting with a very small performance cost.
The option is available in both GLES3 and GLES2, and can be enabled in
the Project Settings. This goes well with the ACES Fitted tonemapping mode
that was recently added.

When enabled, this also makes upgrading Godot 3.x projects to Godot 4.0 easier,
since lighting in 3.x will better match how it'll look in Godot 4.0.
2021-10-08 22:15:22 +02:00
Raul Santos ec2f86ec9a Support arrays of StringName, NodePath and RID in mono 2021-10-08 18:52:40 +02:00
Rémi Verschelde 07094f5253
Merge pull request #53507 from qarmin/fast_as_snail 2021-10-08 14:58:01 +02:00
Rémi Verschelde 81da3b8ba4
Use translated docs in PropertySelector
And do the dedent and stripping for both translated and
non-translated strings for consistency, and so that we
don't need to do it at the call site.

(cherry picked from commit a16031beb6)
2021-10-07 12:48:23 +02:00
Rafał Mikrut 1558f4a599 Speedup parsing big GDScript files 2021-10-07 07:39:56 +02:00
Rémi Verschelde 3f05c388a1
Merge pull request #52521 from kdiduk/52499-preload-parsing-error-when-newline-encountered 2021-10-06 10:13:19 +02:00
Kirill Diduk 835143b7bd #52499 Fix parsing 'preload': increase/decrease parenthesis count 2021-10-06 09:35:21 +02:00
Rémi Verschelde c7eb3d25e7
doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphs
(cherry picked from commit 788b3aa27a)
2021-10-06 09:29:32 +02:00
Rémi Verschelde 0a1cd0c316
Merge pull request #53448 from lyuma/backport_gltf_skin_export 2021-10-06 08:26:18 +02:00
Rémi Verschelde e6cc245bf0
Merge pull request #53454 from stebulba/path_simplify_angle-fix-error-from-merge 2021-10-06 08:24:56 +02:00
Stéphane Fortin 58a4035017
Fix merging error path_simplify_angle CSGPolygon
[3.x] Quick fix on path_simplify_angle introduce here https://github.com/godotengine/godot/pull/52509#issuecomment-933331579
after merging #52509
2021-10-05 21:19:23 -04:00
Lyuma 3cdaaffb54 Backport to 3.x "gltf export: Fix export of skeletons, skins and blend shapes."
Create GLTFSkeleton at the same time we create GLTFNode objects.
Create GLTFSkin at the same time we export MeshInstance3D
Fixes export of blend shape arrays for meshes with multiple surfaces.
Fixes array indexing issues in export of glTF morph target animations.

Converts BoneAttachment3D nodes during normal node creation: this avoids
special cases during mesh export, and especially exporting skeletons or meshes
which are children of BoneAttachment3D.

Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2021-10-05 14:14:28 -07:00
Rémi Verschelde 393166793c
Merge pull request #52952 from Calinou/cpu-lightmapper-num-threads-editor-setting 2021-10-05 19:20:29 +02:00
Hugo Locurcio 0e943939e2
Add an editor setting to configure number of threads for lightmap baking
This can be used to free some CPU cores when baking lightmaps.
When using fewer CPU cores, lightmap baking is slower but background
tasks aren't slowed down as much.
2021-10-05 17:35:20 +02:00
Rémi Verschelde f9e3bc2652
Merge pull request #51728 from lawnjelly/proj_settings_misc 2021-10-05 13:36:43 +02:00
lawnjelly 192ec963ae Create 'rendering/misc' project settings section
To prevent the project settings `rendering` section getting out of hand, this PR moves some of the smaller new settings into a `misc` category.
2021-10-05 11:47:03 +01:00
Rémi Verschelde e31a10da98
Merge pull request #52274 from aaronfranke/3.x-gltf-noregex 2021-10-05 12:40:12 +02:00
Rémi Verschelde db0370cab5
Merge pull request #51086 from aaronfranke/3.x-warn-dectime 2021-10-05 12:06:03 +02:00
Rémi Verschelde d01c660954
Merge pull request #52964 from Pineapple/WIN32_LEAN_AND_MEAN 2021-10-05 12:03:52 +02:00
Rémi Verschelde 9ffaa6c090
Merge pull request #53347 from migeran/fix_gdnative_get_current_library_path 2021-10-05 11:08:16 +02:00
Kongfa Waroros 77d5ead241
Check if the line pointer goes away from the image buffer's EOF in the BMP importer
(cherry picked from commit ac5d7abe13)
2021-10-04 15:22:16 +02:00
Hugo Locurcio 48e0212497
Add an example on iterating an array backwards
This closes https://github.com/godotengine/godot-docs/issues/3472.

(cherry picked from commit 810d8f06b7)
2021-10-04 15:15:27 +02:00
Hugo Locurcio 7e3016ebfd
Document how to set up UPnP in a non-blocking manner
(cherry picked from commit f4bebc272c)
2021-10-04 14:37:43 +02:00
jitspoe d7af7a9b3b
CSGPolygon fixes and features: Added angle simplification, UV tiling distance option, and interval type, which allows distance-based intervals (old) and subdivision-based intervals (new to 3.4). 2021-10-04 12:14:44 +02:00
Haoyu Qiu ed5a98c3c6 Fix crash when pinned SoftBody point is out of range 2021-10-04 15:47:12 +08:00
Rémi Verschelde 06e0260699
Merge pull request #53349 from LATRio/53331_1 2021-10-03 12:16:45 +02:00
LATRio 56aa9f71b6 Prevent out of bound access through 'm_nodes' in SoftBodyBullet 2021-10-03 16:36:01 +09:00
Gergely Kis 1583c89a45 Fix GDNativeLibrary::get_current_library_path()
Return a const String reference to make sure that when its address
is used as a handle in NativeScriptLanguage::init_library(),
it refers to the heap instead of a temporary object on the stack.
2021-10-03 08:24:49 +02:00
LATRio be69d26403 Fix crash at SoftBodyBullet::reset_all_node_positions when bt_soft_body isn't initialized
Update soft_body_bullet.cpp
2021-10-02 22:03:54 +09:00
Francois Belair 6be31e559d
Fix empty line hover; fix open non-res:// script
(cherry picked from commit 572979d011)
2021-10-01 21:30:39 +02:00
Francois Belair 3754759e26 Fix extends parsing breaking if it has the cursor 2021-10-01 11:31:05 -04:00
Hugo Locurcio fe2f24c47c
Improve the documentation for `ease()` and `smoothstep()`
This adds a cheatsheet for `ease()` and a comparison graph for
`smoothstep()`, among other things.

(cherry picked from commit 567b6436c9)
2021-10-01 08:04:20 +02:00
Francois Belair 679ce6fd0b Fix LSP crash parsing scripts of temp size 0 2021-09-30 11:11:56 -04:00
Rémi Verschelde fba9fb2439
Merge pull request #53183 from m4nu3lf/threadsafe_bullet_3.x 2021-09-29 21:34:56 +02:00
Rémi Verschelde 585a9c2979
Merge pull request #48300 from akien-mga/3.x-bullet-3.09 2021-09-29 21:25:58 +02:00
Rémi Verschelde b7901c773c
bullet: Sync with upstream 3.17
Stop include Bullet headers using `-isystem` for GCC/Clang as it misleads
SCons into not properly rebuilding all files when headers change.

This means we also need to make sure Bullet builds without warning, and
current version fares fairly well, there were just a couple to fix (patch
included).

Increase minimum version for distro packages to 2.90 (this was never released
as the "next" version after 2.89 was 3.05... but that covers it too).
2021-09-29 16:30:34 +02:00
Rémi Verschelde 69b2f1dcc6
Merge pull request #53094 from Razoric480/fix-func-doc-_init 2021-09-29 15:47:37 +02:00
Francois Belair ae3aec1dbc Makes LSP report new() as _init; fixes docstrings 2021-09-29 08:43:32 -04:00
Manuele Finocchiaro 6f81c213a6 Compile bullet with threasafe switch on 2021-09-28 17:21:26 +01:00
Rémi Verschelde dbe0e4613a
Merge pull request #53140 from V-Sekai/gltf_naming_fix 2021-09-28 08:40:54 +02:00
Pedro J. Estébanez 6697e380d9 Fix check for freed object during cast 2021-09-27 19:46:49 +02:00
SaracenOne c6387e58e9 Fixes naming conflict in GLTF importer 2021-09-27 18:07:50 +01:00
BimDav 9de9994444
Reload kinematic shapes when changing PhysicsBody mode to Kinematic
Prevents a crash when calling test_body_motion. Call reload_kinematic_shapes
from init_kinematic_utilities as they are always called together.

(cherry picked from commits 112985c5bc
and 3540e716f9)
2021-09-27 18:10:30 +02:00
Jordan Schidlowsky 3b43dfee11 [Net] ENet poll now only service the connection once.
It used to call `enet_host_service` until all events were consumed, but
that also meant constantly polling the connection leading to potentially
unbounded processing time.

It now only service the connection once, and instead consumes all the
retrieved events via `enet_host_check_events`.
2021-09-27 10:15:41 +02:00
Jordan Schidlowsky 25636f8db7 [Net] ENet now sends fragmented packets unreliably too.
It used to always send them reliably when transfer mode was unreliable
or ordered if the packet size was more then the enet host MTU (1400
bytes by default).

This commit also adds a warning when debug is enabled to explain the
effects of sending fragmented packets unreliably.
2021-09-27 10:15:34 +02:00
Aaron Franke 674cb947ea
[3.x] Fix GLTF light import 2021-09-26 21:57:03 -05:00
Francois Belair 885d905b0d Make LSP send applyEdit to connect editor signals 2021-09-25 15:22:28 -04:00
Rémi Verschelde 6e39566344
Merge pull request #52883 from Germanrc/script_reload_fix
C# scripts reload in editor fixed
2021-09-24 08:33:49 +02:00
Bartłomiej T. Listwon f463e612a1 Add missing WIN32_LEAN_AND_MEAN 2021-09-23 10:36:31 +02:00
Germanrc 84a218d346 C# script reload fixed
Co-authored-by: Michael Bickel <mib@developium.net>
2021-09-21 23:03:45 +02:00
Haoyu Qiu acd15e4cd2
Don't update CSG Shape when not inside tree
(cherry picked from commit 07042b4044)
2021-09-21 17:14:59 +02:00
David Cambré d6f131904b
Update VisualScriptCustomNode.xml
(cherry picked from commit 080125660a)
2021-09-21 17:14:59 +02:00
Aaron Franke a5543bc35e
[3.x] Warn when using the dectime method
dectime has been removed in the master branch (what will be Godot 4.0)
2021-09-21 10:03:42 -05:00
Rémi Verschelde 22aab6be1c
Merge pull request #51796 from RandomShaper/dangling_obj_release_3.x
[3.x] Promote object validity checks to release builds
2021-09-21 11:48:11 +02:00
Pedro J. Estébanez 26edc6cd41 Promote object validity checks to release builds
Extra:
- Optimized the debug-only check about why the object is null to determine if it's because it has been deleted (the RC is enough; no need to check the ObjectDB).
- Because of the previous point. the debugger being attached is not required anymore for giving the "Object was deleted" error; from now, it only matters that it's a debug build.
- `is_instance_valid()` is now trustworthy. It will return `true` if, and only if, the last object assigned to a `Variant` is still alive (and not if a new object happened to be created at the same memory address of the old one).
- Replacements of `instance_validate()` are used where possible `Variant::is_invalid_object()` is introduced to help with that. (GDScript's `is_instance_valid()` is good.)
2021-09-21 10:39:04 +02:00
Rémi Verschelde b37776fa2f
Merge pull request #52591 from timothyqiu/error-macros
[3.x] Remove do{ } while(0) wrapper around error macros
2021-09-21 10:38:34 +02:00
John J. Donna II 91482a00bb
LSP: Add support for custom host setting
You can now configure host in the `language_server` settings in the editor
settings.

(cherry picked from commit be6da39b8a)
2021-09-20 13:55:28 +02:00
bruvzg 92377f4b20
[macOS] Request camera permission before session init.
(cherry picked from commit e6801a098e)
2021-09-19 11:31:14 +02:00
Hugo Locurcio 59eafe4cd3
Remove `#ifdefs` for handling compilation with Visual Studio < 2015
Godot 3.3 and later require Visual Studio 2017 to be compiled.

(cherry picked from commit fc0bfbb33b)
2021-09-19 11:30:22 +02:00
Aaron Franke 298e29c772
[3.x] Some more C# formatting and style fixes 2021-09-18 12:11:03 -05:00
Rémi Verschelde bb2772d2f2
Merge pull request #52762 from magian1127/3.xTemp1 2021-09-18 14:51:07 +02:00
Magian 0263a87c8b C#, replace the current Xform method with a * operator. 2021-09-18 20:40:08 +08:00
Rémi Verschelde 316b5dad2d
Merge pull request #52390 from raulsntos/csharp-docs-3.x
[3.x] Add documentation to GodotSharp
2021-09-18 01:00:03 +02:00
Rémi Verschelde 4b50cd9b56
Merge pull request #52763 from magian1127/3.xtemp2 2021-09-17 12:26:36 +02:00
Magian 58e742e2c0 C# Array<String> Export Support Enum(String) 2021-09-17 14:03:27 +08:00
Rémi Verschelde ae58f94323
Merge pull request #52445 from nekomatata/fix-mono-nodepath-default-arg-3.x 2021-09-16 15:20:17 +02:00
Aaron Franke 85eb6b6352
[3.x] Make the GLTF module not depend on the RegEx module 2021-09-15 09:19:06 -05:00
Rémi Verschelde 187b1ec61e
Merge pull request #51095 from RandomShaper/error_cast_freed_object_3.x
[3.x] Complain if casting a freed object in a debug session
2021-09-14 22:40:17 +02:00
Pedro J. Estébanez 123d3ef935 Complain if casting a freed object in a debug session
The idea is to give the user a chance to realize a mistake that will cause a crash in a release build (or with no debugger attached).
2021-09-14 21:05:47 +02:00
Rémi Verschelde 154cca3d5d
Merge pull request #52595 from lewiji/mono-build-solution-shortcut
[3.x] Add editor keyboard shortcut for Mono Build solution button
2021-09-14 16:00:10 +02:00
Lewis James 48a6264a87 Add editor keyboard shortcut for Mono Build solution button
Update GodotSharpEditor.cs & csharp_script.cpp with better casing and localisation for HintTooltip on Build button

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-09-14 13:24:03 +01:00
Haoyu Qiu 25bd0c3f72
Try other resolved IPs if one fails to connect
(cherry picked from commit fd52e18d19)
2021-09-14 14:18:18 +02:00
Raul Santos 6a7ca43297
Expose `String.SimplifyPath` in C#
(cherry picked from commit 126b1ea149)
2021-09-14 13:41:26 +02:00
Paul Joannon e2b71de38b
Improve C# method listing
- implement CSharpInstance::get_method_list
- loop through parent classes in CSharpInstance::get_method_list and CSharpScript::get_script_method_list (#46408)

(cherry picked from commit 19f25b6847)
2021-09-14 13:41:26 +02:00
Vincent ea13ff860d
implement individual mesh transform for meshlibrary items
(cherry picked from commit 70108fd850)
2021-09-14 13:41:22 +02:00
Rémi Verschelde bd7394a105
Merge pull request #52219 from Gallilus/Fix-VisualScriptPropertySet-value-property-hint-3x
[3.x] Fix VisualScriptPropertySet value hint
2021-09-14 12:49:43 +02:00
Haoyu Qiu 70853fd669 Remove do{ } while(0) wrapper around error macros 2021-09-12 15:04:53 +08:00
PouleyKetchoupp 781b979292 Fix NodePath default argument in mono bindings
Backport from master, mono was generating "" as default argument
instead of (NodePath)"".
2021-09-06 10:46:33 -07:00
Camille Mohr-Daurat 8608ece42f
Merge pull request #50405 from nekomatata/clean-convex-hull-decomposition-3.x
[3.x] Clean convex hull decomposition code
2021-09-06 09:34:50 -07:00
Raul Santos cacf3e28fd Add documentation to GodotSharp
- Adds documentation to almost every class and member in `GodotSharp`
- Fixes some old documentation to more closely follow the XML comments convention
2021-09-04 20:15:53 +02:00
Raul Santos d76562ceb9 Fix constant tag documentation in C# bindings generator 2021-09-03 23:02:14 +02:00
Fabio Alessandrelli 25f33999af [Net] Silence ENetMultiplayerPeer close_connection.
Used to print an error when it was not active, now it just returns
immediately as per the documentation.
2021-09-02 15:26:23 +02:00
David Cambré 0c9947cb2f Fix VisualScriptPropertySet value hint 2021-08-29 15:42:04 +02:00
Hugo Locurcio c2945365d8
Document that ENet compression mode must match between client and server 2021-08-23 17:35:42 +02:00
David Cambré be7718c96c Revert sequence port VisualScriptPropertySet basic type
Revert a part of #50709.
Adding a sequence port to basic type set breaks backwards compatibility
2021-08-20 15:43:47 +02:00
Lyuma 79b016adad Assign the min values in gltf accessors 2021-08-19 09:30:05 +01:00
Rémi Verschelde 85e13a4e02
Merge pull request #51858 from nekomatata/bullet-test-body-motion-depth-3.x
[3.x] Add collision depth and safe/unsafe fraction to Bullet body_test_motion
2021-08-18 22:45:54 +02:00
PouleyKetchoupp 02adb0e361 Add collision depth and safe/unsafe fraction to Bullet body_test_motion
It was only implemented for godot physics before.
2021-08-18 13:09:27 -07:00
PouleyKetchoupp db47b670f6 Fix crash in body_test_motion when used with RigidBody3D in Bullet
Kinematic utilities are now initialized for a rigid body if needed for a
call to body_test_motion.
2021-08-18 13:07:21 -07:00
Rémi Verschelde ddfaf20f62
Merge pull request #50483 from akien-mga/3.x-ci-emscripten-2.0.25 2021-08-18 11:56:39 +02:00
Rémi Verschelde 1de8f31448
CI: Upgrade Emscripten to 2.0.25
That's the version used by current containers for Godot 3.4.

Fixes a couple stray warnings that new Emscripten/LLVM catches.
2021-08-18 11:13:34 +02:00
Jihyun Yu 5c66891048 Auto-reload scripts with external editor 2021-08-18 16:52:14 +09:00
Rémi Verschelde 632844e464
Merge pull request #51320 from pycbouh/docs-extract-theme-items-3.x
[3.x] Add theme item descriptions to the online documentation
2021-08-13 22:39:09 +02:00
Rémi Verschelde f0b37b1519
doc: Point URLs to 3.4 version of the online docs 2021-08-12 17:08:10 +02:00
Rémi Verschelde ba8551451f
Resource: Remove unused `_use_builtin_script()` virtual method
And another piece of dead code found while searching for "use_builtin".

(cherry picked from commit 6e9439198c)
2021-08-12 16:45:48 +02:00
K. S. Ernest (iFire) Lee beb3a6859d
Continue when glTF2 lights fail to parse.
(cherry picked from commit 0c79a8fa22)
2021-08-12 16:42:16 +02:00
Rémi Verschelde 0142a378c6
HTML5: Fix a couple warnings
Add a missing call to disable warnings on a forked env for freetype's
`sfnt.c`.

(cherry picked from commit c44ebb020d)
2021-08-12 16:37:38 +02:00
Marcel Admiraal 2449b581dd Fix multiple issues with CSGPolygon 2021-08-12 09:55:18 +01:00
Hugo Locurcio d0508e5155
Enable range coder compression by default in NetworkedMultiplayerENet
From empirical testing, this seems to provide the best compression
compared to other compression algorithms when used in the
Multiplayer Bomber demo.

Other algorithms may provide better compression ratios for more
complex games, but some compression is probably better than
no compression.

Zstandard was also not very efficient in my testing, so I added
a note in the documentation.
2021-08-11 21:05:37 +02:00
Haoyu Qiu f4a6737eed Improve NavigationMesh typing, parameter validation and documentation 2021-08-11 18:18:27 +08:00
PouleyKetchoupp da159cd258 Fix 3D moving platform logic
Same thing that was already done in 2D, applies moving platform motion
by using a call to move_and_collide that excludes the platform itself,
instead of making it part of the body motion.

Helps with handling walls and slopes correctly when the character walks
on the moving platform.

Also made some minor adjustments to the 2D version and documentation.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-08-09 18:55:49 -07:00
Rémi Verschelde 0403cb8ad5
Merge pull request #51447 from nekomatata/fix-moving-platform-rotation-3.x
[3.x] Fix applied rotation from moving platforms in move_and_slide
2021-08-09 23:20:35 +02:00
PouleyKetchoupp f101349225 Fix applied rotation from moving platforms in move_and_slide
When synchronizing KinematicBody motion with moving the platform using
direct body state, only the linear velocity was taken into account.

This change exposes velocity at local point in direct body state and
uses it in move_and_slide to get the proper velocity that includes
rotations.
2021-08-09 12:04:57 -07:00
Fabio Alessandrelli ef43d95897 [Net] Add "dtls_hostname" property to ENet.
Used to specify the expected "CN" in the server certificate if different
from the server address.
2021-08-09 15:50:52 +02:00
Rémi Verschelde a418d09617
Merge pull request #51166 from RandomShaper/fix_can_reset_3.x 2021-08-09 09:19:25 +02:00
Rémi Verschelde 030bdc5a41
Merge pull request #51325 from raulsntos/fix-msbuild-exception-3.x
[3.x] Ensure MSBuildPanel buttons are instantiated
2021-08-07 12:19:43 +02:00
Raul Santos dd9c07ee46 Ensure MSBuildPanel buttons are instantiated 2021-08-06 22:32:54 +02:00
Francois Belair 6db17a523e Fix LSP completion crashing on sceneless scripts 2021-08-06 15:31:04 -04:00
Yuri Sizov fcbe5a3fde Add theme item descriptions to the online documentation 2021-08-06 18:20:51 +03:00
31 659b89c615
Fix 'script_class' null access when reloading a deleted C# script
(cherry picked from commit 6fd2edddc0)
2021-08-06 13:03:03 +02:00
Rémi Verschelde 70784f983b
Mono: Remove diagnostics incompatible with 3.x codebase 2021-08-06 12:59:17 +02:00
Francois Belair 1f0fa16a15
Fix LSP parsing get_node only from the scene root
(cherry picked from commit 03f8fa9f62)
2021-08-06 11:45:08 +02:00
Raul Santos 332e31260e
Reduce C# Dictionary internal calls
- Implements new `KeyValuePairs` and `KeyValuePairAt` internal calls
to get the `key` and the `value` in one call.
- Caches the `DictionaryEntry` to reuse properties without repeating
internal calls.

(cherry picked from commit 2deefd938f)
2021-08-06 11:10:04 +02:00
Raul Santos ca32c18458
Add documentation to Dictionary in C#
Adds documentation to `Godot.Collections.Dictionary` in C#.

(cherry picked from commit 0669ffcd15)
2021-08-06 11:09:56 +02:00
Raul Santos 5c206c38f9
Simplify C# print methods
- Extracts the parameters logic to a single method
- Simplify the handling of null parameters

(cherry picked from commit ad460cde79)
2021-08-05 16:35:55 +02:00
Rémi Verschelde 63047093c9
Merge pull request #48616 from Razoric480/lsp-3x-rename
Implement LSP didSave notify and rename request [3.x]
2021-08-04 20:28:16 +02:00
Yuri Sizov 3857fd5ceb Fix the editor theme application for the Mono build log 2021-08-03 22:11:33 +03:00
Rémi Verschelde d38180b20f
Merge pull request #51208 from Chaosus/vs_cleanup_warnings_3.x
[3.x] Prevents some warnings from appearing in visual scripts
2021-08-03 11:08:00 +02:00
Yuri Roubinsky 96f957f93b [3.x] Prevents some warnings from appearing in visual scripts 2021-08-03 11:27:45 +03:00
Rémi Verschelde f5836b40d4
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:20:19 +02:00
Haoyu Qiu 812076baf6
Validates VisualScript.add_node input node
(cherry picked from commit 0ca38ffe76)
2021-08-03 09:33:25 +02:00
Haoyu Qiu f4208ad1e8
Do nothing when dragging CSGBox handle perpendicular to the camera
(cherry picked from commit 0f1e107ede)
2021-08-03 09:33:24 +02:00
K. S. Ernest (iFire) Lee 8f592d50c3
glTF2 fallback load PNG and JPG
(cherry picked from commit ddff1c10c3)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee 6ba37005d1
In glTF2 animations, log spam less when running.
(cherry picked from commit 882f7d9bdf)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee 42ad091738
Make curve interpolate crash less.
(cherry picked from commit d67c5afa95)
2021-08-03 09:15:33 +02:00
Raul Santos ecb973ab02
Use `allowEmpty` parameter in Split
(cherry picked from commit b7a66a820b)
2021-08-03 09:15:33 +02:00
Haoyu Qiu ac04032e95 Fix NetworkedMultiplayerENet client memory leak
The host is not destroyed in some error conditions.
2021-08-03 10:14:14 +08:00
Pedro J. Estébanez d272464e6e Implement inherits_script() for NativeScript and PluginScript
(cherry picked from commit 2dcd064056)
2021-08-02 17:58:04 +02:00
Ignacio Roldán Etchevery e72fdc4b95 C#+iOS: Cache AOT compilater output
Implemented some basic caching to avoid unnecessary AOT compilation
of unchanged assemblies that were already compiled previously.
This reduces iOS export times considerably for subsequent builds
since many dependencies never change, such as framework assemblies
and the Godot bindings.

The AOT compiler asm output and object files are now placed in
`res://.mono/temp/obj/<CONFIG>/godot-aot-cache/` instead of a
temporary directory.
2021-08-02 17:27:47 +02:00
Ignacio Etcheverry 417a69c643 Implement CSharpScript::inherits_script()
(cherry picked from commit 840255a04b)
2021-08-02 15:30:13 +02:00
Pedro J. Estébanez 7426b3fa91 Add Script::inherits_script()
Partial cherry-pick of 5d4dc2d45c.

Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2021-08-02 15:18:30 +02:00
Rémi Verschelde 02967a9c5e
Merge pull request #51037 from winterpixelgames/ws-fix
3.x WebsocketPeer outbound buffer fixes and buffer size query
2021-08-01 11:14:03 +02:00
Jordan Schidlowsky 023548c0a5 Websocket peer outbound buffer fixes. Expose outbound buffered amount. 2021-07-31 19:50:05 -06:00
Haoyu Qiu a3b221e99f Make action names translatable 2021-07-31 22:19:47 +08:00
Rémi Verschelde 9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Omar El Sheikh d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
lawnjelly e06cd3042f Portals - Fix CSG updates on room conversion
Due to a quirk in CSG Shapes, updating is usually deferred to the next frame. This is problematic as we need to read back the geometry on the first frame when converting levels.

This PR adds a function to CSGShape to force immediate updating (if dirty), and calls it during room conversion.
2021-07-29 12:41:23 +01:00