diff options
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index c3da352136d..db5485bada8 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -603,7 +603,7 @@ static int set_engine(int argc, const char **argv, void *data) static int set_image_type(int argc, const char **argv, void *data) { bContext *C = data; - if (argc >= 1) { + if (argc > 1) { const char *imtype = argv[1]; Scene *scene = CTX_data_scene(C); if (scene) { @@ -629,7 +629,7 @@ static int set_image_type(int argc, const char **argv, void *data) static int set_threads(int argc, const char **argv, void *UNUSED(data)) { - if (argc >= 1) { + if (argc > 1) { if (G.background) { RE_set_max_threads(atoi(argv[1])); } @@ -644,6 +644,21 @@ static int set_threads(int argc, const char **argv, void *UNUSED(data)) } } +static int set_verbosity(int argc, const char **argv, void *UNUSED(data)) +{ + if (argc > 1) { + int level = atoi(argv[1]); + + libmv_setLoggingVerbosity(level); + + return 1; + } + else { + printf("\nError: you must specify a verbosity level.\n"); + return 0; + } +} + static int set_extension(int argc, const char **argv, void *data) { bContext *C = data; @@ -1112,6 +1127,8 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 1, NULL, "--debug-libmv", "\n\tEnable debug messages from libmv library", debug_mode_libmv, NULL); #endif + BLI_argsAdd(ba, 1, NULL, "--verbose", "<verbose>\n\tSet logging verbosity level.", set_verbosity, 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); /* TODO, add user env vars? */ |