5
$\begingroup$

I'd like to show an image (png, preferably) in my panel. Does anyone know if this is supported through labels or template_XX UIPanels?

$\endgroup$
3
$\begingroup$

I believe the only option is to use a texture preview, which requires an Image and a Texture ID datablock (Texture.image = Image). It can then be added to the layout by using:

layout.template_preview(bpy.data.textures["Tex"])

But there's no control about how it's drawn (not even the vertical size using UILayout.scale_y).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.