Small challenge...

Hi,
I know this is a shameless request for something I should do myself, but as so often I don’t have the time right now.
So that’s why I call this request a challenge instead :slight_smile:
Should be really quick if you know your way around in the Blender API (which I don’t).

Task:
Always load the newest image file inside a given folder into the UV/Image Editor. (Linux or better crossplatform)

Why?:
I’m rendering from another application and want to keep track of the render as it goes.

No fancy features needed!
I know this is cheesy, but maybe there’s someone out there looking for a small task to practice coding skills :wink:

thanks,
Thomas

Alright, I get it… so I’m making the small challenge even smaller by just asking for the blender part.
Non Blender goes like this:

import os
import glob
import time


directory = '/some/folder
while 1:
    newest = max(glob.iglob(directory+'*'), key=os.path.getctime)
    print newest
    time.sleep(0.5)

All I need now is something like: blender.loadImageInViewer(newest)

Thanks

P.S.: And maybe a button to start and cancel the scanning :wink:

Got it to work, guess I won! :slight_smile: