Commit graph

272 commits

Author SHA1 Message Date
Rémi Verschelde
1816f49886
Merge pull request #64253 from heppocogne/Fix-native-enum-release-1
Register enum type names in release build
2023-01-06 00:10:31 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
heppocogne
6f31f7b0bc Register native base class name of enum types when release build 2022-12-30 00:30:18 +09:00
Bastiaan Olij
7502e1dc0d Improve logic around using Ref<T> with GDExtension virtual functions 2022-12-13 10:54:29 +11:00
Rémi Verschelde
f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +01:00
Gilles Roudière
be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
Micky
885f2a4eca Fix unable to disconnect signal in Editor once created
Adds a CONNECT_INHERITED flag to connections, only available in editor builds. This flag denotes that the signal has been inherited from a previous Scene in the instancing hierarchy.
2022-12-08 13:36:48 +01:00
Rémi Verschelde
a50e4fed18
Merge pull request #69343 from YuriSizov/core-missing-property-revert-getters
Add missing public `property_*_revert` getters
2022-12-05 18:05:59 +01:00
Rémi Verschelde
a738f50886
Merge pull request #69357 from TokageItLab/byebye-trigger
Remove `UPDATE_TRIGGER` mode from `ValueTrack::UpdateMode` & Match behaviors between `AnimationTree` and `AnimationPlayer`
2022-12-05 00:06:23 +01:00
Emmanuel Leblond
61c900ac6f
Fix const qualifier for parameters in GDExtension api functions 2022-12-02 23:00:01 +01:00
Silc Renew
83135aa122 Remove UPDATE_TRIGGER & Match behaviors between AnimationTree/Player
#69357
2022-12-02 20:28:10 +09:00
Yuri Sizov
a9961b378a Add missing public property_*_revert getters 2022-11-29 23:07:40 +03:00
Rémi Verschelde
6fdbf79046
Merge pull request #67680 from haasanen/fix_physics_thread_race_condition
Fix physics/3d/run_on_separate_thread race condition in WorkerThreadPool (crash).
2022-11-29 13:41:56 +01:00
Rémi Verschelde
5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources 2022-11-24 14:06:00 +01:00
ocean (they/them)
9187f5c849 Fixes inability to assign script after clearing 2022-11-21 19:43:46 -05:00
Micky
b4324e7a45 Remove PROPERTY_HINT_IMAGE_COMPRESS constants
These were used in 3.x but there's no reference of them in the codebase, at all.
2022-11-15 15:28:49 +01:00
Rémi Verschelde
beed90ea6d
Merge pull request #67963 from KoBeWi/den_of_actions
Fix nested actions in EditorUndoRedoManager
2022-11-14 18:29:46 +01:00
Emmanuel Leblond
39c039a363
Revert removal of GDNativeExtensionScriptInstanceInfo::get_property_type_func in GDExtension
This function pointer is needed to stay close to internal Godot's ScriptInstance class.
Besides, by removing this function pointer, we had to do property list create/free each time
we want to access type which is quadratic complexity :/
2022-11-12 04:18:21 +01:00
Aaron Franke
a3e52925bf
Fix default values on virtual classes causing errors in projects 2022-11-09 01:59:53 -06:00
Emmanuel Leblond
1e8756c94b
Use StringName in the whole GDExtension API instead of const char * 2022-11-08 21:44:07 +01:00
Aaron Franke
3dc9474355
Fix default values not showing up on virtual classes 2022-11-06 15:05:36 -06:00
Aaron Franke
ba542444e3
Don't allow instancing virtual node types in the Create New Node dialog 2022-11-05 14:45:16 -05:00
Rémi Verschelde
632b3e974c
Merge pull request #67693 from Mickeon/slight-hint-shuffling
Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE
2022-11-02 14:16:53 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
kobewi
d7ebf725c9 Fix nested actions in EditorUndoRedoManager 2022-10-28 02:54:55 +02:00
Micky
9a1d87f66f Fix unordered values of PROPERTY_HINT_INT_IS_POINTER & ARRAY_TYPE 2022-10-21 01:10:38 +02:00
Simo Haasanen
4cc3489bc0 Fixes HashMap::erase related race condition in WorkerThreadPool when Physics 2D or 3D is selected to run on a separate thread. 2022-10-20 17:47:20 +01:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
kobewi
4aaed4fee1 Minor code improvements 2022-10-18 16:44:57 +02:00
Ricardo Buring
1d5aa74ac3 GDExtension: add support for abstract and virtual classes 2022-10-16 09:02:49 +02:00
Rémi Verschelde
6ad5637ffc Merge pull request #66427 from Mickeon/object-methods-autocompletion
Add autocompletion to several Object methods
2022-10-13 18:41:24 +02:00
Rémi Verschelde
35670c36cf Merge pull request #67300 from Mickeon/indexed-objection
Rename `set`/`get_indexed`'s "property" to "property_path"
2022-10-12 14:45:05 +02:00
Micky
dc51ff8c5b Rename set/get_indexed's "property" to "property_path"
Also touches up the Documentation slightly.
2022-10-12 10:27:44 +02:00
Quentin Quaadgras
6bc16660cc Fix _unnamed_arg so that arguments defined by GDExtension show up in docs.
The Godot API (gdnative_interface.h) allows methods to be registered on
extension classes with

`classdb_register_extension_class_method`

a `GDNativeExtensionClassMethodInfo` can be provided to this function
along with a `get_argument_info_func` which according to the comment
indicates that argument names should be definable here.

Unfortunately, setting the name field in the `GDNativePropertyInfo`
struct has no effect on the editor documentation, which continues to
display "_unnamed_arg" for each argument.

I discovered that `get_argument_info` is responsible for this as it
always overrides the `info.name`. I've added an if condition that will
only override the name when it is empty. I've tested this with my
GDExtension module and I can confirm that with this commit, the argument
name shows up in the builtin docs. eg. in Lookup Symbol.
2022-10-12 21:23:34 +13:00
Emmanuel Leblond
13c0a60747
Implement ScriptExtension::get_documentation 2022-10-11 08:22:25 +02:00
Rémi Verschelde
8017827144 SCons: Re-enable treating #warning as error with werror
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.

We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
Rémi Verschelde
4e4e16f9a9 SCons: Cleanup GCC warnings configuration
- Outright disable spammy warnings due to past or present GCC bugs:
  * `-Wno-strict-overflow` for GCC 7.
  * `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in
    earlier releases but at this stage we don't care).
  * `-Wno-return-type` for GCC 12/13 (regression, still not fixed).
- Enable extra warnings conditionally when broken on earlier GCC:
  * `-Wnoexcept` was removed due to an upstream regression in GCC 9, could
    be re-enabled (but commented out for now as we actually have `-Wnoexcept`
    warnings to fix.
  * `-Wlogical-op` was broken on our variadic templates before GCC 11, now
    seems fine.
2022-10-10 16:12:26 +02:00
Haoyu Qiu
48e0688d8f Validate input in ScriptServer::register_language 2022-10-08 14:12:25 +08:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Waridley
0863cf96e4 free NativeExtensionMethodBinds on unregister 2022-10-05 11:46:00 -05:00
Rémi Verschelde
9cd62741bb Merge pull request #66839 from aaronfranke/editor-prop-hide-slider
Fix `hide_slider` vs `no_slider` inconsistency in editor property code
2022-10-05 08:47:06 +02:00
Aaron Franke
094e8db97c
Fix hide_slider vs no_slider inconsistency in editor property code 2022-10-03 13:40:31 -05:00
Rémi Verschelde
82b87d7a17 Remove unsupported NO_SAFE_CAST/-fno-rtti from Android build
Android was the last platform to still attempt to disable RTTI (for binary
size), but both the Android editor and now the ICU library used by templates
need RTTI.

There could still be the possibility to support this for non-ICU template
builds (i.e. without the TextServerAdvanced module), but since this isn't one
of the build configurations we test regularly it's pretty risky to keep this
option only for that specific use case. And our code is already littered with
`dynamic_cast`s which weren't guarded with `!defined(NO_SAFE_CAST)`.
2022-10-03 11:18:31 +02:00
Rémi Verschelde
166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
bruvzg
af814c1524
Rename script_instance to _script_instance in the GDVIRTUAL* wrappers to avoid shadowing Object member. 2022-09-28 15:57:59 +03:00
Rémi Verschelde
f8b0b17634 MethodBind: Silence GCC -Wmaybe-uninitialized caused by UBSAN
A priori this doesn't appear to be an actual bug, but a known consequence of
using UBSAN. We silence this one to still have the possibility to get more
warnings raised by UBSAN, in case they are useful.

Works around and closes #66343.
2022-09-26 16:05:40 +02:00
Micky
2a66ddb1bb Add autocompletion to several Object methods
Add autocompletion for the following Object methods:
-  `connect`, `is_connected`, `disconnect`, `emit_signal`, `has_signal`;
- `call`, `call_deferred`, `callv`, `has_method`;
- `set`, `set_deferred`, `get`;
- `set_meta`, `remove_meta`, `has_meta`, `remove_meta`.
2022-09-26 10:02:31 +02:00
Rémi Verschelde
d96b7d767a Merge pull request #66110 from Zylann/reference_get_count
get_reference_count()`
2022-09-22 08:26:29 +02:00
Marc Gilleron
474cee7daf Rename and expose RefCounted::get_reference_count() 2022-09-21 21:18:54 +01:00
kobewi
b3997191d8 Change UndoRedo to use Callables 2022-09-18 23:52:50 +02:00