summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_setget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Add API for HSL conversion"clayjohn2023-05-101-4/+0
| | | | This reverts commit 0b7fd664c1ba372a77f78764b4ff9acfeb1f8052.
* Add API for HSL conversionbonjorno72023-05-091-0/+4
| | | | | Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV Style doesn't match the existing HSV code exactly, but should be close enough.
* Use range iterators in LocalVector loopskobewi2023-01-211-4/+4
|
* Add property usage to array indexerRaul Santos2023-01-191-1/+16
| | | | This makes the `Array` indexer show as returning `Variant` instead of `void` in the documentation.
* GDScript: Fix typing of iterator in for loopDmitrii Maganov2023-01-131-2/+2
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Rename Projection `matrix` to `columns`Aaron Franke2022-10-041-1/+1
|
* Move some methods to Animation from Variant for refactoringSilc Renew2022-09-151-566/+0
|
* Add some missing Vector4 methodskobewi2022-07-261-0/+4
|
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+17
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* Implement read-only arraysGeorge Marques2022-05-171-0/+9
| | | | | | | Arrays can be set as read-only and thus cannot be modified. Assigning the array will create an editable copy. Similar to is already done to read-only dictionaries.
* Implement read-only dictionaries.reduz2022-05-161-0/+13
| | | | | | | * Add ability to set them read only. * If read-only, it can't be modified. This is added in order to optionally make const dictionaries (and eventually arrays) properly read-only in GDScript.
* Rename Basis get_axis to get_column, remove redundant methodsAaron Franke2022-05-031-1/+1
|
* Merge pull request #60627 from aaronfranke/rename-elementsRémi Verschelde2022-05-031-1/+1
|\ | | | | Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
| * Rename Transform2D "elements" to "columns"Aaron Franke2022-04-291-1/+1
| |
* | Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-13/+13
|/ | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Make blend animation to use ResetTrack as default valueSilc 'Tokage' Renew2022-04-101-0/+104
|
* Remove VARIANT_ARG* macrosreduz2022-03-091-3/+3
| | | | | | | | * Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
* Merge pull request #53684 from TokageItLab/orthogonal-modeRémi Verschelde2022-01-051-1/+1
|\
| * Fix some gizmo behavior to make more consistentSilc 'Tokage' Renew2021-12-251-1/+1
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Rename `remove()` to `remove_at()` when removing by indexLightning_A2021-11-231-3/+3
|/
* Modify Dictionary::operator== to do real key/value comparison with recursive ↵Emmanuel Leblond2021-10-301-4/+8
| | | | support (and add unittests)
* Fix LUA-style assignment in Dictionarykobewi2021-10-051-1/+2
|
* Allow indexing of String values in scripting languagesGeorge Marques2021-09-171-0/+86
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-2/+2
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-6/+6
|
* Implement native extension systemreduz2021-06-251-2/+2
| | | | | | * Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h
* Make some variant internal functions public.reduz2021-06-171-277/+2
| | | | | -Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-3/+3
|
* Rename Quat to QuaternionMarcel Admiraal2021-06-041-16/+16
|
* Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-2/+2
| | | Also _transform to _transform3d
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-5/+5
|
* Fix PackedFloat32Array get index not workingJulien Nguyen2021-04-121-0/+1
|
* Style: Apply clang-tidy's `readability-braces-around-statements`Rémi Verschelde2021-04-051-2/+4
|
* Make Variant setget use set() method of ArrayGeorge Marques2021-03-181-60/+58
| | | | | | | | This ensure that typed arrays are properly checked when setting an element. Moved the macro to a straight declaration since the macro was only used for Array and it now is quite specific to the Array class.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-3/+3
|
* Add helper count function to VariantGeorge Marques2020-12-271-0/+5
| | | | | | 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.
* packed*arrays are pass by ref now. support duplicate and update documentationJordan Schidlowsky2020-12-171-0/+18
|
* Fix object check on Variant key checkerGeorge Marques2020-12-101-1/+1
|
* Use pointer parameters in Variant function pointersGeorge Marques2020-12-101-115/+107
| | | | | | 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.
* Variant: Merge get() and validated_get()George Marques2020-11-201-92/+2
| | | | | Since they do pretty much the same thing. The validated_get() was renamed to get() since that is more performant.
* Fix variant getters not setting return typeGeorge Marques2020-11-201-0/+12
| | | | | | The validated getters were only setting the value without changing the type, leading to wrong results. This uses the same path used for methods to the same purpose.
* Variant: Rename Type::_RID to Type::RIDRémi Verschelde2020-11-091-1/+1
| | | | | | | | The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
* Refactored variant constructor logicreduz2020-11-091-2/+2
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+2587
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code