Rémi Verschelde
7aacb098f0
Add forward compat parsing of PackedVector4Array
...
This new Variant type is being added in 4.3, and breaks compatibility with
earlier releases. By adding minimal parsing support (converting to plain Array)
we can at least open the scenes, and minimize the data loss when going back and
forth between minor versions.
2024-05-03 00:20:12 +02:00
Haoyu Qiu
4ade4ab92a
Add support for reading text resource format 4
...
Co-Authored-By: Gilles Roudiere <gilles.roudiere@gmail.com>
2024-04-30 09:02:19 +08:00
kobewi
bfc72801fd
Ignore ERR_FILE_CANT_OPEN error when loading scene
...
(cherry picked from commit f0cbd388dc
)
2024-04-08 15:48:30 +02:00
kobewi
dc865a1ec6
Don't abort loading when ext_resource is missing
...
(cherry picked from commit 1de0415118
)
2024-04-08 15:48:30 +02:00
Aaron Franke
3a8c04ea3c
Add PackedRealArray as an alias for Vector<real_t>
...
(cherry picked from commit 3f469ee485
)
2024-01-25 18:08:46 +01:00
Rémi Verschelde
6ae6cc0bf5
Merge pull request #84815 from TokageItLab/array-animation
...
Rework blending method in `Variant` animation for `Int`/`Array`/`String`
2023-11-16 14:52:00 +01:00
Silc Lizard (Tokage) Renew
80c9533810
Rework blending method in Variant animation for Int/Array/String
2023-11-16 21:37:18 +09:00
Alistair Leslie-Hughes
5b6f641e99
Fix sizeof usage for Variant pointers in alloca
...
Coverity report this as a non portable usage of sizeof
2023-11-16 07:13:14 +11:00
kobewi
275e9d7028
Keep Variant type after zero()
2023-11-08 12:13:36 +01:00
Yuri Sizov
4952d37f4b
Fix StringName leaks in VariantParser
2023-10-19 17:13:15 +02:00
Danil Alexeev
0c2202c56e
GDScript: Fix incorrect error message for utility functions
2023-10-16 14:09:57 +03:00
Rémi Verschelde
a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
...
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
Rémi Verschelde
35ede42d1d
Merge pull request #82695 from maiself/object-less-callables-fixes
...
Fixes to allow object-less callables throughout Godot
2023-10-09 15:32:38 +02:00
A Thousand Ships
f18aa00e85
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-08 17:23:33 +02:00
Mai Lavelle
5e15586ec2
Fixes to allow object-less callables throughout Godot
...
This fixes #81887
2023-10-06 16:31:35 -04:00
Rémi Verschelde
a6a2d0d159
Merge pull request #82794 from dsnopek/gdextension-validated-call
...
GDExtension: Convert `validated_call()` to `ptrcall()` (rather than `call()`)
2023-10-06 16:50:57 +02:00
kobewi
09b30be86d
Add vararg call() method to C++ Callable
2023-10-05 11:35:29 +02:00
David Snopek
55596eaac6
GDExtension: Convert `validated_call()` to `ptrcall()` (rather than `call()`)
2023-10-04 10:53:17 -05:00
Jakub Janšta
74c937079c
Add type_string() utility
2023-10-02 17:41:20 +02:00
Rémi Verschelde
e95b7e84a4
Merge pull request #80844 from dalexeev/fix-callable-expected-argc
...
Fix expected argument count for `Callable` call errors
2023-10-02 13:15:53 +02:00
etti
3a39de4e2f
Add rotate_toward and angle_difference to GDScript and C#
2023-10-01 22:19:42 +02:00
Danil Alexeev
aff767ef07
Fix expected argument count for `Callable` call errors
2023-09-29 20:00:10 +03:00
Rémi Verschelde
737c308dcc
Merge pull request #74588 from puchik/float-variant-nan-inequality
...
Support numeric/binary hash comparison for floats derived from Variants (as well as existing semantic comparison)
2023-09-27 14:03:34 +02:00
Rémi Verschelde
3ec673085b
Merge pull request #79523 from aaronfranke/is-conformal
...
Add `is_conformal` method to Basis and Transform2D
2023-09-26 13:44:41 +02:00
Rémi Verschelde
7bb80b1525
Merge pull request #81741 from KoBeWi/vectoring_to_the_MAXXX
...
Add `Vector2/3/4i.MAX` and `MIN`
2023-09-17 14:47:52 +02:00
Rémi Verschelde
61df1deb61
Merge pull request #80075 from Bromeon/gdextension/optimize-ptrcalls
...
GDExtension: `PtrToArg::convert()` uses const-reference where possible
2023-09-17 14:46:13 +02:00
kobewi
adc930baee
Add Vector2/3/4i.MAX and MIN
2023-09-16 21:52:13 +02:00
Aaron Franke
56806ffeed
Add `is_conformal` method to Basis and Transform2D
2023-09-13 17:20:30 -05:00
A Thousand Ships
893f889d74
[Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-11 19:45:49 +02:00
Aaron Franke
6f7eccc758
Add a type conversion method to Variant Utility and expose to scripting
2023-09-08 10:12:48 -05:00
Yuri Sizov
d8ff69d53c
Extract ScriptInstance to simplify includes
...
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.
This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Daylily-Zeleen
67e1401891
Set builtin varrarg ptrcalls, called without arg.
2023-09-02 00:34:16 +08:00
Rémi Verschelde
bbdd1aaa38
Merge pull request #81131 from AThousandShips/callable_fix
...
Fix comparison of `Callable`s with binds
2023-09-01 16:02:35 +02:00
Jcrespo
528a76486c
Add inverse hyperbolic functions `asinh()`, `acosh()` & `atanh()`
...
GDScript has the following built-in trigonometry functions:
- `sin()`
- `cos()`
- `tan()`
- `asin()`
- `acos()`
- `atan()`
- `atan()`
- `sinh()`
- `cosh()`
- `tanh()`
However, it lacks the hyperbolic arc (also known as inverse
hyperbolic) functions:
- `asinh()`
- `acosh()`
- `atanh()`
Implement them by just exposing the C++ Math library, but clamping
its values to the closest real defined value.
For the cosine, clamp input values lower than 1 to 1.
In the case of the tangent, where the limit value is infinite,
clamp it to -inf or +inf.
References #78377
Fixes godotengine/godot-proposals#7110
2023-09-01 01:27:56 +02:00
Arman Elgudzhyan
ee27254602
Support both semantic (by default) and numeric Variant hash comparison
...
Hash comparison for Variant continues to perform semantic/logical comparison with NaN's considered equal by default (to prevent #16114 , #7354 , #6947 , #8081 ), but now optionally allows for numeric comparison that does not consider NaN's equal to support proper value comparison (for #72222 )
2023-08-31 09:29:48 -07:00
A Thousand Ships
2caf5ae453
Fix comparison of `Callable`s with binds
2023-08-29 16:10:14 +02:00
Danil Alexeev
5d689ad560
Core: Fix recursion level check for `VariantWriter::write()` with objects
2023-08-29 15:05:53 +03:00
Thaddeus Crews
c82bdef2fc
Undefine typed array templates after use
2023-08-19 12:30:43 -05:00
Rémi Verschelde
1d70968e9a
Merge pull request #79370 from dalexeev/core-array-recursion-check
...
Core: Fix recursion level check for array stringification
2023-08-18 15:43:29 +02:00
Rémi Verschelde
20e24bd2bb
Merge pull request #78529 from Chaosus/string_reverse
...
Add `String.reverse` method
2023-08-16 16:53:40 +02:00
Jan Haller
38334fdc11
PtrToArg::convert() returns const-references where possible, avoids unnecessary copies
2023-08-07 20:40:23 +02:00
Rémi Verschelde
4ed08409b0
Merge pull request #78108 from aaronfranke/variant-util-header
...
Make a header for VariantUtilityFunctions
2023-08-03 14:46:29 +02:00
Joseph Davies
510de82f43
Fix typo in modulo error message.
2023-08-01 04:47:18 -07:00
Yuri Sizov
3d04a22d7c
Merge pull request #79103 from AThousandShips/array_slice_range
...
Fix range error for `Array.slice`
2023-07-17 16:48:48 +02:00
Danil Alexeev
bb40bd9aaa
Core: Fix recursion level check for array stringification
2023-07-12 14:59:44 +03:00
Rémi Verschelde
0c1442f82a
Merge pull request #78551 from AThousandShips/call_rpc
...
Fix `rpc` calls with binds
2023-07-08 18:15:41 +02:00
Ninni Pipping
7752a0d8d1
Fix range error for `Array.slice`
2023-07-07 23:19:42 +02:00
Gabor Koncz
a2ede8c4da
Fix GDVIRTUAL_NATIVE_PTR
...
This commit fixes the usage of GDExtensionPtr and GDExtensionConstPtr
in GDExtension by introducing the required VariantInternalAccessor
specializations.
Sponsored by Migeran (https://migeran.com )
2023-07-03 10:52:02 +02:00
Ninni Pipping
9159208ed1
Ensure `RID`, `Callable`, and `Signal` are stored as strings
...
Prevents parser errors in `.tscn` and `.tres` files where the assignment
would otherwise be empty.
2023-06-22 17:01:08 +02:00
Ninni Pipping
7d174c8dfe
Fix `rpc` calls with binds
2023-06-22 11:07:53 +02:00