Page 1 of 1

Draw image on panel

Posted: Sat Jun 23, 2012 6:02 pm
by asafyurdakul
I have a problem. I want to show a small picture from hdd.
How can I draw an image on my panel with new script language.
Please help me.



Posted: Fri Jul 27, 2012 10:22 am
by sjjh
OK, this was posted over a month ago but in case a reply is still wanted, here's what I did in outline:
Create a new material in the data block
Create a new texture
Set the new texture to use the image
Set the new material to use the new texture
Set the object polygon to use the new material

If anybody else is doing this stuff, could they post in this thread please? I had to work on the scaling quite a bit and would like to check my conclusions.

Posted: Sat Jul 28, 2012 1:22 pm
by CoDEmanX
the question was about how to display an image in a custom UI panel, not about how to assign texture to 3d geometry.

there is a template function which can display a material preview, but stuff like this is hardcoded and can't be used to simply display an arbitrary image without lots of hacks and limitations