Image sequence - access first and last frame?
I'm trying to access the first and last frame of an image sequence but I haven't found a way. For example, say I have an image sequene that is named sequentially on disk, something like shot.0100.jpg all the way to shot.0200.jpg. I would like to access the first frame (100) and last frame (200) or at least the filepath to the first and last frame.
If I call the file attribute on the file object I only get the path to the first frame:
var item = app.project.item(1);
alert(item.file)
>> /path/to/shot.0100.jpg
If the imported image sequence is not renamed, I can access the frame range via the file attribute (after parsing the result).
var item = app.project.item(1);
alert(item.name)
>> frame_number_v001.[0046-0200].jpgBut this only works if the footage hasn't been renamed after import.
I've looked through the attributes/methods of FileSource/FootageSource/FootageItem without luck. It seems to me I need to call getFiles and parse each file in a file directory and check the names. For long sequences/network drives this is going to be very slow.
Anyone have a better solution?
