[Bf-committers] 2.5 API: How to show an image as a preview in a panel?

whiterabbit at dreamscapearts.com whiterabbit at dreamscapearts.com
Sat Mar 27 23:29:16 CET 2010


Hey all,

I have another 2.5 Python API question.
I'm trying to find a good way to pass a render from RenderMan into a 
preview window in a panel (for previewing material shaders, light 
shaders, ect). I'm currently doing this by loading the file as an Image 
and then setting it up as a Texture to view in 
UILayout.template_preview(). This is cumbersome however and the texture 
settings stretch the image on preview. Would it be possible to have 
UILayout.template_preview() also use an Image ID datablock or is there a 
better/simpler way to achieve image previews?

Thanks in advance,
Eric Back (WHiTeRaBBiT)


More information about the Bf-committers mailing list