summaryrefslogtreecommitdiff
path: root/core/variant
AgeCommit message (Collapse)Author
2021-07-05Fix Variant tags parsing.bruvzg
2021-07-01Force String as Dictionary key instead of StringNamereduz
* Lua table syntax uses named indexing: `{ mykey = myvalue }` * Python style syntax uses string indexing: `{ "mykey" : myvalue }` * Both are incompatible since a StringName key wont fetch a String key, hence confusing. * This PR proposes always using String for indexing at a very minimal performance cost. Always indexing with StringNames will be faster, but they are considerably more expensive to create.
2021-07-01Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.xLyuma
2021-06-25Implement native extension systemreduz
* 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
2021-06-20Move many input enums to their own fileAaron Franke
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-19Merge pull request #44806 from madmiraal/consolidate_jsonRémi Verschelde
Consolidate JSON, JSONParseResults and JSONParser into JSON
2021-06-19Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal
Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
2021-06-19Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde
Make some Variant internal functions public.
2021-06-18Merge pull request #49659 from LightningAA/string-valid-integer-to-intRémi Verschelde
2021-06-18Merge pull request #44156 from aaronfranke/quat-angle-toRémi Verschelde
Add Quaternion angle_to method
2021-06-18Merge pull request #49638 from aaronfranke/multiply-transformsRémi Verschelde
Allow multiplying Transforms and Basis by numbers
2021-06-17Add Quaternion angle_to methodAaron Franke
2021-06-18Better format arguments in variant parserMichael Alexsander Silva Dias
2021-06-17Make some variant internal functions public.reduz
-Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM
2021-06-16Rename `is_valid_integer()` to `is_valid_int()`Lightning_A
Method from `String`
2021-06-15Allow multiplying Transforms and Basis by numbersAaron Franke
2021-06-14Fix json dump and print of circular structureHaoyu Qiu
2021-06-13Merge pull request #34668 from aaronfranke/to-stringRémi Verschelde
[Core] Reformat structure string operators
2021-06-12VariantParser: Fix reading StringNames with '&'.Rémi Verschelde
Keep support for '@' for now for compatibility. Fixes #49535. Fixes #49542.
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-06-11Reformat structure string operatorsAaron Franke
The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
2021-06-11Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11Merge pull request #49279 from Calinou/rename-string-is-abs-path-methodRémi Verschelde
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde
File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
2021-06-10Let var2str display StringName with correct sigilJonathan Gollnick
2021-06-05New and improved IK system for Skeleton2DTwistedTwigleg
This PR and commit adds a new IK system for 2D with the Skeleton2D node that adds several new IK solvers, a way to control bones in a Skeleton2D node similar to that in Skeleton3D. It also adds additional changes and functionality. This work was sponsored by GSoC 2020 and TwistedTwigleg. Full list of changes: * Adds a SkeletonModifier2D resource * This resource is the base where all IK code is written and executed * Has a function for clamping angles, since it is so commonly used * Modifiers are unique when duplicated so it works with instancing * Adds a SkeletonModifierStack2D resource * This resource manages a series of SkeletonModification2Ds * This is what the Skeleton2D directly interfaces with to make IK possible * Adds SkeletonModifier2D resources for LookAt, CCDIK, FABRIK, Jiggle, and TwoBoneIK * Each modification is in its own file * There is also a SkeletonModifier2D resource that acts as a stack for using multiple stacks together * Adds a PhysicalBone2D node * Works similar to the PhysicalBone3D node, but uses a RigidBody2D node * Changes to Skeleton2D listed below: * Skeleton2D now holds a single SkeletonModificationStack2D for IK * Skeleton2D now has a local_pose_override, which overrides the Bone2D position similar to how the overrides work in Skeleton3D * Changes to Bone2D listed below: * The default_length property has been changed to length. Length is the length of the bone to its child bone node * New bone_angle property, which is the angle the bone has to its first child bone node * Bone2D caches its transform when not modified by IK for IK interpolation purposes * Bone2D draws its own editor gizmo, though this is stated to change in the future * Changes to CanvasItemEditor listed below: * Bone2D gizmo drawing code removed * The 2D IK code is removed. Now Bone2D is the only bone system for 2D * Transform2D now has a looking_at function for rotating to face a position * Two new node notifications: NOTIFICATION_EDITOR_PRE_SAVE and NOTIFICATION_EDITOR_POST_SAVE * These notifications only are called in the editor right before and after saving a scene * Needed for not saving the IK position when executing IK in the editor * Documentation for all the changes listed above.
2021-06-04Rename Quat to QuaternionMarcel Admiraal
2021-06-04Add "Transform" compatibility name for "Transform3D" in VariantParserAaron Franke
2021-06-03Merge pull request #38430 from aaronfranke/transform3dRémi Verschelde
2021-06-03Allow clamping vectors and colorsAaron Franke
2021-06-03Rename Vector2 clamped to limit_length and add limit_length to Vector3Aaron Franke
2021-06-03Rename `String.is_abs_path()` to `String.is_absolute_path()`Hugo Locurcio
This is more consistent with `NodePath.is_absolute()`.
2021-06-03Rename files and the exposed name for Transform3DAaron Franke
2021-06-03Rename Variant TRANSFORM to TRANSFORM3DAaron Franke
Also _transform to _transform3d
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-05-25Return error when decompressing empty PoolByteArrayPaweł Fertyk
2021-05-24Merge pull request #49037 from vnen/fix-callable-freed-crashRémi Verschelde
2021-05-24Make Callable not crash on call when the object has been freedGeorge Marques
Also add a GDScript test for this case.
2021-05-21Remove alloca from loop and use a single fixed size array declarationMarcel Admiraal
2021-05-20Fix #46282 Executing RigidBody3D.get_inverse_inertia_tensor() crashes GodotJohnM666
2021-05-11GDNative: Fix size mismatch on 32-bit platforms for Signal and CallableRémi Verschelde
Fixes #48645.
2021-05-06Merge pull request #38645 from KoBeWi/FMRRémi Verschelde
Add filter, map and reduce to Array
2021-05-06Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio
2021-05-05Add filter, map and reduce to ArrayTomasz Chabora
2021-05-04Merge pull request #48442 from akien-mga/posmod-int64_tRémi Verschelde
Re-bind posmod, use int64_t instead of int
2021-05-04Re-bind posmod, use int64_t instead of intRémi Verschelde
Fixes #48420, fixes #48421. The binding was missed when moving GDScript built-in to Global Scope it seems. Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2021-05-03Add RPC to Callablereduz
-Up to each scripting language to implement this -If not supported for the function, it will just error when you try to call
2021-05-03Merge pull request #35245 from qarmin/unsigned_bit_shiftRémi Verschelde
Don't allow to use in bit shift negative operands
2021-04-28Merge pull request #46476 from DarknessCatt/masterRémi Verschelde
Add fill method to Arrays and PackedArrays