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:
-rw-r--r--doc/manpage/blender.162
-rw-r--r--source/creator/creator.c38
2 files changed, 87 insertions, 13 deletions
diff --git a/doc/manpage/blender.1 b/doc/manpage/blender.1
index 6b2876a46b1..8338b41559e 100644
--- a/doc/manpage/blender.1
+++ b/doc/manpage/blender.1
@@ -1,4 +1,4 @@
-.TH "BLENDER" "1" "January 19, 2011" "Blender Blender 2\&.56 (sub 0) "
+.TH "BLENDER" "1" "January 20, 2011" "Blender Blender 2\&.56 (sub 0) "
.SH NAME
blender \- a 3D modelling and rendering package
@@ -133,17 +133,9 @@ Use amount of <threads> for rendering in background
.SS "Animation Playback Options:"
.TP
-.B \-a <options> <file(s)>
-.br
-Playback <file(s)>, only operates this way when not running in background.
-.br
- \-p <sx> <sy> Open with lower left corner at <sx>, <sy>
-.br
- \-m Read from disk (Don't buffer)
-.br
- \-f <fps> <fps\-base> Specify FPS to start with
+.B \-a or \-\-render\-anim
.br
- \-j <frame> Set frame step to <frame>
+Render frames from start to end (inclusive)
.br
.IP
@@ -208,6 +200,8 @@ Turn debugging on
Enable floating point exceptions
.br
+.IP
+
.TP
.B \-\-factory\-startup
.br
@@ -217,6 +211,38 @@ Skip reading the "startup.blend" in the users home directory
.IP
.TP
+.B \-\-env\-system\-config
+.br
+Set the BLENDER_SYSTEM_CONFIG environment variable
+.br
+
+.TP
+.B \-\-env\-system\-datafiles
+.br
+Set the BLENDER_SYSTEM_DATAFILES environment variable
+.br
+
+.TP
+.B \-\-env\-system\-scripts
+.br
+Set the BLENDER_SYSTEM_SCRIPTS environment variable
+.br
+
+.TP
+.B \-\-env\-system\-plugins
+.br
+Set the BLENDER_SYSTEM_PLUGINS environment variable
+.br
+
+.TP
+.B \-\-env\-system\-python
+.br
+Set the BLENDER_SYSTEM_PYTHON environment variable
+.br
+
+.IP
+
+.TP
.B \-nojoystick
.br
Disable joystick support
@@ -299,6 +325,20 @@ Print this help text and exit (windows only)
.br
.TP
+.B \-a <options> <file(s)>
+.br
+Playback <file(s)>, only operates this way when not running in background.
+.br
+ \-p <sx> <sy> Open with lower left corner at <sx>, <sy>
+.br
+ \-m Read from disk (Don't buffer)
+.br
+ \-f <fps> <fps\-base> Specify FPS to start with
+.br
+ \-j <frame> Set frame step to <frame>
+.br
+
+.TP
.B \-R
.br
Register .blend extension (windows only)
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 90f579a9d9e..b5aea70ac8e 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -245,10 +245,15 @@ static int print_help(int UNUSED(argc), char **UNUSED(argv), void *data)
printf ("Misc Options:\n");
BLI_argsPrintArgDoc(ba, "--debug");
BLI_argsPrintArgDoc(ba, "--debug-fpe");
+ printf("\n");
BLI_argsPrintArgDoc(ba, "--factory-startup");
-
printf("\n");
-
+ BLI_argsPrintArgDoc(ba, "--env-system-config");
+ BLI_argsPrintArgDoc(ba, "--env-system-datafiles");
+ BLI_argsPrintArgDoc(ba, "--env-system-scripts");
+ BLI_argsPrintArgDoc(ba, "--env-system-plugins");
+ BLI_argsPrintArgDoc(ba, "--env-system-python");
+ printf("\n");
BLI_argsPrintArgDoc(ba, "-nojoystick");
BLI_argsPrintArgDoc(ba, "-noglsl");
BLI_argsPrintArgDoc(ba, "-noaudio");
@@ -399,6 +404,28 @@ static int set_factory_startup(int UNUSED(argc), char **UNUSED(argv), void *UNUS
return 0;
}
+static int set_env(int argc, char **argv, void *UNUSED(data))
+{
+ /* "--env-system-scripts" --> "BLENDER_SYSTEM_SCRIPTS" */
+
+ char env[64]= "BLENDER";
+ char *ch_dst= env + 7; /* skip BLENDER */
+ char *ch_src= argv[0] + 5; /* skip --env */
+
+ if (argc < 2) {
+ printf("%s requires one argument\n", argv[0]);
+ exit(1);
+ }
+
+ for(; *ch_src; ch_src++, ch_dst++) {
+ *ch_dst= (*ch_src == '-') ? '_' : (*ch_src)-32; /* toupper() */
+ }
+
+ *ch_dst= '\0';
+ BLI_setenv(env, argv[1]);
+ return 1;
+}
+
static int playback_mode(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
/* not if -b was given first */
@@ -1017,6 +1044,13 @@ void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
BLI_argsAdd(ba, 1, NULL, "--factory-startup", "\n\tSkip reading the "STRINGIFY(BLENDER_STARTUP_FILE)" in the users home directory", set_factory_startup, NULL);
+ /* TODO, add user env vars? */
+ BLI_argsAdd(ba, 1, NULL, "--env-system-config", "\n\tSet the "STRINGIFY_ARG(BLENDER_SYSTEM_CONFIG)" environment variable", set_env, NULL);
+ BLI_argsAdd(ba, 1, NULL, "--env-system-datafiles", "\n\tSet the "STRINGIFY_ARG(BLENDER_SYSTEM_DATAFILES)" environment variable", set_env, NULL);
+ BLI_argsAdd(ba, 1, NULL, "--env-system-scripts", "\n\tSet the "STRINGIFY_ARG(BLENDER_SYSTEM_SCRIPTS)" environment variable", set_env, NULL);
+ BLI_argsAdd(ba, 1, NULL, "--env-system-plugins", "\n\tSet the "STRINGIFY_ARG(BLENDER_SYSTEM_PLUGINS)" environment variable", set_env, NULL);
+ BLI_argsAdd(ba, 1, NULL, "--env-system-python", "\n\tSet the "STRINGIFY_ARG(BLENDER_SYSTEM_PYTHON)" environment variable", set_env, NULL);
+
/* second pass: custom window stuff */
BLI_argsAdd(ba, 2, "-p", "--window-geometry", "<sx> <sy> <w> <h>\n\tOpen with lower left corner at <sx>, <sy> and width and height as <w>, <h>", prefsize, NULL);
BLI_argsAdd(ba, 2, "-w", "--window-border", "\n\tForce opening with borders (default)", with_borders, NULL);