How to replace material preview with external image?

Hi,

I wonder if I can replace material preview with external image in Blender 2.5? Or just display image buffer on custom panel? It would be even better.

It’s not possible to do this at the moment. If this is for an external render engine, did you try enabling the bl_preview option? This makes it use the external engine for rendering previews as well, using the standard blender preview scenes.

I already have previews in external material files and I’m able to make image buffer from them. With 2.49 I can just display image, but 2.5 don’t have such option. From my point of view it will be best to use such previews but I’ll take a look at bl_preview and see what I can do with this. It may have some pros.
BTW. is image display API planned for 2.5 in near future?
Thanks for answer.

I don’t think it’s on anyone’s todo list, but probably it will come up again.

The advantage of using Blender’s preview system is that it’s consistent, but also gets updated automatically on changes, and is used for icons, link/append previews, etc.

@brecht, great feature!
But is it possible to detect that render engine is used to render preview?
For example, I want to use different settings for render preview or even different scene.

You can check scene name. When it’s preview then scene is named “preview”.

@grzybu, good as a temporary solution, but one day somebody will call his scene ‘preview’ =)

Of course, but I didn’t found better solution so far.

I also wonder if I can call Blender to generate material preview instead of external one when external engine is selected and bl_preview=True?
Simple changing engine to BLENDER_RENDER and calling render() won’t work and still external engine is called.