-t/SetTime/SetTimeRange

Function

These functions are all set the time range that Shake should do when executing a script.

SetTime is used in the script so that the Interface knows what is the current frame next time the script is loaded up. This is particularly useful because of the caching in Shake. Since we return to the same frame, it will be brought immediately out of the cache, rather than re-calculating it.

SetTimeRange and -t are identical to each other, with SetTimeRange being used in the script and -t on the command line. When you use -t on the command line, it overrides SetTimeRange.

The format for the time range is usually

startframe-endframe

ie,

-t 1-50

renders 50 frames, starting at frame 1..

However, you can extend this:

Time Range Number of Frames Frames Rendered
1-100
100
1, 2, 3...100
1-100x2
50
1, 3, 5...99
2-100x2 50 2, 4, 6...100
1-100x20 5 1, 21, 41...81
1-20,30-40 31 1,2,3...20, and 30,31,32...40
1-10x2,15,18,20-25 13 1,3,5...9,15,18, 20, 21, 22 ...25
100-1 100 100,99,98...2

Synopsis

void SetTime( float );
void SetTimeRange(const char *);

Script

SetTime( float );
SetTimeRange("timerange");

Command Line

shake -t timerange

Examples

This just renders frames 45 and 60:

shake -script script.shk -t 45,60

In a script, this renders frames 1,3,5, ...49:

SetTimeRange("1-50x2");