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 {


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to