Commit graph

4814 commits

Author SHA1 Message Date
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* 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-10 12:28:11 +01:00
Rémi Verschelde
741bbb9d7c
Merge pull request #58690 from elmordo/bugfix-57553-gdextension-inheritance-fix 2022-03-10 11:23:18 +01:00
Rémi Verschelde
e19da63009
Merge pull request #58946 from akien-mga/remove-unused-bullet-code
Remove unused Bullet module and thirdparty code
2022-03-10 08:01:04 +01:00
Rémi Verschelde
b85e5d51b2 Fix UndoRedo method call argument count after #58929 2022-03-09 22:21:00 +01:00
Rémi Verschelde
3d7f155586 Remove unused Bullet module and thirdparty code
It has been disabled in `master` since one year (#45852) and our plan
is for Bullet, and possibly other thirdparty physics engines, to be
implemented via GDExtension so that they can be selected by the users
who need them.
2022-03-09 21:45:47 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* 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-09 18:39:13 +01:00
Rémi Verschelde
4e3d5a9a2c VariantUtility: Unexpose Math::range_step_decimals
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-03-07 22:13:49 +01:00
Rémi Verschelde
95e6db09d0
Merge pull request #58859 from godotengine/revert-57972-fix_has_setting4 2022-03-07 14:32:25 +01:00
Rémi Verschelde
78bf9926f8
Revert "Fix ProjectSettings has_setting() when used on a overriden setting with feature tags" 2022-03-07 12:33:07 +01:00
lawnjelly
0565676893 Protection for array operator for Vector2 / 3 in DEV builds
A previous PR had changed the array operator to give unbounded access. This could cause crashes where old code depended on this previous safe behaviour.

This PR adds DEV_ASSERT macros for out of bound access to DEV builds, allowing us to quickly identify bugs in calling code, without affecting performance in release or release_debug editor builds.
2022-03-07 11:15:45 +00:00
Rémi Verschelde
6c3170e875
Merge pull request #57930 from piiertho/bugfix/add-none-flag-to-resource-saver 2022-03-07 12:05:35 +01:00
Pierre-Thomas Meisels
f9d4f08090 Fix ResourceSaver::save method exposition flag parameter
enh: Add FLAG_NONE to SaverFlags in ResourceSaver to fix api inconsistency
fix: flags parameter of ResourceSaver::save is now uint32_t to allow flag composition in scripts
2022-03-07 10:39:51 +01:00
Rémi Verschelde
a51f724b8b
Merge pull request #57812 from piiertho/bugfix/add-none-enum-global-constants 2022-03-07 10:23:25 +01:00
Pierre-Thomas Meisels
a41fb2fa3c bugfix: bind core enums' none values 2022-03-07 09:16:25 +01:00
reduz
b0ca03b0a2 Add a UniformSet cache
* Changed syntax usage for RD::Uniform to create faster with a single RID
* Converted render pass setup to use this in clustered renderer to test.

This is the first step into creating a proper uniform set cache system to simplify large parts of the codebase.
2022-03-06 13:03:33 +01:00
Rémi Verschelde
0d1e3893d9
Merge pull request #57630 from lawnjelly/bvh4_templated_checks
[4.x] BVH - Sync BVH with 3.x
2022-03-04 23:29:38 +01:00
Rémi Verschelde
0ff45dd3a7
Merge pull request #58673 from Calinou/smooth-trimesh-collision-always-setting 2022-03-04 12:25:36 +01:00
Ing. Petr Jindra
c4770e1605 fix of reading property list from custom nodes imported from GDExtension when inheritance between custom nodes is used 2022-03-02 18:50:00 +01:00
Hugo Locurcio
4219485a82
Always register the Smooth Trimesh Collision project setting
This ensures the project setting never disappears from the editor,
even if the current physics engine is GodotPhysics.

This also adds documentation for the Smooth Trimesh Collision
project setting.
2022-03-02 18:49:34 +01:00
Haoyu Qiu
d1ca29cd8c Remove TTRC() with empty string
Fixes "duplicate message definition" when extracting messages.
2022-03-02 17:02:10 +08:00
Haoyu Qiu
b00b7f9b7c Fix UndoRedo::create_action() invalid memory usage 2022-03-01 18:20:46 +08:00
Rémi Verschelde
feee9d0aa5
Merge pull request #58629 from groud/fix_native_extion_init_order 2022-03-01 01:33:48 +01:00
Rémi Verschelde
de9446186d
Merge pull request #58488 from lawnjelly/float_literals_casts 2022-03-01 01:32:07 +01:00
Gilles Roudière
ce512b35c1 Reorder native extension types initialization, initializing editor last 2022-02-28 16:03:26 +01:00
Aaron Franke
061ab30051
Use is_zero_approx and fix spelling in CameraMatrix invert 2022-02-26 12:19:54 -06:00
Hugo Locurcio
8e57e5dc6a
Print every file exported with PCKPacker.flush()s verbose parameter
Previously, only one line per 100 files was printed.

This also refactors the print statement to use Godot methods and
make it more informative overall.
2022-02-25 02:42:58 +01:00
Bartłomiej T. Listwon
3f7f780a4c Optimize String concatenation and copy functions 2022-02-24 09:47:15 +01:00
lawnjelly
1485924a2b Float literals - fix main primitives to use real_t casting
Uses (real_t) casting to ensure appropriate calculations are done in 32 bit where real_t is compiled as 32 bit.
2022-02-24 08:15:10 +00:00
Rémi Verschelde
e6c11e4dfd
Merge pull request #58331 from poiati/fix-extension-registration-order-2 2022-02-22 09:07:28 +01:00
Rémi Verschelde
3000a3076b
Merge pull request #58350 from kidrigger/patch-1 2022-02-21 12:44:32 +01:00
Paulo Poiati
fe95aa2c90 Fix extension registration order. 2022-02-20 10:58:46 -03:00
Anish Bhobe
b7ff421b55
Resolving suggestions on comment formatting. 2022-02-20 14:56:58 +01:00
Rémi Verschelde
e3d89a76f7 Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@94b76208bc
2022-02-20 12:20:17 +01:00
Rémi Verschelde
91a57b5b6a
Merge pull request #58329 from Powerbyte7/patch-1 2022-02-20 12:11:53 +01:00
Anish Bhobe
102d9fc1b3
Fixing iteration for extension level loading.
Extensions are not getting instantiating properly due to iteration calling the wrong levels for loading.
2022-02-20 11:41:39 +01:00
Powerbyte7
b8a7ea034c
[HTML5] Add Stadia controller to database
Add web support for the Stadia controller.
2022-02-19 23:01:41 +01:00
Rémi Verschelde
e031aa06ee Core: Use forward declares for Vector3/Vector3i
Add add Vector3 operator in Vector3i.
2022-02-19 16:47:24 +01:00
Rémi Verschelde
719762d4dc
Merge pull request #58166 from Zylann/fix_binary_resource_with_doubles
Fix loading of binary resources with 64-bit floats
2022-02-19 08:22:42 +01:00
Rémi Verschelde
420ad25348
Merge pull request #58205 from Zylann/fix_variant_encode_with_doubles
Add missing flag when encode_variant writes math types with doubles
2022-02-19 08:22:05 +01:00
bruvzg
759ca45820
[Editor] Fix "en" editor translation detection. 2022-02-18 22:15:02 +02:00
Rémi Verschelde
0217d44dfd
Merge pull request #58278 from Ev1lbl0w/fix_decompress_retcode 2022-02-18 15:56:21 +01:00
Ricardo Subtil
61790a03f5 Fix decompression functions not returning errcodes 2022-02-18 13:50:25 +00:00
Rémi Verschelde
e1c303fa79 Revert "Fix extension registration order."
This reverts commit 94ef200bab.

This broke extension loading.
Fixes #58273.
2022-02-18 14:18:24 +01:00
Rémi Verschelde
b4dc2e91e6
Merge pull request #58196 from poiati/fix-extension-registration-order 2022-02-18 09:07:21 +01:00
Marc Gilleron
c69d303ba9 Add missing flag when encode_variant writes math types with doubles 2022-02-16 20:47:36 +00:00
Paulo Poiati
94ef200bab Fix extension registration order. 2022-02-16 14:46:33 -03:00
Rémi Verschelde
51a00c2855
Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcode 2022-02-16 16:55:07 +01:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
jmb462
dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Rémi Verschelde
f5b9cbaff6
Merge pull request #58176 from timothyqiu/find-nearest 2022-02-16 11:01:13 +01:00