gdext icon indicating copy to clipboard operation
gdext copied to clipboard

Add `get_property_list` to gdextension classes

Open lilizoey opened this issue 1 year ago • 1 comments

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 https://github.com/godotengine/godot-proposals/issues/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 avatar Apr 16 '24 14:04 lilizoey

Upstream PR to unblock: https://github.com/godotengine/godot/pull/91179

Bromeon avatar Apr 25 '24 21:04 Bromeon

Upstream has been merged.

Bromeon avatar Apr 29 '24 08:04 Bromeon