Skip to content
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

Add support for indexed properties in GDExtension #79763

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Jul 21, 2023

Related to godotengine/godot-cpp#1182.
Required for godotengine/godot-cpp#1186.

This adds support for binding indexed properties (ADD_PROPERTYI) from GDExtension, which at the moment is not possible due to there being no index parameter in the classdb_register_extension_class_property function.

This PR resolves this in a backwards-compatible way by adding a new function called classdb_register_extension_class_property_indexed that effectively replaces the old function. The implementation for the old function now calls the new function, and simply provides the default value of -1 for the index.

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The code looks great to me, and works perfectly in my testing :-)

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Jul 26, 2023
@YuriSizov YuriSizov merged commit 951691a into godotengine:master Jul 26, 2023
13 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants