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

Merged
merged 5 commits into from
May 31, 2025

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 2 times, most recently from ad55478 to 2f761d4 Compare May 18, 2025 20:26
@Bromeon Bromeon force-pushed the feature/export-file-arrays branch from 2f761d4 to 1abc4ac Compare May 31, 2025 08:00
@Bromeon Bromeon force-pushed the feature/export-file-arrays branch from 1abc4ac to 0065fb5 Compare May 31, 2025 23:14
@Bromeon Bromeon enabled auto-merge May 31, 2025 23:15
@Bromeon Bromeon added this pull request to the merge queue May 31, 2025
Merged via the queue into master with commit d92c7d4 May 31, 2025
17 checks passed
@Bromeon Bromeon deleted the feature/export-file-arrays branch May 31, 2025 23: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