Commit graph

5131 commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee 60eb3dd6ad Always have a name for gltf2 mesh, material and skins.
Co-authored-by: Lcbx <luc.courbariaux@gmail.com>
2021-03-24 00:30:22 -07:00
Aaron Franke a5324787c8
Rename some more global enums (Key, Joy, MIDI) 2021-03-23 07:13:23 -04:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde eeba8d63f8
Merge pull request #44398 from RevoluPowered/unit-tests-for-export-templates
Add unit tests for export templates
2021-03-23 00:42:29 +01:00
Rémi Verschelde 11718dbef9 Merge pull request #45562 from aaronfranke/core-modules-real_t
Use real_t in GridMap and VariantParser
2021-03-23 00:10:04 +01:00
Gordon MacPherson 6b4ff3b44b Add unit tests for export templates 2021-03-22 18:57:08 +00:00
Juan Linietsky 97a3a66220 Improved 3D Scene Importer
* Added option for importers to show an Advanced settings dialog
* Created advanced settings dialog for Scene Importer
* Cleaned up importers (remove many old/unused options)
* Added the ability to customize every node, material, mesh and animation individually
* Saving to animations and meshes to files is now a manual process, making it more predictable
* Added the ability for materials to be replaced by external files (or to be made external, up to you).
* When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it.

WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
2021-03-22 12:16:40 -03:00
Marcel Admiraal 755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
Rémi Verschelde 07f076fa4f
Merge pull request #47194 from W4RH4WK/fbx-normalize-rotations
FBX Import: Normalize rotation quaternions
2021-03-21 08:48:53 +01:00
Rémi Verschelde fa681d04b7
Merge pull request #46937 from nekomatata/soft-body-support
SoftBody support in GodotPhysics 3D
2021-03-20 21:45:20 +01:00
Rémi Verschelde 793000c6a9
Merge pull request #47139 from nekomatata/concave-backface-collision
Disable backface collision with ConcavePolygonShape by default
2021-03-20 21:43:57 +01:00
Alex Hirsch d03f4cefea FBX Import: Check bone map access for valid cluster target node id
fix #47184
2021-03-20 18:07:51 +01:00
Alex Hirsch 72d3bfc88c FBX Import: Normalize rotation quaternions
fix #47174
2021-03-20 17:46:25 +01:00
Aaron Franke affe3c817a
Use real_t in GridMap and VariantParser 2021-03-19 00:56:34 -04:00
Alex Hirsch d7ac5ba1c6 Fix missing quote in multiline GDScript string
fix #47117
2021-03-19 01:24:18 +01:00
Rémi Verschelde 47cf9985eb
Merge pull request #47128 from ArdaE/master
GLTF importer: Prevent quick accumulation of significant numerical errors in keyframe times
2021-03-19 00:14:51 +01:00
ArdaE 6770a9413b GLTF import: Prevent significant numerical errors in keyframe times
Keyframe times shift slowly in imported animations, starting with a zero shift
at the beginning and increasing and becoming erratic slowly farther into an
animation, reaching significant levels at times after about 3 minutes into an
animation. This commit fixes the issue by increasing the precision of the
floating point numbers used for keyframe time calculations. Only the most
significant cases that cause fast accumulation of errors over a short animation
duration are fixed. Other cases that would have a marginal benefit from
switching to double precision numbers are left for another PR/further analysis.
Note that this change has no impact on the runtime performance of games/apps
created using Godot. It only affects the GLTF importer.

Fixes #47127.
2021-03-18 15:55:31 -07:00
PouleyKetchoupp 7bbd545432 Disable backface collision with ConcavePolygonShape by default
Helps a lot with soft bodies and generally useful to avoid shapes to go
through the ground in certain cases.

Added an option in ConcavePolygonShape to re-enable backface collision
on specific bodies if needed.
2021-03-18 11:30:22 -07:00
Rémi Verschelde 2274d4eebc
Mono: Fix Android build after #46900 2021-03-18 17:58:21 +01:00
PouleyKetchoupp d5ea4acd2d SoftBody support in GodotPhysics 3D
- Fixed SoftBody surface update with new rendering system
- Added GodotPhysics implementation for SoftBody
- Added support to get SoftBody rid to interact with the physics server
- Added support to get SoftBody bounds from the physics server
- Removed support for unused get_vertex_position and get_point_offset
from the physics server
- Removed SoftBody properties that are unused in both Bullet and
GodotPhysics (angular and volume stiffness, pose matching)
- Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly
2021-03-18 09:04:17 -07:00
Rémi Verschelde 4ca1e73ff9
doc: Sync classref with current source
And move GLTF docs to its module folder.
2021-03-18 16:37:43 +01:00
George Marques ec806c5c5b
Added static method information the generated builtin API JSON 2021-03-17 08:33:08 -03:00
George Marques 8fddab9209
Further changes in GDNative API
- Added new_copy to all types, since trivial copy won't work for all
  types.
- Added functions to convert from String to char array types, which is
  not provided by the methods bound in Variant.
- Added operator index to String.
- Added missing cstring version of some Variant functions. They existed
  in the header but didn't have the implementation and were missing from
  the gdnative_api.json file.
- Added support for static calls on Variant types.
2021-03-17 08:26:10 -03:00
Rémi Verschelde 08ca4184f4
Merge pull request #47024 from groud/navigation
Allow Navigation to be more flexible
2021-03-17 09:18:54 +01:00
K. S. Ernest (iFire) Lee c203fbfa8c Expand bone name possibilities. 2021-03-16 15:07:30 -07:00
bruvzg b79e8c22f0
HarfBuzz: Update to version 2.8.0 2021-03-16 19:56:52 +02:00
Rémi Verschelde 69486b1059
miniupnpc: Update to version 2.2.2 2021-03-16 10:54:38 +01:00
Fabio Alessandrelli 163fc125cd [Net] Fix miniupnpc when no interface is specified
This is a tricky one, it used to work, but it was wrong, because in such
a scenario instead of passing NULL as required by the API, it would pass
a buffer containing the `\0` terminator.
This stopped working on a specific miniupnpc version, when they fixed
some network endianess issue on Windows, to which we made a workaround,
which in turn would probably result in failures when the interface is
specified.

This commit address the issue properly, by checking the specified
interface string size, and correctly passing NULL instead of the empty
string when necessary.

Also reverts the commit that introduced the bogus workaround:
e85330231c

One of those PR when the explaination is much longer then code changes
:).
2021-03-15 17:33:26 +01:00
Gilles Roudière ac7073f586 Allow Navigation to be more flexible 2021-03-15 15:58:59 +01:00
Ignacio Etcheverry 5b3b9cd63b C#: Fix disconnecting event signals twice
`disconnect_event_signals` can be called twice (when managed instance
is disposed and from the ScriptInstance destructor).
2021-03-15 07:08:10 +01:00
Rémi Verschelde 6edb0a75ab
Merge pull request #46936 from DavidSichma/match_temp_header
Fixed match test expression for temporaries
2021-03-14 15:46:53 +01:00
Rémi Verschelde 1066dbcecc
Merge pull request #46968 from sboronczyk/fix-editor-plugin-mono
Fix create c# script from editor after partial class type is necessary
2021-03-14 00:27:34 +01:00
Rémi Verschelde 7015027cbf
Merge pull request #46900 from Ev1lbl0w/bugfix-malloc_calls
Replace malloc's with Godot's memalloc macro
2021-03-13 21:55:52 +01:00
sboronczyk 094981b277 Fix create c# script after partial class type 2021-03-13 17:31:47 +01:00
Rémi Verschelde 942f5f0cb2
Merge pull request #46929 from Anshul7sp1/typosAndGrammar
Fixes small typos and grammar correction
2021-03-13 14:55:05 +01:00
Ev1lbl0w 838e7d0a8d
Replace malloc's with Godot's memalloc macro 2021-03-13 11:51:45 +00:00
Rémi Verschelde 8368f53941
Merge pull request #46954 from neikeq/reggr-46307
C#: Fix StringName leak warnings after generating bindings
2021-03-13 09:13:34 +01:00
Ignacio Etcheverry d9603b2d73 C#: Fix StringName leak warnings after generating bindings
`Main::cleanup()` prints warnings if it finds `StringName`s still alive.
We need the `BindingsGenerator` to be destructed before calling cleanup.
2021-03-13 01:16:31 +01:00
Ignacio Etcheverry ee8e5146a4 C#: Fix ScriptPathAttribute generator with none or nested namespaces
The following two bugs were fixed:
- For classes without namespace we were still generating `namespace {`
without a namespace identifier, causing a syntax error.
- For classes with nested namespaces we were generating only the innermost
part of the namespace was being generated, e.g.: for `Foo.Bar` we were
generating `namespace Bar {` instead of `namespace Foo.Bar {`.
This wasn't causing any build error, but because of the wrong namespace
Godot wasn't able to find the class associated with the script.
2021-03-13 01:04:59 +01:00
David Sichma 762bb5843b
Fixed match test expression for temporaries
Fixed that a potentially popped temporary was used for the value in
match statements.
2021-03-12 15:04:45 +01:00
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
jfons 809d88b925 Fix visibility toggle for baked GridMaps 2021-03-12 12:57:04 +01:00
Rémi Verschelde fec979b850
Merge pull request #44671 from o01eg/fix-gcc-visibility
GDNative: Fix symbols visibility for GCC
2021-03-12 09:41:56 +01:00
Alex Hirsch 09bda3f140 Always dynamically allocate PropertyTable
- `Texture::~Texture` expects `props` to be dynamically allocated.

- `GetPropertyTable` returned a pointer to an existing `PropertyTable`
  but is expected to return a newly, dynamically allocated one.

- `PropertyTable::PropertyTable()` suggests that an empty `element`
  property is valid.

fix #46876
fix #45573
2021-03-10 19:12:23 +01:00
Gilles Roudière ba1344408f Implement Navigation layers 2021-03-10 11:23:06 +01:00
Gilles Roudière a9dc53d152 Remove Navigation2D/3D nodes, and move the navigation map to the world resource 2021-03-10 11:23:06 +01:00
geekrelief 58fa4973f6 fixes #46839, ensure library_classes is cleared and free funcs are called
Co-authored-by: toasteater <48371905+toasteater@users.noreply.github.com>
Co-authored-by: Jan Haller <bromeon@gmail.com>
2021-03-09 14:32:46 -08:00
Rémi Verschelde 83b1acdc60
Merge pull request #45545 from abaire/relaxes_gltf_name_sanitization
Relaxes node name sanitization in gltf documents.
2021-03-09 14:54:33 +01:00
Rémi Verschelde 26d1b30d35
Merge pull request #46174 from xill47/mono-appdomain-unhandled-exception-event
Added mono_unhandled_exception call to unhandled_exception hook
2021-03-08 13:26:47 +01:00
Ilya Kuznetsov 6061ff7ba1 Added mono_unhandled_exception call to unhandled_exception hook 2021-03-08 12:57:50 +01:00
Rémi Verschelde 9a33c1b6a6
Merge pull request #46782 from bruvzg/fix_def_theme_size
Improve bitmap font scaling. Fix default theme font size.
2021-03-08 10:03:12 +01:00
bruvzg 43c7c279d5
Improve bitmap font scaling. Fix default theme font size. 2021-03-08 09:56:40 +02:00
Rémi Verschelde 15bd2bf03f
Merge pull request #46713 from neikeq/csharp-source-generators-init
Add C# source generator for ScriptPathAttribute
2021-03-07 01:04:47 +01:00
Ignacio Etcheverry e2afe700f6 Add C# source generator for a new ScriptPath attribute
This source generator adds a newly introduced attribute,
`ScriptPath` to all classes that:

- Are top-level classes (not inner/nested).
- Have the `partial` modifier.
- Inherit `Godot.Object`.
- The class name matches the file name.

A build error is thrown if the generator finds a class that meets these
conditions but is not declared `partial`, unless the class is annotated
with the `DisableGodotGenerators` attribute.

We also generate an `AssemblyHasScripts` assembly attribute which Godot
uses to get all the script classes in the assembly, eliminating the need
for Godot to search them. We can also avoid searching in assemblies that
don't have this attribute. This will be good for performance in the
future once we support multiple assemblies with Godot script classes.

This is an example of what the generated code looks like:

```
using Godot;
namespace Foo {
	[ScriptPathAttribute("res://Player.cs")]
	// Multiple partial declarations are allowed
	[ScriptPathAttribute("res://Foo/Player.cs")]
	partial class Player {}
}

[assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })]
```

The new attributes replace script metadata which we were generating by
determining the namespace of script classes with a very simple parser.
This fixes several issues with the old approach related to parser
errors and conditional compilation.
It also makes the task part of the MSBuild project build, rather than
a separate step executed by the Godot editor.
2021-03-06 21:50:32 +01:00
Duddino c47070e165 Added some checks to prevent accessing a null collider
Previously godot would try to access
`CollisionObjectBullet::bt_collision_object` even if it was null.
Fixes #46651
2021-03-06 12:07:27 +01:00
Rémi Verschelde 338fa05acc
Merge pull request #43768 from sjml/mac-mono-export-fix
Mono/macOS: Separate data dir into frameworks and resources for codesigning
2021-03-03 22:42:44 +01:00
Shane Liesegang 42eb09ddcc Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2021-03-03 13:54:34 +01:00
David Sichma 66a5002750
Fixed match for expression pattern
equality comparison now writes to right target address
2021-03-02 19:18:29 +01:00
George Marques 16e88f99e2
Merge pull request #42029 from ThakeeNathees/export-type-infer-bug-fix
GDScript export array/dictionary type infer bug fix
2021-03-02 12:14:57 -03:00
Rémi Verschelde d86369b590
Merge pull request #46559 from asmaloney/fix-code-completion
Script editor: Fix two special cases not being checked in code completion
2021-03-02 15:39:13 +01:00
Rémi Verschelde 75bfb016f2
Merge pull request #41897 from strank/not-in-conditional-done
Add a "not in" operator to GDScript.
2021-03-02 15:16:52 +01:00
Andy Maloney 4e89cb330b [script editor] Fix two special cases not being checked in code completion
When this code was changed for 4.0, a "break" statement inside a for loop in 3.x was changed to "return".

This means that the two special cases (autoloads and input actions) are never checked.

Removing the return lets these work properly in the editor.

(Also reorder conditionals to short-circuit and avoid expensive methods.)
2021-03-01 09:39:03 -05:00
Rémi Verschelde 21609c3bfd
Merge pull request #46470 from Faless/net/4.x_enet_timeout
Add set_peer_timeout to NetworkedMultiplayerENet.
2021-02-27 16:45:29 +01:00
Fabian 1b54de3039 Add set_peer_timeout to NetworkedMultiplayerENet. 2021-02-27 12:52:12 +01:00
Aaron Franke 3f50954ced
Add generic support to PackedScene.Instance 2021-02-25 20:49:22 -05:00
Rémi Verschelde b7b70004bc
Merge pull request #46379 from ThakeeNathees/signal-idf-not-found-fix
GDScript: False positive "Identifier not found" error on signals fixed
2021-02-25 22:30:22 +01:00
Hugo Locurcio 2e8e6e26a8 Document seamless noise having a lower contrast than non-seamless noise
See #41787.
2021-02-25 18:33:11 +01:00
Rémi Verschelde ee5ea64e83
Merge pull request #40276 from Taywee/master
remove invalid codeLensProvider value from lsp
2021-02-25 17:26:26 +01:00
Jack Linhart 03fd2b4c86 Added GridMap description to get_bake_meshes() 2021-02-25 15:42:49 +01:00
Aaron Franke 4b4721f5bd
Fix C# bindings generator for default value types 2021-02-25 08:30:48 -05:00
abaire 61cc1c8624 Relaxes Node naming constraints in glTF documents to match the Editor. 2021-02-24 08:22:27 -08:00
Thakee Nathees 9869522e6a false positive "Identifier not found" error or signals fixed 2021-02-24 19:34:01 +05:30
Rémi Verschelde a527c6856b
Merge pull request #46045 from bruvzg/text_server_bmp_create
[TextServer] Restores bitmap font dynamic construction functions.
2021-02-24 12:55:36 +01:00
Rémi Verschelde 88ee248db0
Merge pull request #46307 from RandomShaper/fix_crash_mono_glue
Make glue generation shutdown more graceful
2021-02-22 21:39:01 +01:00
Pedro J. Estébanez 23907e6f19 Make glue generation shutdown more graceful 2021-02-22 11:06:33 +01:00
Marcel Admiraal 92e0a84a4c Add missing semicolons to webxr.eterns.js 2021-02-21 16:10:26 +00:00
Rémi Verschelde ed8333f6bc
Merge pull request #45158 from aaronfranke/cs-packedarray
Add C# array features from core PackedArrays
2021-02-20 09:42:30 +01:00
Rémi Verschelde bc395c2549
Merge pull request #46221 from akien-mga/doc-sync-classref
doc: Sync classref with current source
2021-02-19 15:06:50 +01:00
Rémi Verschelde 0d1d719178 doc: Sync classref with current source
And fix various bogus bindings following previous PRs.
2021-02-19 14:39:14 +01:00
bruvzg 2d66f364d9
Make FreeType optional for export templates. 2021-02-19 15:01:46 +02:00
Rémi Verschelde 310496a89f
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
Pedro J. Estébanez 8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
Eric M 49714b0963 Removed hardcoded shortcuts from /scene and converted to input actions
This removes hardcoded actions from things like LineEdit and TextEdit.

Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
reduz 64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
Rémi Verschelde 8eaea1db53
Merge pull request #45032 from neikeq/classdb-tests-for-44856
Add ClassDB tests to look for core API deps on editor API
2021-02-18 15:16:52 +01:00
Vignesh1-art a5d931033e
Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded
2021-02-18 11:12:54 +05:30
Rémi Verschelde 99fc96e7b3
Merge pull request #45955 from angad-k/fix-set-joint-i-to-name
fix set_joint_i_to_name to use the provided argument
2021-02-17 13:25:31 +01:00
Angad Kambli f038dd0761 glTF: Fix set_joint_i_to_name not using its argument
Fixes #45371.
2021-02-17 13:08:35 +01:00
Aaron Franke 614299aedb
Add C# array features from core PackedArrays 2021-02-16 15:24:44 -05:00
JestemStefan 2c71ff1119
Added signed_angle_to for Vector3 2021-02-16 05:07:33 -05:00
Rémi Verschelde b196e62709
Merge pull request #46083 from ellenhp/mono_ogg_fix
Fix mono->stereo conversion for oggs
2021-02-16 10:50:10 +01:00
Rémi Verschelde c1dc38679f
Merge pull request #46039 from ellenhp/fix-empty-mp3-crash
Warn and return when attempting to load invalid MP3s
2021-02-16 09:27:42 +01:00
Ellen Poe f993d2eeee Fix mono->stereo conversion for oggs (see #40630) 2021-02-15 20:42:45 -08:00
Ellen Poe 936767deca Fail mp3 loading when attempting to load invalid mp3s
This also adds a warning for unspecified MP3 loading error codes
2021-02-15 10:02:19 -08:00
bruvzg bee718f1af
[Text Server] Restores bitmap font dynamic construction functions. 2021-02-15 10:46:49 +02:00
bruvzg f4d095cdd3
[TextServer] Restore character and space extra spacing support. 2021-02-15 10:46:23 +02:00
bruvzg 2f391bd9c3
[CTL] Fix scaling of the underline position and size. 2021-02-14 14:11:48 +02:00
Rémi Verschelde b9aa2d0dfb
Merge pull request #45953 from BastiaanOlij/no_unload_non_reloadable
Only unload the library if the reloadable flag is true
2021-02-14 12:17:14 +01:00
Rémi Verschelde 4eae532921
Merge pull request #46009 from qarmin/xatlas_leak
Fix memory leak in Xatlas module
2021-02-14 12:16:46 +01:00
Rafał Mikrut e57b8d79ec Fix memory leak in Xatlas module 2021-02-14 11:59:57 +01:00
Bastiaan Olij ae7675065a Only unload the library when no NativeScript objects exist if the reloadable flag is true. If it is false it is likely the library does other things and can't be unloaded 2021-02-14 15:47:49 +11:00
Xartorx 8e1da2e0e5 Fix Mono build after resource load cache changes 2021-02-13 22:13:45 +03:00
reduz 28537d8c84 Fix LineEdit minimum width
-Changed theme setting name to make more sense of what it does
-Reduced amount of minimum characters, so minimum size is smaller.
2021-02-12 17:04:38 +01:00
reduz f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
Henry Conklin 6575e4c1ba Fix broken gdnative variant test 2021-02-11 07:14:28 -06:00
Rémi Verschelde 94cba993bf
Merge pull request #45847 from vnen/gdnative-bindings
Improve GDNative API and JSON generation further
2021-02-11 11:11:29 +01:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
reduz 8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
George Marques 0b3819d213
Improve GDNative api.json generator
- Add indexed type to the builtin types output, which is useful for
  bindings implementing array-like access.
- Use getter type instead of hint for property types, as the hint can be
  unreliable and include multiple comma-separated possible types.
2021-02-09 11:37:15 -03:00
George Marques 66ed69edb3
Further changes to GDNative API
- Moved Variant struct definition to its own file so it can be used
  without include cycles (like on Dictionary).
- Add `index` operator function so bindings like C++ can implement the
  operator[] overload (which needs a reference to the actual value).
- Added missing new/destroy functions to Vector3i array.
- Added print error/warning functions as helpers so bindings can print
  messages in the same manner as Godot itself does.
2021-02-09 11:33:35 -03:00
Rafał Mikrut f7209b459b Initialize class/struct variables with default values in modules/ 2021-02-08 10:57:18 +01:00
jfons 99e1ce0690 Invert spotlight angle attenuation
Inverted the spotlight angle attenuation so a higher value results in
a dimmer light, this makes it more consistent with the distance
attenuation.

Also changed the way spotlighs are computed in SDFGI
and GIPorbes and GPU lightmapper, now it matches the falloff used in the scene rendering
code.
2021-02-07 20:10:33 +01:00
Kanabenki 07fb7f9888 Snap VisualScript comment to grid when resizing 2021-02-06 21:39:35 +01:00
Rémi Verschelde 3723d71de4
Merge pull request #45667 from Calinou/doc-gridmap-no-visual-layers
Document that GridMap doesn't support visual layers or cull masks
2021-02-05 10:25:04 +01:00
bruvzg e304f716c7
[Mono] Use the same search logic for both MSBuild and dotnet, add custom search paths on macOS. 2021-02-04 22:39:38 +02:00
Hein-Pieter van Braam-Stewart 403e4fd08b Fix a crash in the TGA loader with malformed input 2021-02-04 13:09:21 +01:00
Hugo Locurcio 95fda7e881
Document that GridMap doesn't support visual layers or cull masks
See #40245.
2021-02-02 19:30:55 +01:00
Miguel de Icaza f02252e37d C conformance: Include stdbool.h to define bool
`bool` is otherwise not defined in C.
2021-02-02 18:11:00 +01:00
Aaron Franke f55445079a
Replace ColorN and from HTML with a string constructor 2021-02-01 17:27:19 -05:00
Rémi Verschelde d2e1216504
Merge pull request #37547 from aaronfranke/tau
Use Math_TAU and deg2rad/etc in more places and optimize code
2021-02-01 20:55:25 +01:00
Rémi Verschelde 0db77315fe
Merge pull request #45608 from bruvzg/font_int_coords
Use integer coordinates for the font glyphs rendering.
2021-02-01 20:42:52 +01:00
zaevi baac70c27e
Fix C# string.Hash() 2021-02-01 04:12:00 -05:00
bruvzg c75923498e
Use integer coordinates for the font glyphs rendering. 2021-01-31 20:10:50 +02:00
Rémi Verschelde 5525cd85c6
Merge pull request #45315 from RandomShaper/modernize_thread
Modernize Thread
2021-01-31 15:24:56 +01:00
Hugo Locurcio 3434074933
Fix WebXRInterface code sample in the class reference
This also fixes the code sample's indentation to look correct in the
editor help.
2021-01-30 23:59:52 +01:00
Rémi Verschelde 46de553473
Merge pull request #45519 from aaronfranke/physics-real_t
Use real_t in physics code
2021-01-29 16:31:47 +01:00
George Marques 8a8dbd76b1
Add GDNative JSON generator for the builtin API
Which can be used by language bindings to generate code statically. This
is generated as a different file from the class API because it has
different requirements (the builtin types have constructors and don't
have signals), so bindings can better make use of each JSON file without
extra parsing.

This also cleans up a bit the old API generator, mainly initializing
structs and renaming "instanciable" to the more correct "instantiable".

The argument description in help text was updated to better reflect how
it should be used. The <path> argument is mandatory.
2021-01-29 11:40:37 -03:00
Pedro J. Estébanez 99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
David Snopek f6e8da3661 Remove reference to CanvasLayer in WebXR example, because it can cause rendering issues in AR. 2021-01-28 19:24:27 -06:00
Aaron Franke cb9fc117d1
Use real_t in physics code 2021-01-28 18:15:42 -05:00
Rémi Verschelde 329d4796ae
Merge pull request #45525 from van800/rider-line
Navigating to error line number in Rider from Godot editor debugger console is off-by-one.
2021-01-28 23:39:52 +01:00
Ivan Shakhov deef9a73a5 Fix off by one error navigating to line number in Rider
Fixes https://github.com/JetBrains/godot-support/issues/61
2021-01-28 22:41:12 +01:00
Aaron Franke e829b7aee4
Unify URI encoding/decoding and add to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
2021-01-28 07:45:01 -05:00
Aaron Franke a3e3bf8227
Make hex_to_int and bin_to_int handle the prefix automatically
Also add BinToInt to C#
2021-01-28 07:43:53 -05:00
David Snopek a23fc126eb Prevent fatal error in WebXR when 'immersize-ar' loses and regains tracking 2021-01-27 20:48:11 -06:00
Rémi Verschelde 9d3a9b3e7d
Merge pull request #45444 from dsnopek/webxr-master-mono
Support mono devices in WebXR
2021-01-27 21:11:31 +01:00
Gordon MacPherson 86c7faa169 Fix zero scaling and material mappings being mapped to wrong fields
- fixes scale values of 0.0013 (det == 0.00004) not rendering, they should render even at small values, but not at zero like the editor grid plugin supplies zero exactly.
- fixes node_3d_editor_plugin visibility bug when scale is zero
- fix culling with small scaling values - which are still valid to be rendered like 0.00004

note: grid is still not fixed, it has det == 0 issues but this fixes one of them.
2021-01-26 19:48:18 +00:00
George Marques fa498f6105
Merge pull request #45373 from aaronfranke/gdnative-sizeof
Define GDNative sizes using sizeof(godot_real) and sizeof(int32_t)
2021-01-26 14:00:32 -03:00
Juan Linietsky cc4388d0f3
Merge pull request #45466 from reduz/reorganize-rendering-device-layers
Reorganize RenderingDevice barriers
2021-01-26 12:34:46 -03:00
Rémi Verschelde 0991c63fba
Merge pull request #45479 from lucasvanmol/highlight-patch
Fix highlight color for class attributes that are also keywords
2021-01-26 15:56:13 +01:00
Rémi Verschelde f7dd6975fb
Merge pull request #44617 from geekrelief/gdnative_unload
free library when no nativescripts reference it
2021-01-26 15:52:33 +01:00
Rémi Verschelde 9f6a2aa321
Merge pull request #45029 from neikeq/issue-40023
C#: Fix System.Collections.Generic.List marshalling
2021-01-26 15:30:44 +01:00
Lucas Van Mol 749d0c708c Fix highlight color for class attributes that are also keywords 2021-01-26 15:17:18 +01:00
Rémi Verschelde de9c9007c2
Merge pull request #45252 from naithar/feature/plugins-migration
[4.0] [iOS] iOS Plugins Migration
2021-01-26 14:53:06 +01:00
reduz 280f334f81 Reorganize RenderingDevice barriers
-Removed sync to draw, now everything syncs to draw by default.
-Fixed many validation layer errors.
-Added support for VkImageViewUsageCreateInfo to fix validation layer warnings.
-Texture, buffer, raster and compute functions now all allow spcifying which barriers will be used.
2021-01-26 10:24:12 -03:00
Rémi Verschelde 7f863df67e
Merge pull request #45435 from fire/gltf-node-anim-export
Restore gltf node animation export.
2021-01-26 10:01:32 +01:00
Marcel Admiraal 8b983bddfb Remove Quat set methods in favour of constructors 2021-01-26 06:52:04 +00:00
Rémi Verschelde 78661d1a43
Merge pull request #45375 from aaronfranke/gltf-csg-gridmap
Make GLTF not depend on CSG or GridMap
2021-01-26 00:08:45 +01:00
Aaron Franke 6c197cf259
Define GDNative sizes using sizeof(godot_real_t) and sizeof(int32_t) 2021-01-25 16:42:14 -05:00
Rémi Verschelde 7f0b5a373a
Merge pull request #44989 from vnen/gdnative-new-api
New API for GDNative
2021-01-25 21:26:07 +01:00