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:
authorCampbell Barton <ideasman42@gmail.com>2011-01-19 12:13:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-19 12:13:24 +0300
commit161cbed9b58408500e3e9d2acc6ea8db9ade4d4a (patch)
treef183c97722fed08c4a0b13395d61539b6476468c /source/creator
parentdddb9aa30f96961023f02846c97c955e1f2b5f0c (diff)
new command line option '--factory-startup' to skip reading startup.blend. useful for testing with a predictable environment.
also commented python benchmark prints on exit, can enable when profiling later.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 1a0188e0c47..90f579a9d9e 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -245,6 +245,7 @@ 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");
+ BLI_argsPrintArgDoc(ba, "--factory-startup");
printf("\n");
@@ -392,6 +393,12 @@ static int set_fpe(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
return 0;
}
+static int set_factory_startup(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
+{
+ G.factory_startup= 1;
+ return 0;
+}
+
static int playback_mode(int UNUSED(argc), char **UNUSED(argv), void *UNUSED(data))
{
/* not if -b was given first */
@@ -1006,7 +1013,9 @@ void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
BLI_argsAdd(ba, 1, "-a", NULL, playback_doc, playback_mode, NULL);
BLI_argsAdd(ba, 1, "-d", "--debug", debug_doc, debug_mode, ba);
- BLI_argsAdd(ba, 1, NULL, "--debug-fpe", "\n\tEnable floating point exceptions", set_fpe, NULL);
+ BLI_argsAdd(ba, 1, NULL, "--debug-fpe", "\n\tEnable floating point exceptions", set_fpe, NULL);
+
+ BLI_argsAdd(ba, 1, NULL, "--factory-startup", "\n\tSkip reading the "STRINGIFY(BLENDER_STARTUP_FILE)" in the users home directory", set_factory_startup, 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);
@@ -1139,7 +1148,7 @@ int main(int argc, char **argv)
BLI_argsParse(ba, 3, NULL, NULL);
WM_init(C, argc, argv);
-
+
/* this is properly initialized with user defs, but this is default */
BLI_where_is_temp( btempdir, 1 ); /* call after loading the startup.blend so we can read U.tempdir */