forked from bartvdbraak/blender
== Playback (peach request) ==
Correct playback frames per second when "Play" is pressed. (Play spawns a new instance of blender, it could pass an argument that sets the frames per second) (double credit :)
This commit is contained in:
parent
74ebc77547
commit
690d7a85bd
@ -507,9 +507,9 @@ static void run_playanim(char *file)
|
|||||||
calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100,
|
calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100,
|
||||||
(G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
|
(G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
sprintf(str, "%s -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
|
sprintf(str, "%s -a -p %d %d -f %d %g \"%s\"", bprogname, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
|
||||||
#else
|
#else
|
||||||
sprintf(str, "\"%s\" -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
|
sprintf(str, "\"%s\" -a -p %d %d -f %d %g \"%s\"", bprogname, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
|
||||||
#endif
|
#endif
|
||||||
system(str);
|
system(str);
|
||||||
}
|
}
|
||||||
|
@ -362,6 +362,22 @@ void playanim(int argc, char **argv)
|
|||||||
printf("too few arguments for -p (need 2): skipping\n");
|
printf("too few arguments for -p (need 2): skipping\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
if (argc>3) {
|
||||||
|
double fps = atof(argv[2]);
|
||||||
|
double fps_base= atof(argv[3]);
|
||||||
|
if (fps == 0) {
|
||||||
|
fps = 1;
|
||||||
|
printf("invalid fps,"
|
||||||
|
"forcing 1\n");
|
||||||
|
}
|
||||||
|
swaptime = fps_base / fps;
|
||||||
|
argc-= 2;
|
||||||
|
argv+= 2;
|
||||||
|
} else {
|
||||||
|
printf("too few arguments for -f (need 2): skipping\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("unknown option '%c': skipping\n", argv[1][1]);
|
printf("unknown option '%c': skipping\n", argv[1][1]);
|
||||||
break;
|
break;
|
||||||
|
@ -194,6 +194,7 @@ static void print_help(void)
|
|||||||
printf (" -a <file(s)>\tPlayback <file(s)>\n");
|
printf (" -a <file(s)>\tPlayback <file(s)>\n");
|
||||||
printf (" -p <sx> <sy>\tOpen with lower left corner at <sx>, <sy>\n");
|
printf (" -p <sx> <sy>\tOpen with lower left corner at <sx>, <sy>\n");
|
||||||
printf (" -m\t\tRead from disk (Don't buffer)\n");
|
printf (" -m\t\tRead from disk (Don't buffer)\n");
|
||||||
|
printf (" -f <fps> <fps-base>\t\tSpecify FPS to start with\n");
|
||||||
|
|
||||||
printf ("\nWindow options:\n");
|
printf ("\nWindow options:\n");
|
||||||
printf (" -w\t\tForce opening with borders (default)\n");
|
printf (" -w\t\tForce opening with borders (default)\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user