Commit graph

4938 commits

Author SHA1 Message Date
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
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
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