Get Image.getFilename() per frame for sequences?

Does anyone know if its possible to get the filename of an image per frame for sequences. I’m trying to get Blender to work out what filename to call in a sequence for me automatically. I can get the filename but it doesn’t update as I change the currentFrame of the scene object. Is this possible?

Thanks in advance :wink:

Thres no way currently - but It would not be that hard to guess… first see how many numbers there are - img_00001.png the next value would be something like…

“img_%.5d.png” % Blender.Get(‘curframe’)

Youd also want a function to count the decimal places.

This isnt perfect but would work on most cases.
digit_len = len([c for c in filename if c.isdigit()])

Just make sure you dont have the path in there and no numbers in the name… just a quick example, you could use a while loop for correct results.

hrm all this isnt that easy. there should be a nicer way to do this :confused:

I thought about doing it manuall (and I may have to), but its kind of a shame to have to since Blender already knows!
Oh well… thanks ideasman42!