From 004925c0f163249b6de184346fe131c5a92e9e07 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 14 Mar 2010 12:49:55 +0000 Subject: 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. --- source/creator/creator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 61079057c8f..9e910b7cad2 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -718,7 +718,7 @@ static int set_start_frame(int argc, char **argv, void *data) 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 @@ static int set_end_frame(int argc, char **argv, void *data) 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 @@ static int set_skip_frame(int argc, char **argv, void *data) 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 { -- cgit v1.2.3 From e3c746659e378d5e739f97a9256cbfe1fdec6fee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Mar 2010 17:18:36 +0000 Subject: strip quites off buildinfo at startup (was doing this for splash screen and python api) --- source/creator/buildinfo.c | 10 +++++----- source/creator/creator.c | 32 ++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 11 deletions(-) (limited to 'source/creator') diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c index d50a99e8850..8b02dde1a5f 100644 --- a/source/creator/buildinfo.c +++ b/source/creator/buildinfo.c @@ -35,9 +35,9 @@ #define XSTRINGIFY(x) #x #ifdef BUILD_DATE -const char * build_date=STRINGIFY(BUILD_DATE); -const char * build_time=STRINGIFY(BUILD_TIME); -const char * build_rev=STRINGIFY(BUILD_REV); -const char * build_platform=STRINGIFY(BUILD_PLATFORM); -const char * build_type=STRINGIFY(BUILD_TYPE); +char build_date[]= STRINGIFY(BUILD_DATE); +char build_time[]= STRINGIFY(BUILD_TIME); +char build_rev[]= STRINGIFY(BUILD_REV); +char build_platform[]= STRINGIFY(BUILD_PLATFORM); +char build_type[]= STRINGIFY(BUILD_TYPE); #endif diff --git a/source/creator/creator.c b/source/creator/creator.c index 9e910b7cad2..91b4ed09b40 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -107,11 +107,11 @@ // from buildinfo.c #ifdef BUILD_DATE -extern const char * build_date; -extern const char * build_time; -extern const char * build_rev; -extern const char * build_platform; -extern const char * build_type; +extern char build_date[]; +extern char build_time[]; +extern char build_rev[]; +extern char build_platform[]; +extern char build_type[]; #endif /* Local Function prototypes */ @@ -161,6 +161,18 @@ static void blender_esc(int sig) } } +/* buildinfo can have quotes */ +static void strip_quotes(char *str) +{ + if(str[0] == '"') { + int len= strlen(str) - 1; + memmove(str, str+1, len); + if(str[len-1] == '"') { + str[len-1]= '\0'; + } + } +} + static int print_version(int argc, char **argv, void *data) { #ifdef BUILD_DATE @@ -936,7 +948,15 @@ int main(int argc, char **argv) if(blender_path_env) BLI_strncpy(blender_path, blender_path_env, sizeof(blender_path)); } - + +#ifdef BUILD_DATE + strip_quotes(build_date); + strip_quotes(build_time); + strip_quotes(build_rev); + strip_quotes(build_platform); + strip_quotes(build_type); +#endif + RNA_init(); RE_engines_init(); -- cgit v1.2.3 From d8d92b5d93e3553150fe9f28f1efbc4c3534c395 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Mar 2010 18:08:12 +0000 Subject: user preference to disable the splash screen --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 91b4ed09b40..bf45a89fa5b 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -196,7 +196,7 @@ static int print_help(int argc, char **argv, void *data) printf ("Blender %d.%02d (sub %d) Build\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION); printf ("Usage: blender [args ...] [file] [args ...]\n"); printf ("\nRender options:\n"); - printf (" -b \tRender in background (doesn't load the user defaults .B.blend file)\n"); + printf (" -b \tLoad in background (often used for background rendering)\n"); printf (" -a render frames from start to end (inclusive), only works when used after -b\n"); printf (" -S \tSet scene \n"); printf (" -f \tRender frame and save it\n"); -- cgit v1.2.3 From ed076d74ef3f0593971108511dc25e63cab7e829 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 14 Mar 2010 20:24:11 +0000 Subject: Rendering from 3d view in local view or with unlocked layer was not working yet, now layer is passed along to render engine, changes quite a few files because simple swapping trick no longer works with threading. --- source/creator/creator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index bf45a89fa5b..3eb2cad1f65 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -685,7 +685,7 @@ static int render_frame(int argc, char **argv, void *data) frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame)); - RE_BlenderAnim(re, scene, frame, frame, scene->r.frame_step, &reports); + RE_BlenderAnim(re, scene, scene->lay, frame, frame, scene->r.frame_step, &reports); return 1; } else { printf("\nError: frame number must follow '-f'.\n"); @@ -705,7 +705,7 @@ static int render_animation(int argc, char **argv, void *data) Render *re= RE_NewRender(scene->id.name, RE_SLOT_DEFAULT); ReportList reports; BKE_reports_init(&reports, RPT_PRINT); - RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); + RE_BlenderAnim(re, scene, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } -- cgit v1.2.3 From 63a368ceaa747271d417c98c607a61374e3cfb68 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Mar 2010 17:23:20 +0000 Subject: - menu for selecting add scenes for the sequencer. - update internal 'btempdir' from userprefs on changing and initializing the temp dir. - add sequence strip operators nolonger require the sequence view to be active (better for automation). (commit 27434 by Campbell from render25 branch) --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 3eb2cad1f65..a3a43a4629d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1000,7 +1000,7 @@ int main(int argc, char **argv) WM_init(C, argc, argv); - // XXX BRECHT SOLVE + /* this is properly initialized with user defs, but this is default */ BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */ #ifndef DISABLE_SDL -- cgit v1.2.3 From 5c9c50e13bf9a9ce9f5f2f642ea692c8ce4aa331 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 16 Mar 2010 17:37:34 +0000 Subject: change the scene opengl sequence rendering to be a global option with rendering and scrubbing settings. still need to do a do_versions for this to work right without changing settings. (commit 27442 by Campbell from render25 branch) --- source/creator/creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index a3a43a4629d..703ed09c976 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1028,7 +1028,7 @@ int main(int argc, char **argv) * Update: now this function also inits the bpymenus, which also depend * on U.pythondir. */ - + // TODO - U.pythondir #endif -- cgit v1.2.3 From 391cc2d004c5fc231ac546d89f64ae4ba5c062c0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Mar 2010 16:41:01 +0000 Subject: merge own commits into render branch into trunk since 27560 27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623 --- source/creator/creator.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/creator') diff --git a/source/creator/creator.c b/source/creator/creator.c index 703ed09c976..7eb8f36e4d8 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -162,6 +162,7 @@ static void blender_esc(int sig) } /* buildinfo can have quotes */ +#ifdef BUILD_DATE static void strip_quotes(char *str) { if(str[0] == '"') { @@ -172,6 +173,7 @@ static void strip_quotes(char *str) } } } +#endif static int print_version(int argc, char **argv, void *data) { -- cgit v1.2.3