diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index dd4a6dd74d6..5d92b8cadc0 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -101,6 +101,7 @@ #ifdef BUILD_DATE extern char * build_date; extern char * build_time; +extern char * build_rev; extern char * build_platform; extern char * build_type; #endif @@ -116,6 +117,14 @@ extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */ char btempdir[FILE_MAXDIR+FILE_MAXFILE]; +/* unix path support. + * defined by the compiler. eg "/usr/share/blender/2.5" "/opt/blender/2.5" */ +#ifndef BLENDERPATH +#define BLENDERPATH "" +#endif + +char blender_path[FILE_MAXDIR+FILE_MAXFILE] = BLENDERPATH; + /* Initialise callbacks for the modules that need them */ static void setCallbacks(void); @@ -221,6 +230,10 @@ static void print_help(void) printf (" \t\t passed unchanged. Access via Python's sys.argv\n"); printf ("\nEnvironment Variables:\n"); printf (" $HOME\t\t\tStore files such as .blender/ .B.blend .Bfs .Blog here.\n"); + printf (" $BLENDERPATH\tSystem directory to use for data files and scripts.\n"); + printf (" \tFor this build of blender the default BLENDERPATH is...\n"); + printf (" \t\"%s\"\n", blender_path); + printf (" \tseting the $BLENDERPATH will override this\n"); #ifdef WIN32 printf (" $TEMP\t\tStore temporary files here.\n"); #else @@ -323,6 +336,12 @@ int main(int argc, char **argv) BLI_where_am_i(bprogname, argv[0]); + { /* override the hard coded blender path */ + char *blender_path_env = getenv("BLENDERPATH"); + if(blender_path_env) + BLI_strncpy(blender_path, blender_path_env, sizeof(blender_path)); + } + RNA_init(); RE_engines_init(); @@ -626,7 +645,7 @@ int main(int argc, char **argv) int frame = atoi(argv[a]); Render *re = RE_NewRender(scene->id.name); - frame = MIN2(MAXFRAME, MAX2(1, frame)); + frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame)); RE_BlenderAnim(re, scene, frame, frame, scene->frame_step); } |