Commit Graph

664 Commits

Author SHA1 Message Date
Chris Cranford fdc5b42646 Add default implementation of `ScriptLanguageExtension::preferred_file_name_casing`. 2024-05-04 18:50:04 -04:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Rémi Verschelde 947f5a8741
Merge pull request #91247 from AThousandShips/callable_fix
Fix unsafe uses of `Callable.is_null()`
2024-04-29 10:10:32 +02:00
A Thousand Ships 31e7ee63f2
Fix unsafe uses of `Callable.is_null()`
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
Jan Haller 27a637d287 GDExtension: provide `free_property_list_func` with length of array 2024-04-27 14:13:17 +02:00
Rémi Verschelde 2e92fb00d4
Merge pull request #90540 from Repiteo/core/type-info-use-type-traits
Core: Use `<type_traits>` where applicable
2024-04-24 18:55:07 +02:00
Rémi Verschelde e50867ae34
Merge pull request #90776 from Naros/avoid-script-language-not-overridden
Defer call to `set_break_language`
2024-04-19 16:27:33 +02:00
Rémi Verschelde 0b8042180e
Merge pull request #90447 from dsnopek/gdextension-hot-reload-not-classdb-instantiate
Fix GDExtension hot reload for classes not created via `ClassDB::instantiate()`
2024-04-19 16:27:26 +02:00
Pedro J. Estébanez 8192d1cbc7 WorkerThreadPool: Fix yield-over for not-yet-started tasks 2024-04-18 19:25:19 +02:00
Rémi Verschelde 866f2c56f7
Merge pull request #90674 from RadiantUwU/change_stuff
Implement `Object.remove_user_signal(signal: StringName)`
2024-04-18 12:24:34 +02:00
Radiant e263b11cdd Implement remove_user_signal()
Co-authored-by: Timothe Bonhoure <tbonhoure@ymail.Com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-04-18 11:22:59 +03:00
Pedro J. Estébanez 9653bcaa43 WorkerThreadPool: Polish yielding (fix corner case, remove misleading warning) 2024-04-17 18:32:14 +02:00
Chris Cranford d0fa2c3cfa Defer call to set_break_language 2024-04-16 20:01:53 -04:00
Thaddeus Crews 127025679b
Core: Use `<type_traits>` where applicable 2024-04-11 13:13:59 -05:00
Pedro J. Estébanez 1b104ffcd8 WorkerThreadPool: Support daemon-like tasks (via yield semantics) 2024-04-10 18:47:42 +02:00
Pedro J. Estébanez 71facbaa88 WorkerThreadPool: Fix data race 2024-04-10 18:47:41 +02:00
A Thousand Ships 64146cb7f3
[Core] Add iteration support to `Array` 2024-04-10 14:49:34 +02:00
David Snopek 87aec2745d Fix GDExtension hot reload for classes not created via `ClassDB::instantiate()` 2024-04-09 13:40:33 -05:00
Rémi Verschelde 48cf825839
Merge pull request #89451 from AThousandShips/emit_fix
[Core] Disconnect one-shot signals before calling callbacks
2024-03-24 01:15:52 +01:00
Rémi Verschelde d5f944ff10
Merge pull request #89261 from paulloz/core/fix-script-reloading-outside-script-editor
Fix how scripts reload outside of ScriptEditor
2024-03-24 01:15:23 +01:00
A Thousand Ships db455e5bee
[Core] Disconnect one-shot signals before calling callbacks
This prevents infinite recursion with one-shot connections emitting
themselves
2024-03-20 20:24:44 +01:00
Paul Joannon 63674648fb
Fix how scripts reload outside of ScriptEditor 2024-03-18 10:29:06 +01:00
Rémi Verschelde 68ad520da4
Merge pull request #89519 from YeldhamDev/are_you_kidding_me_right_now
Fix translation fallback not working in the Project Manager
2024-03-15 17:01:34 +01:00
Michael Alexsander 11937d3a79
Fix translation fallback not working in the Project Manager 2024-03-15 12:00:20 -03:00
Rémi Verschelde 7d4804e945
Merge pull request #89490 from AThousandShips/queue_print_fix
[Core] Prevent further infinite recursion when printing errors
2024-03-15 10:40:08 +01:00
A Thousand Ships 14897f6dd7
[Core] Prevent further infinite recursion when printing errors 2024-03-14 22:44:22 +01:00
Rémi Verschelde 4163fb9c26
Merge pull request #89489 from YeldhamDev/yet_another_etr_fix
Fix some translations not properly falling back
2024-03-14 22:35:41 +01:00
Rémi Verschelde 453485aede
Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
Michael Alexsander 05f6c56a48
Fix some translations not properly falling back 2024-03-14 16:38:12 -03:00
A Thousand Ships 0c19d0f5a0
Add extension support for argument count to `ScriptInstance` 2024-03-13 22:40:09 +01:00
Rémi Verschelde a1c476f9d7
Merge pull request #87680 from AThousandShips/the_angry_count
Add methods to get argument count of methods
2024-03-13 22:16:43 +01:00
Thaddeus Crews 5a6e3cbcb0
SCons: Remove `run_in_subprocess` dependency 2024-03-11 13:20:09 -05:00
Rémi Verschelde 0475011c66
Merge pull request #82084 from ogapo/pr/pck-cache-merge
Merge `uid_cache.bin` and `global_script_class_cache.cfg` after mounting PCKs
2024-03-11 14:01:16 +01:00
Thaddeus Crews 8116d70d4b
SCons: Convert remaining `run_in_subprocess` to `env.Run` 2024-03-10 14:01:23 -05:00
A Thousand Ships 59bcc2888c
Add methods to get argument count of methods
Added to:
* `Callable`s
* `Object`s
* `ClassDB`
* `Script(Instance)`s
2024-03-10 11:02:43 +01:00
Thaddeus Crews d9fa40f2df
Enforce `\n` eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Thaddeus Crews 9903e6779b
Enforce template syntax `typename` over `class` 2024-03-07 22:39:09 -06:00
David Nikdel 5e6adb4a2d Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
fixes godotengine#82061
fixes godotengine#61556

Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 -05:00
Rémi Verschelde 9b94c80e9a
Merge pull request #89175 from paulloz/dotnet/fix-exported-nodes-reset-without-build-artifacts
Hint fallback property as node when it is a node
2024-03-06 13:32:00 +01:00
Rémi Verschelde b85337b7ea
Merge pull request #87222 from RandomShaper/fix_obj_leaks_report
Fix inaccuracies in the report of leaked objects
2024-03-06 13:16:48 +01:00
Pedro J. Estébanez fdc47adf1e Help compilers optimize Object::cast_to() 2024-03-06 12:45:26 +01:00
Sofox f249667dc8 Fixed MERGE_ALL commit from repeating actions 2024-03-05 23:40:26 +00:00
Paul Joannon e7c90e0884
Hint fallback property as node when it is a node 2024-03-05 12:47:11 +01:00
RedMser 2bd714e34e
Allow configuring the script filename casing rule
Defaults to "Auto", which detects the casing based on the
preference of the currently selected language (C# for example
prefers PascalCase whereas GDScript prefers snake_case).
2024-03-05 09:43:29 +01:00
Rémi Verschelde 50ca190286
Merge pull request #89055 from dsnopek/gdextension-script-free-lists
GDExtension: Pass count when freeing method and property lists for script instances
2024-03-04 13:33:45 +01:00
David Snopek 0badf07657 GDExtension: Pass count when freeing method and property lists for script instances 2024-03-02 10:13:37 -06:00
Rémi Verschelde c1377920cd
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
2024-03-01 14:56:06 +01:00
Micky cd2032a90b Optimise Object's `get_argument_options` 2024-02-29 18:00:54 +01:00
Rémi Verschelde 9101067666
Merge pull request #88958 from 398utubzyt/gltf/use-correct-name
Fix compilation errors when `DISABLE_DEPRECATED` is defined
2024-02-29 13:54:35 +01:00
Michael Alexsander d70c45b5c8
Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
398utubzyt 4c69e8c026 Fix compilation errors when `DISABLE_DEPRECATED` is defined 2024-02-28 05:09:29 -08:00
Rémi Verschelde 8b9a6cfa9f
Merge pull request #88870 from dsnopek/gdextension-fix-runtime-class-ancestor-methods
GDExtension: Fix calling ancestor methods on runtime classes
2024-02-27 10:18:31 +01:00
David Snopek 3335528954 GDExtension: Fix calling ancestor methods on runtime classes 2024-02-26 10:23:23 -06:00
Robert Yevdokimov 13e82094ee Remove word duplicates in comments and strings, and fix casing and punctuation 2024-02-23 17:28:28 -05:00
Rémi Verschelde 45dd2bd31e
Merge pull request #88683 from dsnopek/runtime-classes-in-modules
Allow registering "runtime classes" in modules (not just GDExtension)
2024-02-23 11:29:46 +01:00
Raul Santos 5ba92e5a57
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +01:00
David Snopek 4d0b989bb8 Allow registering "runtime classes" in modules (not just GDExtension) 2024-02-22 14:50:41 -06:00
Rémi Verschelde b652a81da7
Merge pull request #82554 from dsnopek/gdextension-placeholders
Allow registering "runtime classes" from GDExtension
2024-02-20 17:13:24 +01:00
David Snopek ea75307a11 Allow registering "runtime classes" 2024-02-20 09:20:58 -06:00
Rémi Verschelde 09df8f4a56
Merge pull request #87952 from paulloz/dotnet/byebye-signal-callback-generation
Disable signal callback generation in C#
2024-02-15 15:44:55 +01:00
Muller-Castro a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Paul Joannon 9fa2355cef
Disable signal callback generation in C# 2024-02-14 13:26:45 +01:00
Rémi Verschelde 306dd5be3f
Merge pull request #87758 from dsnopek/gdextension-register-virtual-method
Allow GDExtensions to register virtual methods and call them on scripts
2024-02-12 23:29:37 +01:00
David Snopek be11002e41 Allow GDExtensions to register virtual methods and call them on scripts 2024-02-12 13:29:18 -06:00
Thaddeus Crews b3cac9c092
Allow Ref `instantiate` to accept constructor args 2024-02-10 13:19:14 -06:00
Rémi Verschelde 1774c17b64
Merge pull request #87625 from YuriSizov/editor-lightweight-script-previews
Generate script resource preview without parsing
2024-02-09 12:34:36 +01:00
Rémi Verschelde 63d6bda8e9
Merge pull request #87871 from vittorioromeo/use_v_shorthand
Use `_v` shorthand for type traits and `if constexpr` where appropriate
2024-02-05 15:00:23 +01:00
EterDelta fee70558f8 Expose NOTIFICATION_EXTENSION_RELOADED to ClassDB 2024-02-02 14:57:00 -05:00
vittorioromeo 55ed34e37c Use '_v' shorthand for type traits and 'if constexpr' where appropriate 2024-02-02 15:43:21 +01:00
A Thousand Ships 15369fdb1d
Remove unnecessary `this->` expressions 2024-01-29 09:59:18 +01:00
Yuri Sizov 9c919ea285 Generate script resource preview without parsing 2024-01-26 19:04:10 +01:00
Yuri Sizov 412f5b3422 Merge pull request #87353 from OverloadedOrama/max-undo-steps
Implement maximum undo steps in UndoRedo
2024-01-24 14:08:25 +01:00
Emmanouil Papadeas c73bfd5d81 Implement maximum undo steps in UndoRedo 2024-01-22 21:38:10 +02:00
Rémi Verschelde 266ae93291
Merge pull request #87331 from KoBeWi/you_can_ref_count_on_that
Simplify RefCounted check in `free()`
2024-01-18 16:35:38 +01:00
Rémi Verschelde baf87e2717
Merge pull request #87294 from vnen/allow-free-callable
Allow `free()` to be used as Callable
2024-01-18 16:35:14 +01:00
George Marques b4e08eb752
Allow `free()` to be used as Callable
This method is registered in a special way so ClassDB doesn't naturally
know about its existence. Here it is hardcoded if any other option fail
to check if it is about the `free()` method and, if so, say it exists
and return a Callable.
2024-01-18 09:33:44 -03:00
kobewi 2de8bc00a1 Simplify RefCounted check in free() 2024-01-18 12:29:58 +01:00
Rémi Verschelde fa81059b9d
Merge pull request #85939 from adamscott/single-threaded-godot-4
Add `THREADS_ENABLED` macro in order to compile Godot to run on the main thread
2024-01-18 09:33:52 +01:00
Adam Scott bd70b8e1f6
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread 2024-01-17 13:58:29 -05:00
Yuri Sizov c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
Pedro J. Estébanez a04a67ead6 Fix inaccuracies in the report of leaked objects 2024-01-15 19:35:14 +01:00
Rémi Verschelde dc79e956b6
Merge pull request #86587 from RandomShaper/wtp_enhance
Enhance & fix `WorkerThreadPool`
2024-01-11 17:38:09 +01:00
Pedro J. Estébanez a731774813 WorkerThreadPool: Avoid most runtime allocations
Just a little optimization.

**NOTE:**
With `RID_Owner` we could replace each pair of `PagedAllocator` and
`HashMap`-of-ids-to-pointers. However, that would force us to expose
`RID` as the task/group id, instead of `int`, which would break the
API. Too bad. Let's wait until Godot 5.0.
2024-01-08 12:46:31 +01:00
Pedro J. Estébanez ae418f9469 WorkerThreadPool: Avoid deadlocks when CommandQueueMT is involved
This commit lets CommandQueueMT play nicely with the WorkerThreadPool to avoid
non-progressable situations caused by an interdependence between both. While a
command queue is being flushed, it allows the WTP to release its lock while tasks
are being awaited so they can make progress in case they need in turn to post
to the command queue.
2024-01-08 12:45:43 +01:00
Pedro J. Estébanez 9444d297ed WorkerThreadPool: Overhaul scheduling and synchronization
This commits rewrites the sync logic in a way that the
`use_system_threads_for_low_priority_tasks` setting, which was added due to
the lack of a cross-platform wait-for-multiple-objects functionality, can be
removed (it's as if it was effectively hardcoded to `false`).

With the new implementation, we have the best of both worlds: threads don't
have to poll, plus no bespoke threads are used.

In addition, regarding deadlock prevention, since not every possible case of
wait-deadlock could be avoided, this commits removes the current best-effort
avoidance mechanisms and keeps only a simple, pessimistic way of detection.

It turns out that the only current user of deadlock prevention, ResourceLoader,
works fine with it and so every possible situation in resource loading is now
properly handled, with no possibilities of deadlocking. There's a comment in
the code with further details.

Lastly, a potential for load tasks never being awaited/disposed is cleared.
2024-01-08 12:45:42 +01:00
Muller-Castro 96a95cb974 Add const lvalue ref to container parameters 2024-01-05 14:49:57 -03:00
rune-scape cde478bda6 Hot-reload only changed scripts 2024-01-02 17:56:52 -08:00
Rémi Verschelde 3dae50aa4f
Merge pull request #86520 from touilleMan/fix-ScriptLanguageExtension-_find_function-documentation
Fix `ScriptLanguageExtension::_find_function` documentation
2024-01-02 18:05:26 +01:00
Rémi Verschelde 35d1ffb8de
Merge pull request #86259 from TitanNano/jovan/fix_MethodInfo_eq
Include `name` field in MethodInfo operator ==
2024-01-02 15:09:02 +01:00
Emmanuel Leblond 0124b513cd
Fix `ScriptLanguageExtension::_find_function` documentation 2023-12-26 14:05:53 +01:00
msreis f1cc14d525 Fix missing time for some script functions in profiler
Fixes the issue by adding a mechanism by which the functions that were
previously disappearing can be profiled too. This is optional with
an editor setting, since collecting more information naturally slows the engine
further while profiling.

Fixes #23715, #40251, #29049
2023-12-19 19:42:21 +01:00
Alfonso J. Ramos e7e35e8366 Expose `Script.get_global_name()` 2023-12-18 15:13:09 +01:00
Jovan Gerodetti 179c92eb0b Include name field in MethodInfo operator == 2023-12-17 12:42:14 +01:00
Wilson E. Alvarez 80fb8db31f
Remove unnecessary assignments
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-12-13 11:06:26 -05:00
Rémi Verschelde 41365c6c8b
Merge pull request #70315 from RandomShaper/d3d12_mesa
Direct3D 12 Rendering Driver (Mesa NIR approach)
2023-12-12 21:58:57 +01:00
Yuri Sizov f16057522e Merge pull request #85770 from Repiteo/make-virtuals-refactor-and-fix
Refactor and fix `make_virtuals.py`
2023-12-08 16:58:44 +01:00
Thaddeus Crews c9a4086da6
Fix EncodeT assignment in make_virtuals.py
• Adding EncodeT type casting allows generated code to support enum classes.
2023-12-05 10:37:04 -06:00
Thaddeus Crews ceb6dadf4e
Refactor make_virtuals.py
Output reformatted to be comparable to clang-formatted code, without compromising readability
2023-12-05 10:37:03 -06:00
Rémi Verschelde 75d7aab015
Merge pull request #85486 from paulloz/fix/property-groups-shadowing
Fix property groups overriding real properties
2023-12-05 13:05:28 +01:00
Pedro J. Estébanez cba15cd625 Add WorkerThreadPool::get_thread_index() 2023-12-01 16:42:26 +01:00
Paul Joannon decf3b21ae
Fix property groups overriding real properties 2023-11-28 21:34:18 +01:00
A Thousand Ships d10617bb3b [Core] Prevent infinite recursion when printing errors 2023-11-26 18:53:28 +01:00
bruvzg eb81e8b2dc
Prevent read-after-free in the queued CallableCustomStaticMethodPointer. 2023-11-23 23:22:08 +02:00
Pedro J. Estébanez fe4850c0d0 Use mingw-std-threads in MinGW builds 2023-11-18 11:56:05 +01:00
Rémi Verschelde a28476d1cd
Merge pull request #84847 from RandomShaper/lang_init_term
Let languages init & finish run without locks held
2023-11-14 19:31:37 +01:00
Pedro J. Estébanez f05f8c399e Let languages init & finish run without locks held 2023-11-13 16:06:48 +01:00
kobewi 4296f0a771 Fill remaining global scope constant descriptions 2023-11-13 15:17:10 +01:00
Sofox 4006397339 Reduced output spam from rapid property changes 2023-11-12 14:49:51 +00:00
Rémi Verschelde 96fa86f9a0
Merge pull request #84557 from TheSofox/undo-history-sync-fix
Fix for stopping the Undo History being desynchronised from actual Undo queue
2023-11-10 21:55:46 +01:00
Sofox 662522ae5a Fix for stopping the Undo History being desynchronised from actual Undo queue. 2023-11-10 13:04:12 +00:00
Rémi Verschelde 19db9308ff
Merge pull request #84657 from RandomShaper/lang_srv_threading
Make languages bookkeeping thread-safe
2023-11-09 18:09:01 +01:00
Pedro J. Estébanez f3e96a8548 Make languages bookkeeping thread-safe 2023-11-09 18:03:43 +01:00
Rémi Verschelde ce53362f98
Merge pull request #83670 from raulsntos/notification-predelete-cleanup
Add `NOTIFICATION_PREDELETE_CLEANUP` notification to fix C# `Dispose()`
2023-11-09 11:45:49 +01:00
Pedro J. Estébanez a1d8fc1af9 Polish & fix editor help cache generation
- Isolated the generation of extensions's docs. They're now not cached and refreshed as needed.
- Removed superfluous sorting of the class list.
- Removed some superfluous/unused elements.
- Renamed some items for clarity.
2023-11-02 13:46:37 +01:00
Rémi Verschelde bc5d5978ea
Merge pull request #83695 from YuriSizov/core-lock-and-key
Improve threading in ClassDB and EditorHelp
2023-10-24 10:54:19 +02:00
Rémi Verschelde 792afd2cad
Merge pull request #83588 from voidedWarranties/fix_sle_validate
Add `path` option to `ScriptLanguageExtension::_validate`
2023-10-24 10:54:11 +02:00
voidedWarranties e8309dd192 Add `path` option to `ScriptLanguageExtension::_validate` 2023-10-22 21:49:34 -07:00
Yuri Sizov 9b03fb36f9 Improve threading in ClassDB and EditorHelp 2023-10-20 22:14:04 +02:00
Raul Santos 9750e49c57
Add `NOTIFICATION_PREDELETE_CLEANUP` notification
New notification sent after `NOTIFICATION_PREDELETE` to let Objects cleanup at the very end, it should be the last notification sent.
2023-10-20 13:43:42 +02:00
anrp 4c33c60500 Allow coexistance of GDScript and GDExtension virtual methods in the same object
Resolves https://github.com/godotengine/godot-cpp/issues/1224
2023-10-19 10:21:26 -04:00
pancelor d66b1752b8 Fix tilemap live editing while game is running 2023-10-14 18:54:03 -07:00
Rémi Verschelde 71a8ac41fb
Merge pull request #72751 from dalexeev/doc-comment-color
Highlight doc comments in a different color
2023-10-09 23:21:54 +02:00
Rémi Verschelde a1d7c62df7
Merge pull request #83003 from AThousandShips/null_check_extra
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-10-09 15:37:14 +02:00
Rémi Verschelde 336260b7b3
Merge pull request #83002 from AThousandShips/safety_check
Replace `sanity` with `safety` for checks
2023-10-09 15:36:49 +02:00
Danil Alexeev de7cbe8789
Highlight doc comments in a different color 2023-10-08 19:26:10 +03:00
A Thousand Ships f18aa00e85 Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-10-08 17:23:33 +02:00
A Thousand Ships 034c0f1624 Replace `sanity` with `safety` for checks 2023-10-08 16:22:24 +02:00
Mai Lavelle 5e15586ec2 Fixes to allow object-less callables throughout Godot
This fixes #81887
2023-10-06 16:31:35 -04:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
Rémi Verschelde c7ed5d795e
Merge pull request #82799 from CedNaru/feature/expose_free_instance_binding
Expose `Object::free_instance_binding()` to GDExtension
2023-10-05 10:10:58 +02:00
Ced Naru 0a246e9b54 expose Object::free_instance_binding to GDExtension 2023-10-04 19:24:37 +02:00
Danil Alexeev ed0b3c08e1
Core: Fix `Object::has_method()` for script static methods 2023-10-04 19:44:32 +03:00
Rémi Verschelde dbd4c79c38
Merge pull request #82682 from dsnopek/gdextension-dont-deprecate-script-category
GDExtension: Don't deprecate old method of getting script category
2023-10-03 17:26:41 +02:00
David Snopek cbf939e121 GDExtension: Don't deprecate old method of getting script category 2023-10-02 09:23:27 -05:00
Danil Alexeev aff767ef07
Fix expected argument count for `Callable` call errors 2023-09-29 20:00:10 +03:00
David Cambré 531f56e830 add GDExtensionScriptInstanceGetClassCategory
Change GetClassCategory so it is handled in native directly
2023-09-27 17:45:48 +02:00
Rémi Verschelde 017541bcec
Merge pull request #80527 from raulsntos/dotnet/generate-compat-methods-from-classdb
C#: Generate and use compat methods
2023-09-26 13:44:52 +02:00
Rémi Verschelde 7e67b496ff
Merge pull request #82332 from Sauermann/fix-struct-type
Fix type of `notification_func`
2023-09-26 08:32:15 +02:00
Rémi Verschelde 55dfbd7761
Merge pull request #80284 from dsnopek/gdextension-hot-reload
Implement reloading of GDExtensions
2023-09-26 08:17:28 +02:00
David Snopek 2733a6f762 Implement reloading of GDExtensions 2023-09-25 22:10:17 -05:00
Markus Sauermann d2bcde0407 Fix type of notification_func 2023-09-25 23:37:13 +02:00
Rémi Verschelde e4cfd4e26a
Merge pull request #82195 from AThousandShips/radian_fix
Replace `radians` range hint with `radians_as_degrees`
2023-09-25 17:18:38 +02:00
Rémi Verschelde d759f91f8d
Merge pull request #81101 from 398utubzyt/dotnet/abstract-class-support
C#: Add abstract class support
2023-09-25 17:18:05 +02:00
Rémi Verschelde 1a0e653d7f
Merge pull request #78573 from dalexeev/editor-create-script-class-name
Editor: Remove unused Class Name field from Create Script dialog
2023-09-25 17:17:46 +02:00
A Thousand Ships e45927b2f2 Replace `radians` range hint with `radians_as_degrees` 2023-09-25 08:50:19 +02:00
Rémi Verschelde 6fc1d50db3
Merge pull request #81521 from dsnopek/method-bind-default-argument-hash-fix
Fix method hashes with default arguments
2023-09-22 22:03:30 +02:00
David Snopek 0d13727c97 Fix method hashes with default arguments 2023-09-21 12:39:04 -05:00
Jeff Ward 60851af4da Add functions for non-ptr style virtual calls in GDExtension
This adds two functions to `GDExtensionClassCreationInfo` that allow for developers to supply a generic virtual call function along with user data to be sent to that call.

If `get_virutal_call_data_func` is not null, extensions call this function to get user data to pass to a supplied `call_virtual_with_data_func`. Both must be provided is one is provided.

If `get_virtual_call_data_func` is null, Godot falls back to the old `get_virtual_func` logic.

Fixes #63275

Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-09-19 22:33:32 -04:00
Raul Santos 5f6082a96b
C#: Generate and use compat methods
- Implements `ClassDB::get_method_list_with_compatibility` to retrieve all methods from a class including compat methods.
- C# bindings generator now also generates compat methods.
- All generated C# methods now use `ClassDB::get_method_with_compatibility`.
2023-09-19 20:35:11 +02:00