-
Notifications
You must be signed in to change notification settings - Fork 210
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
Generating setters for indexed properties, like SpatialMaterial::albedo_texture #689
Labels
Milestone
Comments
ghost
added
feature
Adds functionality to the library
c: bindings
Component: GDNative bindings (mod api)
labels
Feb 4, 2021
ghost
mentioned this issue
Feb 4, 2021
ghost
mentioned this issue
Feb 20, 2021
Bromeon
added a commit
to Bromeon/godot-rust
that referenced
this issue
Sep 26, 2021
The heuristics to translate Godot's documentation to Rustdoc are not perfect, and some features like "indexed properties" (godot-rust#689) are not yet implemented. Thus avoids noise when running 'cargo doc'.
chitoyuu
added a commit
to chitoyuu/godot-rust
that referenced
this issue
Oct 31, 2022
Getters and setters are now generated for indexed properties that are naturally accessible in GDScript (i.e. do not have '/' in the name), like `SpatialMaterial::albedo_texture`. Doc generation for the underlying accessors has also been improved. Close godot-rust#689
chitoyuu
added a commit
to chitoyuu/godot-rust
that referenced
this issue
Oct 31, 2022
Getters and setters are now generated for indexed properties that are naturally accessible in GDScript (i.e. do not have '/' in the name), like `SpatialMaterial::albedo_texture`. Doc generation for the underlying accessors has also been improved. Close godot-rust#689
bors bot
added a commit
that referenced
this issue
Oct 31, 2022
970: Generate accessor methods for indexed properties r=Bromeon a=chitoyuu Getters and setters are now generated for indexed properties that are naturally accessible in GDScript (i.e. do not have '/' in the name), like `SpatialMaterial::albedo_texture`. Doc generation for the underlying accessors has also been improved. Close #689 Co-authored-by: Chitose Yuuzaki <chitoyuu@potatoes.gay>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
As Rust has no language-level notion of properties, the
properties
list is currently simply ignored, with the assumption that each property would have a correspondingset_
method in the API. However, the Godot API also contains "indexed" properties that wrap around other methods:While such properties are still possible to access, using the indexed methods directly, they do not currently have convenience getter/setters, which can be confusing to users: see #688. As a result, we might want to find those properties and generate additional methods for them.
The text was updated successfully, but these errors were encountered: