Skip to content

Support @export_file, @export_dir etc. for Array<GString> and PackedStringArray #1166

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented May 18, 2025

Supports the #[export(file)], #[export(file = "*.png")] attributes and all their variants on two new types beside the existing GString:

  • Array<GString>
  • PackedStringArray

Also introduces very basic error handling for the case where #[export(...)] attributes are used on a type that doesn't support them. This is currently done via panic and can be improved in future versions, but would be out of scope for this PR.

Closes #772.

@Bromeon Bromeon added this to the 0.3.x milestone May 18, 2025
@Bromeon Bromeon added feature Adds functionality to the library c: register Register classes, functions and other symbols to GDScript labels May 18, 2025
@GodotRust
Copy link

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

@Bromeon Bromeon force-pushed the feature/export-file-arrays branch from 6463429 to ad55478 Compare May 18, 2025 18:33
@Bromeon Bromeon force-pushed the feature/export-file-arrays branch from ad55478 to 2f761d4 Compare May 18, 2025 20:26
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 this pull request may close these issues.

#[export(file)] should be limited to certain field types
2 participants