I know that I can use icon_value = layout.icon(_context.object)
, and I also know how to implement custom icons in Blender. But what if I'm writing my own class, want to be able to store it as a template list and just want to use existing Blender icon as its icon in the template list? Is there any place in API where the full icons list is stored somehow? Can I perform in any way something like
for i, j in enumerate(bpy.app.all_blender_icons): # fake pass
if j.name == "EVENT_M":
return i
Of course I could just manually go over all int numbers and find out which one returns the icon I need, but it doesn't seem like a very good idea in any way.