fix for 'Playanim' playing past the last frame of an animation. also print -s and -e in help message.

This commit is contained in:
Campbell Barton 2012-11-17 01:15:28 +00:00
parent c3c14f862b
commit 654ddfa4d2
3 changed files with 10 additions and 4 deletions

@ -116,8 +116,12 @@ class PlayRenderedAnim(Operator):
cmd = [player_path]
# extra options, fps controls etc.
if preset in {'BLENDER24', 'INTERNAL'}:
opts = ["-a", "-f", str(rd.fps), str(rd.fps_base),
"-j", str(scene.frame_step), file]
opts = ["-a",
"-f", str(rd.fps), str(rd.fps_base),
"-s", str(scene.frame_start),
"-e", str(scene.frame_end),
"-j", str(scene.frame_step),
file]
cmd.extend(opts)
elif preset == 'DJV':
opts = [file, "-playback_speed", "%d" % int(rd.fps / rd.fps_base)]

@ -235,7 +235,7 @@ static void playanim_toscreen(PlayAnimPict *picture, struct ImBuf *ibuf, int fon
{
if (ibuf == NULL) {
printf("no ibuf !\n");
printf("%s: no ibuf for picture '%s'\n", __func__, picture ? picture->name : "<NIL>");
return;
}
if (ibuf->rect == NULL && ibuf->rect_float) {

@ -1077,7 +1077,9 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
"\n\t\t-p <sx> <sy>\tOpen with lower left corner at <sx>, <sy>"
"\n\t\t-m\t\tRead from disk (Don't buffer)"
"\n\t\t-f <fps> <fps-base>\t\tSpecify FPS to start with"
"\n\t\t-j <frame>\tSet frame step to <frame>";
"\n\t\t-j <frame>\tSet frame step to <frame>"
"\n\t\t-s <frame>\tPlay from <frame>"
"\n\t\t-j <frame>\tPlay until <frame>";
static char game_doc[] = "Game Engine specific options"
"\n\t-g fixedtime\t\tRun on 50 hertz without dropping frames"