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
Earlier, you could always set the icon for each node programmatically by node.set_meta("_editor_icon", icon_res).
However, in Godot v4.3 (and possibly a bit earlier), it no longer has any effect to do this.
Is this feature limitation purposeful or accidental? (I hope accidental.)
Consequences
This change greatly reduces the scope of visualizing information in the tree.
You can no longer change the icon based on some state of the node, which can sometimes tremendously help to read the situation as a whole. (Unless you make a script for each icon usage, and change the script, and re-init and -set the values, etc.)
You can no longer represent a tree with custom icons dynamically (eg. for mapping more info to your custom nodes), as each item in the tree would need to have its own script with icon attached.
Generally speaking, you can no longer set icon on nodes that have no custom script. This also cuts away a lot of dynamic visualization possibilities.
(Note. Visualizing complexity in a tree can tremendously speed up workflow in certain cases.)
Suggestion
Would it be possible to still allow using "_editor_icon" (or some other means) to set icon dynamically? So that it can override whatever custom default (or internal) class based icon was used.
Steps to reproduce
Way it used to work:
var some_icon := load("res://some_icon.svg") # Any custom icon, can load dynamically.
var node := Node.new()
node.set_meta("_editor_icon", some_icon)
The only way to use now is static:
@icon("res://some_icon.svg") # <-- Can never be dynamic.
extends Node
I removed the meta hack for icons, because there doesn't seem to be anything that uses it in the editor anymore. It was introduced sometime around #20560, #21717 refactored it a bunch, and #30697 removed it even more. So currently it's only read in our codebase, but never set. Something may still rely on this existing, as a hack, but I don't think it's worth to support such undocumented "feature".
Thanks for the info - tried to search for it many times, but couldn't find.
It's unfortunate, from my point of view, that there's no longer any way to set icons for nodes dynamically. But now that I know that it's by design, I'll make respective adjustments and compromises in the tools. (Btw. I do agree that, as a design, "_editor_icon" meta data was hacky.)
Tested versions
System information
Win 11
Issue description
Description
Earlier, you could always set the icon for each node programmatically by
node.set_meta("_editor_icon", icon_res)
.Consequences
This change greatly reduces the scope of visualizing information in the tree.
(Note. Visualizing complexity in a tree can tremendously speed up workflow in certain cases.)
Suggestion
Would it be possible to still allow using "_editor_icon" (or some other means) to set icon dynamically? So that it can override whatever custom default (or internal) class based icon was used.
Steps to reproduce
Way it used to work:
The only way to use now is static:
Minimal reproduction project (MRP)
editor-icon.zip
The text was updated successfully, but these errors were encountered: