Godot: Specific class_name's have weird icons

Created on 28 Oct 2018  路  3Comments  路  Source: godotengine/godot

Godot version: aeddb30

Issue description:
Naming scripts after specific names such as Snap or Group will change the icon in the Add Child Node context.
screenshot from 2018-10-28 11-55-49

Steps to reproduce:
Create a new script.
Set the class_name to Snap (or any other iconname used by Godot)
Search for the class/script in the Add Child Node context.

Edit
Any icon from editor/icons can be used. The name has to be in PascalCase.

bug junior job editor gdscript

Most helpful comment

Are you sure it is not a feature tho..

All 3 comments

Are you sure it is not a feature tho..

This could really be a feature indeed! I've actually have a couple of classes that do match the built-in icon names.

But unfortunately it's not currently possible to override it with a custom class_name icon, it always reverts to using an icon from the Godot's theme in any case.

Would you still be interested in preserving this behavior while fixing its limitations?

Yes it should be made to favour user defined icons over built-in ones. Not sure if the current happenstance feature is actually useful, but it probably makes the code simpler anyway to keep it and just check class_name icon first, and then fallback to the class name built-in icon if relevant (i.e. using the same code as for built-in nodes).

Was this page helpful?
0 / 5 - 0 ratings