Image List

The image texture node in the material node editor has a drop down list that allows the user to select an image from all the images available in the .blend file to fill the node’s image slot.

Is there an easy way to have the same menu inside an add-on panel?

Use a pointerproperty with type bpy.types.Image to store the selected image:

image: PointerProperty(name="Image", type=bpy.types.Image)

(example from BlendLuxCore)

To show the dropdown menu in the UI, use this code:

layout.template_ID(, "image", open="")

(example from BlendLuxCore)

1 Like

This is exactly what I was looking for, thank you so much for the help!