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

Allow picking partial properties in PropertySelector #95554

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Aug 15, 2024

PropertySelector allows picking properties of an Object, but I sometimes missed being able to pick a sub-property, e.g. position:x. They had to be specified manually, which is rather cumbersome.

This PR enhances the PropertySelector to recursively display sub-properties:

rmnhM7IxJi.mp4

It's more relevant now that the selector is exposed to scripting.

@KoBeWi KoBeWi added this to the 4.x milestone Aug 15, 2024
@KoBeWi KoBeWi force-pushed the subproperty_of_a_subproperty_of_a_property branch from d81d743 to f42055f Compare August 15, 2024 12:00
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

PropertySelector allows picking properties of an Object, but I sometimes missed being able to pick a sub-property, e.g. position:x. They had to be specified manually, which is rather cumbersome.

Indeed that's currently cumbersome. Moreover, I've seen plently of users being not even aware that you can reference subproperties like that. So this PR also increases discoverability. 👍


Checked the types, if anything is missing etc. Only spotted that for Color its integer properties r8, g8, b8, a8 are not exposed. So that's to potentially reconsider before merging.

Overall LGTM!

@KoBeWi KoBeWi force-pushed the subproperty_of_a_subproperty_of_a_property branch from f42055f to 0dea6ef Compare August 15, 2024 15:33
@akien-mga akien-mga modified the milestones: 4.x, 4.4 Aug 16, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Didn't test, but the feature makes sense to me.

@akien-mga akien-mga merged commit ca8508b into godotengine:master Aug 16, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the subproperty_of_a_subproperty_of_a_property branch August 16, 2024 20:16
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