-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fix metadata storing empty dictionary in scenes #30715
Conversation
p_list->push_back(PropertyInfo(Variant::DICTIONARY, "__meta__", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT)); | ||
int metadata_property_usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK; | ||
if (!metadata.empty()) { | ||
metadata_property_usage |= PROPERTY_USAGE_STORAGE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it PROPERTY_USAGE_DEFAULT
.
It seems to work fine for |
So far there's no other exposed property of type Dictionary which is not using either I guess the logic for |
I think #29222 would resolve this. Currently Dictionary equality checks are done by reference, unlike other non-Object types, which are compared by value. |
Yes, #29222 does solve this, manually cherry-picked it locally on top of master to test it, so this one could be closed once that's merged. It also get rids of the issue with appearing "revertable". |
Fixes an issue described in #22642 (comment).
Completely not sure whether it's a good way to manipulate property usage flags this way. There was some flags that allowed this kind of usage but those are deprecated now (which might explain why it worked a year ago @YeldhamDev):
godot/core/object.h
Lines 107 to 109 in 2ca3e47
This would prevent unnecessary noise in version control systems for projects already in work.