[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27480] trunk/blender/source/creator/ creator.c: Fix #21572: command line render start frame can't be < 1.

Brecht Van Lommel brecht at blender.org
Sun Mar 14 13:49:55 CET 2010


Revision: 27480
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27480
Author:   blendix
Date:     2010-03-14 13:49:55 +0100 (Sun, 14 Mar 2010)

Log Message:
-----------
Fix #21572: command line render start frame can't be < 1. I've set it
to use MINFRAME now which is 0, negative frames are not supported for
this yet.

Modified Paths:
--------------
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c	2010-03-14 12:35:15 UTC (rev 27479)
+++ trunk/blender/source/creator/creator.c	2010-03-14 12:49:55 UTC (rev 27480)
@@ -718,7 +718,7 @@
 		Scene *scene= CTX_data_scene(C);
 		if (argc > 1) {
 			int frame = atoi(argv[1]);
-			(scene->r.sfra) = MIN2(MAXFRAME, MAX2(1, frame));
+			(scene->r.sfra) = CLAMPIS(frame, MINFRAME, MAXFRAME);
 			return 1;
 		} else {
 			printf("\nError: frame number must follow '-s'.\n");
@@ -737,7 +737,7 @@
 		Scene *scene= CTX_data_scene(C);
 		if (argc > 1) {
 			int frame = atoi(argv[1]);
-			(scene->r.efra) = MIN2(MAXFRAME, MAX2(1, frame));
+			(scene->r.efra) = CLAMPIS(frame, MINFRAME, MAXFRAME);
 			return 1;
 		} else {
 			printf("\nError: frame number must follow '-e'.\n");
@@ -756,10 +756,10 @@
 		Scene *scene= CTX_data_scene(C);
 		if (argc > 1) {
 			int frame = atoi(argv[1]);
-			(scene->r.frame_step) = MIN2(MAXFRAME, MAX2(1, frame));
+			(scene->r.frame_step) = CLAMPIS(frame, 1, MAXFRAME);
 			return 1;
 		} else {
-			printf("\nError: number of frames must follow '-j'.\n");
+			printf("\nError: number of frames to step must follow '-j'.\n");
 			return 0;
 		}
 	} else {





More information about the Bf-blender-cvs mailing list