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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-01-16 22:34:44 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-01-16 22:34:44 +0300
commit9ebd64ec7e3d25c1ae027b18f3b467d0156bddce (patch)
treeda6171421cf602f1a44b1a5e092905e1864c70fc /source/creator
parentd42a7bbd6ea57c69293d3bf978aae2c0e4241b57 (diff)
parentb05bca23641fc8760b1c340928654f23ea04c6f2 (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_args.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 6e3988a5ea6..c7df4888c0d 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -559,6 +559,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_argsPrintArgDoc(ba, "--python-expr");
BLI_argsPrintArgDoc(ba, "--python-console");
BLI_argsPrintArgDoc(ba, "--python-exit-code");
+ BLI_argsPrintArgDoc(ba, "--python-use-system-env");
BLI_argsPrintArgDoc(ba, "--addons");
printf("\n");
@@ -1907,6 +1908,17 @@ static int arg_handle_python_exit_code_set(int argc, const char **argv, void *UN
}
}
+static const char arg_handle_python_use_system_env_set_doc[] =
+ "\n\t"
+ "Allow Python to use system environment variables such as 'PYTHONPATH'.";
+static int arg_handle_python_use_system_env_set(int UNUSED(argc),
+ const char **UNUSED(argv),
+ void *UNUSED(data))
+{
+ BPY_python_use_system_env();
+ return 0;
+}
+
static const char arg_handle_addons_set_doc[] =
"<addon(s)>\n"
"\tComma separated list of add-ons (no spaces).";
@@ -2188,6 +2200,9 @@ void main_args_setup(bContext *C, bArgs *ba)
ba, 1, NULL, "--env-system-scripts", CB_EX(arg_handle_env_system_set, scripts), NULL);
BLI_argsAdd(ba, 1, NULL, "--env-system-python", CB_EX(arg_handle_env_system_set, python), NULL);
+ BLI_argsAdd(
+ ba, 1, NULL, "--python-use-system-env", CB(arg_handle_python_use_system_env_set), NULL);
+
/* second pass: custom window stuff */
BLI_argsAdd(ba, 2, "-p", "--window-geometry", CB(arg_handle_window_geometry), NULL);
BLI_argsAdd(ba, 2, "-w", "--window-border", CB(arg_handle_with_borders), NULL);