Commit Graph

5 Commits (b4632e317d06acac62b2d5f4af02ce4dbdd57687)

Author SHA1 Message Date
Fabio Alessandrelli b4632e317d Fix creation (and godot-side deletion) of extended objects.
Proper initialization for godot-cpp classes with memnew.

Extension classes (i.e. the `GDCLASS` macro) behave differently from
regular wrapped classes, and requires Godot to initialize them during
object construction.

This commit update the GDCLASS macro to not create/destroy the instance
during the bindings callback, but during the extension callbacks.

When setting the object instance, the bindings instance is set to the
pointer of the extension instance so that it can later be retrieved
normally via `object_get_instance_bindings`.
2021-09-27 23:08:11 +10:00
Bastiaan Olij e839199848 Add support for property groups 2021-09-27 23:08:11 +10:00
Bastiaan Olij 02802b1d0e Add in driver types and rejig code to make it easier to extend 2021-09-27 23:08:11 +10:00
Bastiaan Olij 46c63af715 Re-introduce build-in type code for core types 2021-09-27 23:08:10 +10:00
George Marques e4ed48976a Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00