GDExtension API has changed ! (a bit)
This is friendly note so that you don't freak out when seeing this project it broken against Godot's master :smiley:
see https://github.com/godotengine/godot/pull/67750 & https://github.com/godotengine/godot-cpp/pull/896
Basically GDExtension API uses StringName (almost) everywhere instead of the char *. On top of that the way to register proerties has been simplified.
Thanks for the heads-up! 👍
No worries, change detection of the GDExtension header has already been automated, outputting a descriptive diff 😉
Nevertheless it's even nicer to have a descriptive changeset, so I appreciate being proactive! I also wrote a comment regarding https://github.com/godotengine/godot/issues/61968, which might now be mitigated or even fully solved.
I might then use this issue to track the progress of implementing those changes.
No worries, change detection of the GDExtension header has already been automated, outputting a descriptive diff wink
That's pretty sweet !
which might now be mitigated or even fully solved
I think the issue is fully solved, however it would be even better to entirely remove the get_property_list an replace it by an array passed where get_property_list function pointer is currently provided.
This would simplify the API and remove the ambiguity that get_property_list might get called multiple time and can return different result each time it is called (to support dynamically adding property, which is of course not a thing in Godot)
What do you think ?
however it would be even better to entirely remove the
get_property_listan replace it by an array passed whereget_property_listfunction pointer is currently provided.
You mean when the class is registered, one would provide an array of all properties?
I think that might be ideal, because then the extension library can forget (aka deallocate) the property meta-information once registered. I might need to check the implementation to make sure I'm not missing something though 🙂
I think that might be ideal
I will try to find time to submit a PR to Godot then, and I'll ping you for the review then :smiley:
I might need to check the implementation to make sure I'm not missing something though
Please do ! My guess is the GDExtension API use this "function to pass constant values" pattern only because it leaks it C++ implementation where generics are implemented with templates and function argument specialization :smile:
@Bromeon see https://github.com/godotengine/godot/pull/68479 ;-)