[Bf-blender-cvs] [b018582cd3f] master: Cleanup: parse '--thread' as part of ARG_PASS_ENVIRONMENT
Campbell Barton
noreply at git.blender.org
Fri Oct 30 03:30:56 CET 2020
Commit: b018582cd3f664912b4fa012c56d3286e1bb0508
Author: Campbell Barton
Date: Fri Oct 30 13:11:35 2020 +1100
Branches: master
https://developer.blender.org/rBb018582cd3f664912b4fa012c56d3286e1bb0508
Cleanup: parse '--thread' as part of ARG_PASS_ENVIRONMENT
While this isn't needed at the moment, it's possible
the animation player uses the scheduler in the future.
===================================================================
M source/creator/creator.c
M source/creator/creator_args.c
===================================================================
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 4f5af4bf4ac..738b49dff84 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -415,6 +415,9 @@ int main(int argc,
* since they impact `BKE_appdir` behavior. */
BKE_appdir_init();
+ /* After parsing number of threads argument. */
+ BLI_task_scheduler_init();
+
/* Initialize sub-systems that use `BKE_appdir.h`. */
IMB_init();
@@ -425,9 +428,6 @@ int main(int argc,
main_signal_setup();
#endif
- /* After parsing number of threads argument. */
- BLI_task_scheduler_init();
-
#ifdef WITH_FFMPEG
/* Keep after #ARG_PASS_SETTINGS since debug flags are checked. */
IMB_ffmpeg_init();
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index ef1c8e935c3..a36bdbf8a87 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -2071,6 +2071,8 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_argsAdd(ba, NULL, "--env-system-scripts", CB_EX(arg_handle_env_system_set, scripts), NULL);
BLI_argsAdd(ba, NULL, "--env-system-python", CB_EX(arg_handle_env_system_set, python), NULL);
+ BLI_argsAdd(ba, "-t", "--threads", CB(arg_handle_threads_set), NULL);
+
/* Pass: Background Mode & Settings
*
* Also and commands that exit after usage. */
@@ -2088,8 +2090,6 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_argsAdd(ba, NULL, "--disable-crash-handler", CB(arg_handle_crash_handler_disable), NULL);
BLI_argsAdd(ba, NULL, "--disable-abort-handler", CB(arg_handle_abort_handler_disable), NULL);
- BLI_argsAdd(ba, "-t", "--threads", CB(arg_handle_threads_set), NULL);
-
BLI_argsAdd(ba, "-b", "--background", CB(arg_handle_background_mode_set), NULL);
BLI_argsAdd(ba, "-a", NULL, CB(arg_handle_playback_mode), NULL);
More information about the Bf-blender-cvs
mailing list