Q: Image Gallery via Python?

(Krabat) #1

Well, my efforts trying make an Image Gallery via Python came to a halt quite quickly. Started out with just tryiong to import in image into blender, i failed.

from Blender import Image
im = Image.Load(‘filename’)

that’s wahat it say in the API, but somehow does not work for me. Inserting “Testpic.jpg” within the brackets (Testpic.jpg is in the Blend-Folder and in the Blender Folder) gives me an IO-Error in Line 2. A Full Path to the Image results in the same Error-Message.

I use Blender Publisher (2.25), Windoze98se and have Python22 installed with the Pythonpath correctly set in the autoexec.bat…


P.S.: how do you get an " \ " to appear in the script window of Blender?

(eeshlo) #2

I guess you use a german keyboard? If so, python also allows you to use a single ‘/’ in your path names, which I use all the time in my scripts anyway.

As for the Image.Load problem, this might have something to do with the path, but in any case, lots of things in 2.25 are still a bit unreliable, besides that, there seem to be different versions around that have slightly different python implementations, making things even more confusing…