Hello everyone,
I have been working on a small Blender add on that allows the user to add custom editable models to a scene (Like “Archimesh”) however I’m trying to create code that shows a thumbnail on the N panel so users can see a rendered thumbnail (kind of like Kit Ops) and brings the model in from a separate Blend file.
Example:

I’ve tried reading the code for the function but it’s a little more complicated than I know
What my code produces so far:

The thumbnail I want to add:
How would I go about:
1 - Adding the functionality of a thumbnail to the N Panel
2 - Linking my code to the specific “thumbnail” folder for my model
3 - Adding the model to the scene when selected (I’m adding an “Add Model” button
Thank you for your time and help!
In the Scripting Workspace, in the Text Editor, under Templates > Python you will find a file called ui_previews_dynamic_enum.py
This is a minimal example that will add a panel that can display custom images from a user defined folder similar to the KIT OPS panel. By default, the panel will go in the Properties editor, under the Object tab, but you can change it to go wherever you like.
It will load all of the pictures in the folder as EnumProperty items.
If you want something to happen when the user selects an image, check out the set
or update
functions of the EnumProperty, or you could add an operator (the ‘Add Model’ button you mention) that will check which image is currently displayed and link it to the correct model.
1 Like
Thank you so much! I’ll give that a try immediately
1 Like