You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a lot of custom scenes that I then only have to instance and configure a bit to speed up my game development. For the customization I'm using the [at]export keyword.
Describe the problem or limitation you are having in your project
There are non, maybe that the Inspector gets a bit cluttered when there are many exported variables, but custom icons would really only be a cosmetic thing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In the case that the Inspector becomes to cluttered custom icons could help keeping it organized.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Maybe add an option to specify a path to an item after the [at]export_category keyword (for example [at]export_category("name", "path_to_icon") ) .
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around by using category names like "zoom" or "debug", for which icons already exist. This is probably because there are categories with these names somewhere in some nodes.
Is there a reason why this should be core and not an add-on in the asset library?
It's an editor feature
The text was updated successfully, but these errors were encountered:
Calinou
changed the title
Custom icons for exported categories in the Inspector
Allow defining custom icons for exported categories in the Inspector
Nov 2, 2022
It can be worked around by using category names like "zoom" or "debug", for which icons already exist. This is probably because there are categories with these names somewhere in some nodes.
Don't tell anyone I told you that, but you can actually do it for custom categories as well.
The icons are displayed for any globally registered class, so all you need is a dummy exposed class, like
In 4.x the hack no longer works, as the inspector distinguishes custom categories from standard categories by hint_string and does not display icons for custom categories at all. See godotengine/godot#81221 for details.
You can use the hack by setting a hint_string in _get_property_list() or @export_custom, but this is a bad idea as it will break the documentation tooltips.
We could add support for custom icons using a special prefix in hint_string that the Inspector would recognize. For example, icon:res://icon.svg. Let me know if you are interested in this.
Describe the project you are working on
I'm building a lot of custom scenes that I then only have to instance and configure a bit to speed up my game development. For the customization I'm using the
[at]export
keyword.Describe the problem or limitation you are having in your project
There are non, maybe that the Inspector gets a bit cluttered when there are many exported variables, but custom icons would really only be a cosmetic thing.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In the case that the Inspector becomes to cluttered custom icons could help keeping it organized.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Maybe add an option to specify a path to an item after the
[at]export_category
keyword (for example[at]export_category("name", "path_to_icon")
) .If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around by using category names like "zoom" or "debug", for which icons already exist. This is probably because there are categories with these names somewhere in some nodes.
Is there a reason why this should be core and not an add-on in the asset library?
It's an editor feature
The text was updated successfully, but these errors were encountered: