Skip to content

Access all enum/bitfield values programmatically #1232

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

Merged
merged 6 commits into from
Jul 13, 2025

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Jul 12, 2025

Closes #600.

Adds new APIs for introspection of enums and bitfields:

  • EngineEnum::all_constants() listing every constant with name, Godot name and value.
  • EngineEnum::values() listing deduplicated, and MAX-stripped (aka meaningful) values.
  • EngineBitfield::all_constants().

@Bromeon Bromeon added feature Adds functionality to the library c: engine Godot classes (nodes, resources, ...) labels Jul 12, 2025
@Bromeon Bromeon changed the title Feature/enum iteration Access all enum/bitfield values programmatically Jul 12, 2025
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1232

@Bromeon Bromeon force-pushed the feature/enum-iteration branch from c423282 to b97488c Compare July 12, 2025 16:23
@Bromeon Bromeon force-pushed the feature/enum-iteration branch 3 times, most recently from e559258 to 708727b Compare July 13, 2025 07:28
@Bromeon Bromeon force-pushed the feature/enum-iteration branch from 708727b to e5006b1 Compare July 13, 2025 07:52
@Bromeon Bromeon enabled auto-merge July 13, 2025 07:56
@Bromeon Bromeon added this pull request to the merge queue Jul 13, 2025
Merged via the queue into master with commit 66e9a01 Jul 13, 2025
18 checks passed
@Bromeon Bromeon deleted the feature/enum-iteration branch July 13, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: engine Godot classes (nodes, resources, ...) feature Adds functionality to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the the ability to iterate over Godot enums
2 participants