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 GLOBAL_DEF_INTERNAL to hide specific settings #61751

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jun 6, 2022

I discovered this line:

if (vc.name.begins_with("input/") || vc.name.begins_with("import/") || vc.name.begins_with("export/") || vc.name.begins_with("/remap") || vc.name.begins_with("/locale") || vc.name.begins_with("/autoload")) {

which is probably the best way to filter out properties from Project Settings. For unknown reason though, it was checking /something instead of something/ for some settings (which also caused autoloads to not be hidden previously, which was then patched somewhere else). There was also export/ filter, which was probably unused since export_presets.cfg was added. And then there is remap/ and locale/ filter. It wasn't working, but seems like locale group has some settings that should be visible, so I removed this and only hidden 2 settings from that group (but maybe there is more settings that could be hidden).

Resolves #58456
Alternative to #61450

@KoBeWi KoBeWi added this to the 4.0 milestone Jun 6, 2022
@KoBeWi KoBeWi requested a review from a team as a code owner June 6, 2022 13:30
@KoBeWi KoBeWi requested a review from a team as a code owner June 6, 2022 22:19
@KoBeWi
Copy link
Member Author

KoBeWi commented Jun 6, 2022

Pushed some changes. I made the built-in input actions into internal properties and added docs for the internal properties added in this PR (it's ok to document them I think).

As for the group filter line, it has to stay, because it handles dynamically created properties. I modified it further as import/ isn't actually used - changed it to importer_defaults/.

I noticed there is some code that checks whether "internationalization/locale/translation_remaps" (and other settings) exists. The check might be not necessary anymore (and hopefully it won't break .-. )

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.

Seems fine for the time being, though in discussion @YuriSizov and I agreed that it feels like we could go further in dehardcoding the prefixes in _get_property_list.

One option could be to add something like ProjectSettings::get_singleton()->set_prefix_to_hide(String path, bool hide) so that the code that adds such settings can be responsible for hiding them too (which makes it available to plugins).

@akien-mga akien-mga merged commit e24e493 into godotengine:master Jun 7, 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.

Cannot add new project features in Godot 4
3 participants