summaryrefslogtreecommitdiff
path: root/core/extension
AgeCommit message (Collapse)Author
2022-08-23Merge pull request #64690 from ↵Rémi Verschelde
touilleMan/projection-members-offsets-in-gdentension-api
2022-08-22Ignore fake properties in classes when generating extension_api.jsonEmmanuel Leblond
In extension_api.json we want to expose properties that are meant to access a class attribute from script (i.e. `Node2D.position`). However property system is also used in Godot to declare attributes accessible from the node editor: - property with '/' in their name - property array with NIL type that represents an array
2022-08-21Add missing Projection's members offsets to gdextension_api.jsonEmmanuel Leblond
2022-08-18Make `property_*_revert` methods multilevel and expose them for scriptingYuri Sizov
2022-08-08Print expected `os.arch` tuple for current platform in GDExtension errorHugo Locurcio
This also adds `Engine.get_architecture_name()` to get the name of the CPU architecture the Godot binary was built for.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-23Implement Vector4, Vector4i, Projectionreduz
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.
2022-07-16Changed bool to GdNativeBoolbasta
2022-07-15Use BitField hint for the TextServer enums. Add missing parts for BitField ↵bruvzg
support to the GDextension API.
2022-07-12Remove unused hintskobewi
2022-07-05Implement a BitField hintreduz
Allows to specify the binder that an enum must be treated as a bitfield.
2022-06-29GDExtension: reuse code with constructor PropertyInfo(const ↵Jan Haller
GDNativePropertyInfo&)
2022-06-27Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz <reduzio@gmail.com>
2022-06-23Add core types enums description to extension api jsonPierre-Thomas Meisels
2022-06-19GDExtension: print error messages for different error paths during loadingJan Haller
2022-06-17Make enum/constant binds 64-bit.bruvzg
2022-06-12Fix NativeExtension::open_library return value when the undelying lib fails ↵Emmanuel Leblond
to initialize
2022-06-06[GDExtension] Expose Variant, NodePath and StringName hash functions.bruvzg
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-11Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky
2022-05-10Merge pull request #55876 from bradc6/feature/AllowForAbsoluteLibraryPathsRémi Verschelde
2022-05-08Merge pull request #60886 from ↵Rémi Verschelde
touilleMan/gdextension-header-duplicated-GDNativeExtensionClassGetPropertyList Fix duplication of GDNativeExtensionClassGetPropertyList definition in gdnative_interface.h
2022-05-08Fix duplication of GDNativeExtensionClassGetPropertyList definition in ↵Emmanuel Leblond
gdnative_interface.h
2022-05-08Fix extension_api.json builtin_class_member_offsets member names for ColorEmmanuel Leblond
2022-05-06[GDExtension] Fix static method binds and default arguments.bruvzg
2022-05-04Merge pull request #60723 from reduz/refactor-module-initializationRémi Verschelde
2022-05-04Refactor module initializationreduz
* Changed to use the same stages as extensions. * Makes the initialization more coherent, helping solve problems due to lack of stages. * Makes it easier to port between module and extension. * removed the DRIVER initialization level (no longer needed).
2022-05-03Merge pull request #60714 from Calinou/typedef-remove-refRémi Verschelde
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
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-04-29Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond
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-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-28Merge pull request #59553 from reduz/script-extension-supportRémi Verschelde
2022-03-27GDExtension: change to_string signature to accept GDNativeStringPtr instead ↵Jan Haller
of returning const char*
2022-03-27Add GDExtension support to Scriptreduz
* Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-22Add static method support to ClassDBreduz
* Based on the work done for Variant in the past. * Added `ClassDB::bind_static_method` * Cleaned up ClassDB::bind_method to use variadic templates. This adds support for having static methods in Object derived classes. Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
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-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
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-02-28Reorder native extension types initialization, initializing editor lastGilles Roudière
2022-02-22Merge pull request #58331 from poiati/fix-extension-registration-order-2Rémi Verschelde
2022-02-20Fix extension registration order.Paulo Poiati
2022-02-20Resolving suggestions on comment formatting.Anish Bhobe
2022-02-20Fixing iteration for extension level loading.Anish Bhobe
Extensions are not getting instantiating properly due to iteration calling the wrong levels for loading.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-23If a gdextension library filepath is an absolute path do not attempt to ↵Bradley Clemetson
append the base directory on top of that. While this is a uncommon if not unused case for a release version it is helpful for development builds. Fix formatting
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings