Materials List UI

I want to reproduce this with a python, seems like I have to rebuild it piece by piece? Hard to find the UI piece though. Any tips or even if people can identify some of the layout elements I require?

I’d recommend looking at the source code for the panel, which you can view by right-clicking on one of the elements and selecting “Edit source” which will open the python file that creates the panel in the text editor. You can then see which UI elements are used directly.

But overall, you should look into UILists for this kind of thing, that’s what will let you create custom lists of your own. This is a very good resource that I used to learn about them:

Also, check out the docs page:
https://docs.blender.org/api/current/bpy.types.UIList.html

And there are a few UIList templates in the script editor that are good to use a practical example:

Hope that helps!

3 Likes

Thanks so much for the thorough response, that should be plenty of information. More than I could find googling. Have a great day. :pray:

2 Likes

I recreated this menu in the BlendLuxCore addon, maybe it helps: BlendLuxCore/material.py at 8bdcb8134939fcc3ea91b080ff7ff166717da418 · LuxCoreRender/BlendLuxCore · GitHub

6 Likes

Bless you BYOB. :heart: :heart: :heart: