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>2021-04-21 06:44:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-21 06:44:23 +0300
commit5da3177190254273790043318db7e6a177270d55 (patch)
tree8191e035c7e3533f295ad9e227f0eefb32da1b8f /source/creator
parent3735986e875981e5525ec8cec379023abcc692bf (diff)
Fix logging "bke.appdir" messages
Logging was initialized after BKE_appdir paths were initialized, making it impossible to see paths which are checked on startup.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_args.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index d1899cc1408..d7f649b657d 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -2041,6 +2041,15 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_args_add(ba, "-t", "--threads", CB(arg_handle_threads_set), NULL);
+ /* Include in the environment pass so it's possible display errors initializing subsystems,
+ * especially `bpy.appdir` since it's useful to show errors finding paths on startup. */
+ BLI_args_add(ba, NULL, "--log", CB(arg_handle_log_set), ba);
+ BLI_args_add(ba, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
+ BLI_args_add(ba, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
+ BLI_args_add(ba, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
+ BLI_args_add(ba, NULL, "--log-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba);
+ BLI_args_add(ba, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
+
/* Pass: Background Mode & Settings
*
* Also and commands that exit after usage. */
@@ -2062,13 +2071,6 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_args_add(ba, "-a", NULL, CB(arg_handle_playback_mode), NULL);
- BLI_args_add(ba, NULL, "--log", CB(arg_handle_log_set), ba);
- BLI_args_add(ba, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
- BLI_args_add(ba, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
- BLI_args_add(ba, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
- BLI_args_add(ba, NULL, "--log-show-timestamp", CB(arg_handle_log_show_timestamp_set), ba);
- BLI_args_add(ba, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
-
BLI_args_add(ba, "-d", "--debug", CB(arg_handle_debug_mode_set), ba);
# ifdef WITH_FFMPEG