Hi,
The function: int GetLowerFrameRange( string filename, int startFrame, int paddingSize ) unfortunately doesn’t play nice with a negative frame range
ie: frame range -50 to 50 = 101 TaskCount.
An example of this can be seen in the Submit QuickTime Job submission interface where a negative frame filename is selected and the “def InputImagesModified(*args):” is unable to handle the negative frame number and shows the frame range as 0 to 50, which is incorrect.
My files are named as following:
test_scene_-001.tif through to test_scene_050.tif
Could we fix this function and indeed, maybe the others affected by this as well? such as “GetLowerFrameFilename” or indeed the “UpperFrameRange” as well if the total sequence is both negative numbers?
Thanks,
Mike
Hey Mike,
Thanks for reporting this. I’ve logged it as a bug, but because it isn’t a regression or a critical bug, it’s currently targeted for a 5.x point release.
Cheers,
That’s cool.Just reporting it as a bug
Sorry Ryan…more bad news…
These functions (GetLowerFrameRange) & (GetUpperFrameRange) also are unable to cater for filenames which have been rendered out to a non 1-nth padding sequence.
ie: if the filename’s are “mike.0000.exr, mike.0001.exr, mike.0002.exr” its fine, BUT “mike.0000.exr, mike.0005.exr, mike.0010.exr” fails
Would be nice if the functions could handle ANY nth frame padding?
Thanks,
Mike
That’s done by design, and it can sometimes be helpful to work this way because can help detect if frames are missing from a sequence. For example, in the QT submitter, you would want this behavior so that you don’t accidentally submit an incomplete sequence.
Maybe these functions just need a boolean value for handling incomplete sequences.
Cheers,
Oh, I see.
In that case, having the option (boolean would be fine) to effectively scan for nth frame sequences would be most useful.
Thanks,
Mike
Some good news! The negative frame range bug will be fixed in RC3 (we bumped it’s priority since it was a bug). Unfortunately, the other feature request will have to wait because it’s a “new” feature.
Cheers,
CURSES!
I just tripped over this issue again!
I need to grab the lower & upper frame range of a Nth image sequence and the “GetLowerFrameRange” & “GetUpperFrameRange” still need to be enhanced to support this!
Bugger. No choice, I will have to code this myself as I need the solution this week
Hey Mike,
It’s still on the todo list. We haven’t had a lot of time to focus on the API at the moment because we’ve been working hard on designing the new user interface and database backend for Deadline 6. We may have time to look at these smaller features once everything has stabilized during the beta.
I just wanted to confirm one thing. You want explicit nth frame support, but it should still stop if it can’t find a file for the next frame?
For example, let’s say GetUpperFrameRange takes a value of 3 for the frame step, and starts at frame 0. It would find these frames:
frame0000.ext, frame0003.ext, frame0006.ext, frame0009.ext, frame00012.ext, …
If frame0009.ext is missing, it will stop after frame0006.ext. Is that the desired behavior? I ask because our functions are just while loops with an increment that loop until a file doesn’t exist. I know I had mentioned looking at simply supporting incomplete sequences, but in order to do that, we would have to look for each file that could be represented with the given padding length, and that would be a slow and operation.
Cheers,
Unfortunately, as I have just realised myself this afternoon, the situation is as bad as it can be!
I need to handle sequences which will eventually have a frame range like this:
0-30x5,60-70x5,90-95x1
So, if a user browses and selects an initial file such as frame0005.ext (using the example above), I need to actually find “frame0000.ext” and “frame0095.ext” as a result of API calls: “GetLowerFrameRange” or “GetUpperFrameRange”.
I guess I need a API method which allows overloading with an additional “True/False - ignore missing files in sequence” and hence, ignores if a file doesn’t exist in the sequence, but continues to loop until all files in that directory have been found which MATCH the given initial FILENAME pattern?
Therefore, I don’t see any alternative except a ‘slow’ I/O file crawl with “Directory.GetFiles”:
public static string[] GetFiles(
string path,
string searchPattern,
SearchOption searchOption
)
I nearly have something now working, it would just be nicer to have this as a built-in API method. (I would rather you spend your time making v6 awesome )
Thanks,
Mike
Cool. Thanks for clarifying!