Draw image on panel

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Posts: 1
Joined: Sat Jun 23, 2012 5:58 pm

Draw image on panel

Postby asafyurdakul » Sat Jun 23, 2012 6:02 pm

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.



Posts: 2
Joined: Fri Jul 27, 2012 9:43 am

Postby sjjh » Fri Jul 27, 2012 10:22 am

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.

Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Sat Jul 28, 2012 1:22 pm

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
I'm sitting, waiting, wishing, building Blender in superstition...

Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest