Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_property_list to gdextension classes #665

Closed
lilizoey opened this issue Apr 16, 2024 · 2 comments · Fixed by #707
Closed

Add get_property_list to gdextension classes #665

lilizoey opened this issue Apr 16, 2024 · 2 comments · Fixed by #707
Labels
c: register Register classes, functions and other symbols to GDScript feature Adds functionality to the library

Comments

@lilizoey
Copy link
Member

lilizoey commented Apr 16, 2024

To dynamically update properties in Godot you must override get_property_list (_get_property_list in gdscript). This is a special-cased virtual method that doesn't show up along normal virtual methods, so we do not support this currently.

This method however does require returning a pointer to a property list, and there isn't a good way to get the length back when godot asks us to free it. See godotengine/godot-proposals#9462 for an upstream issue that proposes a fix to this feature.

#621 is a PR that tried to implement this initially, however im closing that for now and opening this issue instead to track that.

Additionally property_can_revert and property_get_revert should also be implemented so people can set custom reverts for properties.

@lilizoey lilizoey added feature Adds functionality to the library status: upstream Depending on upstream fix (typically Godot) c: register Register classes, functions and other symbols to GDScript labels Apr 16, 2024
@lilizoey lilizoey changed the title Add get_property_list to gdextensions Add get_property_list to gdextension classes Apr 16, 2024
@Bromeon
Copy link
Member

Bromeon commented Apr 25, 2024

Upstream PR to unblock: godotengine/godot#91179

@Bromeon
Copy link
Member

Bromeon commented Apr 29, 2024

Upstream has been merged.

@Bromeon Bromeon removed the status: upstream Depending on upstream fix (typically Godot) label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: register Register classes, functions and other symbols to GDScript feature Adds functionality to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants