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-06-20 17:40:43 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-20 17:40:43 +0400
commit6b695762ea71b898f6196f545cccb28b44d79819 (patch)
treeaaa0449bcfa0f091fc55bd68735635eba5c24246
parenta550b6fe39660f30333e9626979421cad4df7110 (diff)
Added command line argument --debug-value
Useful when needed to set debug value (G.rt) on blender's startup
-rw-r--r--source/creator/creator.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 8b6d92414c8..713c9220fd7 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -387,6 +387,19 @@ static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *U
}
#endif
+static int set_debug_value(int argc, const char **argv, void *UNUSED(data))
+{
+ if (argc > 1) {
+ G.rt = atoi(argv[1]);
+
+ return 1;
+ }
+ else {
+ printf("\nError: you must specify debug value to set.\n");
+ return 0;
+ }
+}
+
static int set_fpe(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
#if defined(__linux__) || defined(_WIN32) || defined(OSX_SSE_FPE)
@@ -1115,6 +1128,7 @@ static 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);
+
#ifdef WITH_FFMPEG
BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_generic, (void *)G_DEBUG_FFMPEG);
#endif
@@ -1129,6 +1143,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, "--debug-value", "<value>\n\tSet debug value of <value> on startup\n", set_debug_value, NULL);
+
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);