Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2007-12-23 20:27:06 +0300
committerPeter Schlaile <peter@schlaile.de>2007-12-23 20:27:06 +0300
commit690d7a85bd7862ce01111335913bc22391049470 (patch)
tree41fdcca83425f385bb99222846d6040b2b65dd00 /source/blender/src/playanim.c
parent74ebc7754729add77fa2b7dc9e74798a407bffed (diff)
== 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 :)
Diffstat (limited to 'source/blender/src/playanim.c')
-rw-r--r--source/blender/src/playanim.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/src/playanim.c b/source/blender/src/playanim.c
index 828ff8e774e..e94366571db 100644
--- a/source/blender/src/playanim.c
+++ b/source/blender/src/playanim.c
@@ -362,6 +362,22 @@ void playanim(int argc, char **argv)
printf("too few arguments for -p (need 2): skipping\n");
}
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:
printf("unknown option '%c': skipping\n", argv[1][1]);
break;