-
-
Notifications
You must be signed in to change notification settings - Fork 99
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 "inactive" properties #4823
Comments
I assume properties would still have their base hint in place, and so the hint string would already be taken a lot of time. And it should really be a usage flag, not a hint flag. Which brings me to... We already have If your intention is to keep them editable and not completely readonly, then the name inactive is misleading. Maybe adding custom warnings would be enough then. Based on the fact that we have a warning we can additionally decorate the look. To implement warnings instead of hint text I propose a new method like
This won't immediately benefit from the inactive/readonly properties. The problem with this particular PR is that we have a guided layout for properties to prevent common mistakes people make in 3.x. We were asked to show all properties in the discussion preceding this change, but we decided against it. So to bring readonly properties back it would require some thinking on how to keep the layout UI guided while giving more information to power users. That said, the main issue is probably with the remote inspector, not the local one. And a likely solution is to still show PS. Tangential, but for cases like icon properties we can also try using the indented look with a colored border that I've introduced in the control layouts PR to show that these options are dependent on the icon being present. (They'd need to be rearranged though). |
Not really, "inactive" i.e. "ineffective" - you can set it, but it has no effect.
Good idea 👀 |
Can this system be used for properties that require a specific rendering method, but the rendering method in question isn't currently being used? cc @BastiaanOlij We have an usability issue currently as most properties that require Forward+ and/or Forward Mobile are hidden entirely, but this means you can't disable them after switching to an incompatible rendering method (so you can't silence any potential run-time warnings). |
From a UI perspective, I'd prefer the inactive property to be folded away (using essentially the same animation that happens when you open/close a resource in the inspector). This would mean you only see the properties that are relevant to the current configuration. |
Describe the project you are working on
Godot etc
Describe the problem or limitation you are having in your project
We have some properties that aren't always useful. Example is Button's
expand_icon
property. It's useless when you don't have icon. However it can't just be disabled/hidden, because you may want to configure the icon and then add it later.Generally, there are 3 types of conditional properties:
expand_icon
in Button,region_rect
in Sprite2D andstretch_margin
in TextureProgressBarThe 3rd case is currently not supported properly, i.e. there is a debate whether these properties should be hidden or not, but there is no middle ground, which would be the best in this case.
Some relevant links: godotengine/godot#62423 / #4755
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Aside from hiding or disabling properties, we could have a third option - making them inactive. This would be a bit similar to configuration warnings.

When property is inactive, its name would be greyed-out (or have some tint) and the description would have a warning-like message saying why is it inactive.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Probably add a new property hint
PROEPRTY_HINT_INACTIVE
, with the optional warning message stored in hint text. This would be alternate option for "disabling" properties in_validate_property()
.If this enhancement will not be used often, can it be worked around with a few lines of script?
Nah, no way.
Is there a reason why this should be core and not an add-on in the asset library?
It's core feature.
The text was updated successfully, but these errors were encountered: