Skip to content

Conversation

@Mickeon
Copy link
Member

@Mickeon Mickeon commented Oct 20, 2022

See comment #67688 (comment),

Switches PROPERTY_HINT_INT_IS_POINTER and PROPERTY_HINT_ARRAY_TYPE around, so that 40 comes before 41 .

Note that the alternative solution could've been to instead switch the BIND_CONSTANTs, but the order it used feels slightly more appropriate. I'm aware that one day of beta could be used to order the enum constants, however.

@Mickeon Mickeon requested review from a team as code owners October 20, 2022 23:11
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Is it a cosmetic change, or order matter somewhere (AFAIK, it should not)? Property hint raw integer values can be serialized by editor plugins, in the Array hint strings, and used by GDExtensions, so it's a breaking change.

@Mickeon
Copy link
Member Author

Mickeon commented Oct 21, 2022

It's a "breaking change" specifically for these two constants only, but these property hints did not even exist in Godot 3.x, nor they have any documentation (just yet) to back them up. You can make of that what you will.

If one wants to avoid... this without any breaking at all:
image
It would simply require shuffling these the two bindings around, which were written under the assumption of it being the intended order:

BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_GLOBAL_SAVE_FILE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_OBJECTID);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_INT_IS_POINTER);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_ARRAY_TYPE);
BIND_CORE_ENUM_CONSTANT(PROPERTY_HINT_LOCALE_ID);

Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

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

Approved in today's PR meeting

@akien-mga akien-mga merged commit 632b3e9 into godotengine:master Nov 2, 2022
@Mickeon Mickeon deleted the slight-hint-shuffling branch November 2, 2022 13:27
@akien-mga akien-mga modified the milestones: 4.x, 4.0 Nov 2, 2022
@akien-mga
Copy link
Member

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.

5 participants