summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2022-06-07Merge pull request #59786 from V-Sekai/ok_colorRémi Verschelde
Allow picking similar colours using OKHSL.
2022-06-07Merge pull request #50349 from Calinou/array-add-some-everyRémi Verschelde
Add `any()` and `all()` methods to Array
2022-06-07Allow picking similar colours using OKHSL.K. S. Ernest (iFire) Lee
2022-06-06Merge pull request #59883 from KoBeWi/merge_thisRémi Verschelde
2022-06-06[GDExtension] Expose Variant, NodePath and StringName hash functions.bruvzg
2022-06-03Add StringName explicitly to Variant::hash_compareGeorge Marques
This makes equality comparisons to StringName more performant
2022-05-31Add Dictionary.merge()kobewi
2022-05-25Add `any()` and `all()` methods to ArrayHugo Locurcio
These can be used as faster, more convenient shorthands to using `filter()` + `size()`.
2022-05-17Implement read-only arraysGeorge Marques
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.
2022-05-16Implement read-only dictionaries.reduz
* 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.
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-12Add a new HashMap implementationreduz
Adds a new, cleaned up, HashMap implementation. * Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing). * Keeps elements in a double linked list for simpler, ordered, iteration. * Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much for performance vs keeping the key, but helps replace old code). * Uses a more modern C++ iterator API, deprecates the old one. * Supports custom allocator (in case there is a wish to use a paged one). This class aims to unify all the associative template usage and replace it by this one: * Map<> (whereas key order does not matter, which is 99% of cases) * HashMap<> * OrderedHashMap<> * OAHashMap<>
2022-05-11Merge pull request #58873 from Chaosus/power_opRémi Verschelde
Implement exponential operator (**) to GDScript/Expressions
2022-05-11Merge pull request #56167 from cdemirer/constructor-toarray-fixRémi Verschelde
2022-05-11Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky
2022-05-07Add search methods for packed arraysHaoyu Qiu
* count() * find() * rfind()
2022-05-06Merge pull request #60609 from nathanfranke/string-quotesRémi Verschelde
2022-05-05Core: Rename math 'phi' arguments to 'angle'Rémi Verschelde
2022-05-05Merge pull request #48989 from MarioLiebisch/variant-comment-line-breaksRémi Verschelde
Properly increase line counter when parsing comments
2022-05-03quote strings inside arrays and dictionariesNathan Franke
2022-05-03Rename Basis get_axis to get_column, remove redundant methodsAaron Franke
2022-05-03Merge pull request #60627 from aaronfranke/rename-elementsRémi Verschelde
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
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.
2022-04-30Simplify Callable error text methodskobewi
2022-04-29Rename Basis "elements" to "rows"Aaron Franke
2022-04-29Rename Transform2D "elements" to "columns"Aaron Franke
2022-04-20Fix more issues found by cppcheck.bruvzg
2022-04-13Merge pull request #60093 from TokageItLab/reset-blendRémi Verschelde
Make blend animation to use ResetTrack as default value
2022-04-13Color: Rename `to_srgb`/`to_linear` to include base color spaceRémi Verschelde
This helps reduce confusion around sRGB <> Linear conversions by making both input and output color spaces explicit.
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-10Make blend animation to use ResetTrack as default valueSilc 'Tokage' Renew
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-03-28Expose Color's `to_linear()` and `to_srgb()` to scriptingHugo Locurcio
2022-03-27Const Ref Callable for custom sort/searchmashumafi
2022-03-24Refactor Object metadatareduz
* API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change. * Metadata now exposed as individual properties. * Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace. * Added the ability to Add/Remove metadata properties to the inspector. This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender.
2022-03-18Merge pull request #58233 from bruvzg/gde_tsRémi Verschelde
2022-03-17Merge pull request #57675 from TokageItLab/fix-blendingRémi Verschelde
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-03-16Fix blend animation to solve TRS track bug & blend order inconsistencySilc 'Tokage' Renew
2022-03-15Create GDExtension clases for PhysicsServer3Dreduz
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support) * Some changes on native struct binding for PhysicsServer This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-09Remove VARIANT_ARG* macrosreduz
* 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.
2022-03-07VariantUtility: Unexpose `Math::range_step_decimals`Rémi Verschelde
This method was meant only as a convenience for editor code to allow using a step of 0 to disable snapping. It was exposed by mistake when refactoring GlobalScope.
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-12Implement cubic_interpolate() as MathFunc for refactoringSilc 'Tokage' Renew
2022-02-12Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker
2022-02-11Fix Variant Ref<> assignment.reduz
-Creating from object pointer via funcptr API was missing reference initialization. -Supersedes https://github.com/godotengine/godot-cpp/pull/662 -Fixes several crashes in GDExtension
2022-02-08Merge pull request #57066 from KoBeWi/in_the_name_of_the_customRémi Verschelde
2022-02-08[GDExtension] Add binds for missing methods, operators, and constants ↵bruvzg
required for GDExtension TextServer implementation.
2022-02-07Fix script editor errors with CustomCallableskobewi