ecfa570ccb
Add static method support to core Variant types
...
* Properly exposed, including validated and variant call
* Bound static functions in String and Color
* Did not add support for scripting languages, will have to be added manually.
2021-03-16 10:53:05 -03:00
91181c2086
Fixes small typos and grammar correction
2021-03-12 19:05:16 +05:30
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
6985967c3b
Add missing ERR_FAIL_INDEX check to Variant::construct
...
Other functions in the same file validate parameters using the ERR_FAIL
macros. This validation was missing for Variant::construct resulting in
a crash when called with invalid data (p_type < 0).
fix #46067
2021-03-04 18:50:37 +01:00
2cbdcb03a1
Don't allow to use in bit shift negative operands
2021-03-04 16:25:40 +01:00
61cc1c8624
Relaxes Node naming constraints in glTF documents to match the Editor.
2021-02-24 08:22:27 -08:00
f1088e1b70
Bind ClockDirection enum
...
It's the only enum in math_defs.h not bound, and it's used by Plane.
2021-02-23 13:56:28 -03:00
7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector
2021-02-16 18:33:23 -05:00
2c71ff1119
Added signed_angle_to for Vector3
2021-02-16 05:07:33 -05:00
fb83d905da
Change sort_custom/bsearch_custom to use Callables
2021-02-04 14:37:52 +01:00
f55445079a
Replace ColorN and from HTML with a string constructor
2021-02-01 17:27:19 -05:00
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
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
976e768e71
Merge pull request #45489 from aaronfranke/core
...
Type consistencies in core
2021-01-27 21:16:20 +01:00
1be0d6b30e
Type consistencies in core
2021-01-26 13:04:22 -05:00
38a5d22079
Renamed String.ord_at to unicode_at
2021-01-26 20:36:12 +03:00
8b983bddfb
Remove Quat set methods in favour of constructors
2021-01-26 06:52:04 +00:00
f6be114d02
Merge pull request #44427 from briansemrau/fix-variant-bitand-validated-eval
...
Fix bitwise-and eval not updating return type
2021-01-11 13:53:27 +01:00
eea3287c2d
Merge pull request #44661 from AndreaCatania/AndreaCatania-patch-5
...
Fixes: GDscript min and max are inverted
2021-01-05 13:42:08 +01:00
b5334d14f7
Update copyright statements to 2021
...
Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
6cebb8c117
Merge pull request #44586 from madmiraal/rename-stepify
...
Rename Math::stepify to snapped
2020-12-28 21:46:43 +01:00
058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
...
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
b743a2ef3c
Rename Math::stepify to snapped
2020-12-28 13:01:30 +00:00
b628912af0
Rename Rect2 and Rect2i grow_margin() to grow_side()
2020-12-28 12:47:33 +00:00
5b937d493f
Rename empty() to is_empty()
2020-12-28 10:39:56 +00:00
d66a58a4d4
Add helper count function to Variant
...
To get counts of items before getting the list, which is useful for
GDNative so users can pre-allocate the buffer with the correct size
without having to get the list twice.
2020-12-27 11:14:29 -03:00
7c6506e028
Fixes: GDscript min and max are inverted
2020-12-24 18:03:50 +01:00
4b8b803931
Rename Control margin to offset
2020-12-23 06:25:56 +00:00
6532596d97
Merge pull request #44472 from winterpixelgames/PR-duplicate-packedarrays
...
Add support for duplicate() for Packed*Array, and they are pass by ref in godot 4.0
2020-12-21 17:30:01 +01:00
2df9a8ccad
Rename Rect2 and Rect2i clip() to intersection()
2020-12-19 12:59:08 +00:00
2d56e09276
packed*arrays are pass by ref now. support duplicate and update documentation
2020-12-17 16:09:32 -06:00
1b745c7bae
Fix crash parsing a serialized Reference
2020-12-17 12:24:57 +01:00
bb4d44102d
Fix bitwise-and eval not updating return type
2020-12-16 08:59:06 -05:00
cb42bf113c
Merge pull request #44406 from vnen/variant-ptr-construct
...
Add PtrConstruct template to use in Variant constructors
2020-12-15 22:59:32 +01:00
b3f452b1d2
Change template order in method_ptrcall.h
...
To be consistent with the enum in Variant so missing types can be more
easily spotted.
2020-12-15 17:02:50 -03:00
35e7490c95
Add PtrConstruct template to use in Variant constructors
...
Since the PtrToArg::encode requires the value to be constructed
previously. With PtrConstruct this is not required.
2020-12-15 16:57:44 -03:00
0abacae2d3
Fix object check on Variant key checker
2020-12-10 18:18:52 -03:00
e4e9231420
Use pointer parameters in Variant function pointers
...
Instead of references. This is needed because those function pointers
are used in GDNative which needs to work with plain C, which doesn't
support passing parameters by reference.
2020-12-10 18:18:47 -03:00
5465e604bb
Improve argument names for core types
2020-12-07 05:01:33 -05:00
a24c38d1a8
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-06 18:16:06 +00:00
4c232e4222
Fix subtracting colors and quats
2020-12-03 14:22:12 +01:00
029fd88adb
Fix VariantInternal initialization and setting of object
...
- Initialize Object pointer to nullptr so it's not used by mistake.
- When setting an Object check if it's a reference so refcounting works
as intended.
2020-11-30 14:49:52 -03:00
493da99269
[Complex Text Layouts] Implement TextServer interface. Implement Fallback TextServer.
2020-11-26 13:55:26 +02:00
ff790796af
Merge pull request #43864 from vnen/fix-print-utilities
...
Fix prints and printt functions printing as errors
2020-11-25 23:07:52 +01:00
40b683f8bb
Fix prints and printt functions printing as errors
2020-11-25 16:18:41 -03:00
d76806d322
Core: Always enable ptrcall, remove PTRCALL_ENABLED define
...
ptrcall is now also used to optimize calls in GDScript, on top of the existing
use by the GDNative and Mono modules.
It no longer makes sense to make it optional.
2020-11-25 14:08:17 +01:00
7bd03b7188
Initialize class/struct variables with default values in core/ and drivers/
2020-11-23 17:38:46 +01:00
4ed42bfc29
Merge pull request #43725 from vnen/gdscript-typed-vm-2
...
GDScript: Typed VM Take 2
2020-11-23 09:59:20 +01:00
15b085e8db
Add extra functions to VariantInternal
...
- Allow getting an opaque pointer, no matter the type (for ptrcall).
- Allow setting object pointer and id directly.
- Allow initializing the data given a type, to allow properly setting
return types on ptrcalls.
2020-11-21 13:24:49 -03:00
c8e3fb8b05
Variant: Merge get() and validated_get()
...
Since they do pretty much the same thing. The validated_get() was
renamed to get() since that is more performant.
2020-11-20 17:26:19 -03:00