diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-28 04:58:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-28 06:04:44 +0300 |
commit | c518cd73cdba971f27943f491cdb3525ddcf3176 (patch) | |
tree | 7786d751831c30d64056bd8fa4c4f2f5bd1dd4fd /source/creator/creator.c | |
parent | 6ac46c9708f46f9dd83dd36008d6f7c9569b74eb (diff) |
Cleanup: use enum for command line argument passes
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index f9aea0af301..eba6c7c292f 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -404,7 +404,7 @@ int main(int argc, MEM_use_memleak_detection(false); /* Parse environment handling arguments. */ - BLI_argsParse(ba, 0, NULL, NULL); + BLI_argsParse(ba, ARG_PASS_ENVIRONMENT, NULL, NULL); #else /* Using preferences or user startup makes no sense for #WITH_PYTHON_MODULE. */ @@ -419,7 +419,7 @@ int main(int argc, #ifndef WITH_PYTHON_MODULE /* First test for background-mode (#Global.background) */ - BLI_argsParse(ba, 1, NULL, NULL); + BLI_argsParse(ba, ARG_PASS_SETTINGS, NULL, NULL); main_signal_setup(); #endif @@ -459,14 +459,14 @@ int main(int argc, if (G.background == 0) { #ifndef WITH_PYTHON_MODULE - BLI_argsParse(ba, 2, NULL, NULL); - BLI_argsParse(ba, 3, NULL, NULL); + BLI_argsParse(ba, ARG_PASS_SETTINGS_GUI, NULL, NULL); + BLI_argsParse(ba, ARG_PASS_SETTINGS_FORCE, NULL, NULL); #endif WM_init(C, argc, (const char **)argv); } else { #ifndef WITH_PYTHON_MODULE - BLI_argsParse(ba, 3, NULL, NULL); + BLI_argsParse(ba, ARG_PASS_SETTINGS_FORCE, NULL, NULL); #endif WM_init(C, argc, (const char **)argv); @@ -488,6 +488,7 @@ int main(int argc, /* OK we are ready for it */ #ifndef WITH_PYTHON_MODULE + /* Handles #ARG_PASS_FINAL. */ main_args_setup_post(C, ba); #endif |