Use internal images in template_icon_view

I’m trying to fill a template_icon_view with Blender’s default brushes. It finds the brushes just fine, but doesn’t actually show any preview images, just blank spaces where the images should be, except for custom brushes, which appear fine. Here’s a link with the same question in Blender stack exchange (it’s easier to see the code there): link

Contact https://twitter.com/ndee85 on Tweeter because he use a lot this function with his addons!

Yeah, he has also asked multiple similar questions. I would buy his addon and study his code, but I’m a bit broke at the moment. I did find a workaround, which works but I don’t really like it. Basically, if a brush doesn’t have a custom icon, it’s easy to create the name of the brush icon using the brush.sculpt_tool property. Why does the Blender Python API have to be this weird…

I have an unfinished addon that works, and I’m trying to compare your code to mine to see what’s wrong, but I don’t see it.

Could you share the part where you get the preview images?