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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-05-11 21:33:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-05-11 21:33:48 +0400
commit1c0c2f4d0bd6556a3dd7293ddbd419a066e745f4 (patch)
tree13b7d8ed19fbcef8a0bdc66a5aac54929c634a23 /source/creator
parente8e1a7cb9e88b95eb1155cddee615d763309460b (diff)
Added verbosity command line argument. Currently used for libmv only.
Usage: ./blender --verbose <level> Also fixed some crashes when not passing number to --threads argument or not passing file format to -F argument.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c21
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? */