Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 553 Lines • ▼ Show 20 Lines | static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) | ||||
| printf("\n"); | printf("\n"); | ||||
| BLI_argsPrintArgDoc(ba, "--python"); | BLI_argsPrintArgDoc(ba, "--python"); | ||||
| BLI_argsPrintArgDoc(ba, "--python-text"); | BLI_argsPrintArgDoc(ba, "--python-text"); | ||||
| BLI_argsPrintArgDoc(ba, "--python-expr"); | BLI_argsPrintArgDoc(ba, "--python-expr"); | ||||
| BLI_argsPrintArgDoc(ba, "--python-console"); | BLI_argsPrintArgDoc(ba, "--python-console"); | ||||
| BLI_argsPrintArgDoc(ba, "--python-exit-code"); | BLI_argsPrintArgDoc(ba, "--python-exit-code"); | ||||
| BLI_argsPrintArgDoc(ba, "--python-use-system-env"); | |||||
| BLI_argsPrintArgDoc(ba, "--addons"); | BLI_argsPrintArgDoc(ba, "--addons"); | ||||
| printf("\n"); | printf("\n"); | ||||
| printf("Logging Options:\n"); | printf("Logging Options:\n"); | ||||
| BLI_argsPrintArgDoc(ba, "--log"); | BLI_argsPrintArgDoc(ba, "--log"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-level"); | BLI_argsPrintArgDoc(ba, "--log-level"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-basename"); | BLI_argsPrintArgDoc(ba, "--log-show-basename"); | ||||
| BLI_argsPrintArgDoc(ba, "--log-show-backtrace"); | BLI_argsPrintArgDoc(ba, "--log-show-backtrace"); | ||||
| ▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | |||||
| # ifdef WIN32 | # ifdef WIN32 | ||||
| printf(" $TEMP Store temporary files here.\n"); | printf(" $TEMP Store temporary files here.\n"); | ||||
| # else | # else | ||||
| printf(" $TMP or $TMPDIR Store temporary files here.\n"); | printf(" $TMP or $TMPDIR Store temporary files here.\n"); | ||||
| # endif | # endif | ||||
| # ifdef WITH_SDL | # ifdef WITH_SDL | ||||
| printf(" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, dma.\n"); | printf(" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, dma.\n"); | ||||
| # endif | # endif | ||||
| printf(" $PYTHONHOME Path to the Python directory, eg. /usr/lib/python.\n\n"); | printf(" $PYTHONHOME Path to the Python directory, eg. /usr/lib/python.\n\n"); | ||||
veprbl: Perhaps, it doesn't make sense to advertise this one anymore. It is ignored by default now. | |||||
| exit(0); | exit(0); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| static const char arg_handle_arguments_end_doc[] = | static const char arg_handle_arguments_end_doc[] = | ||||
| "\n\t" | "\n\t" | ||||
| ▲ Show 20 Lines • Show All 1,212 Lines • ▼ Show 20 Lines | if (argc > 1) { | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| else { | else { | ||||
| printf("\nError: you must specify an exit code number '%s'.\n", arg_id); | printf("\nError: you must specify an exit code number '%s'.\n", arg_id); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| } | } | ||||
| 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[] = | static const char arg_handle_addons_set_doc[] = | ||||
| "<addon(s)>\n" | "<addon(s)>\n" | ||||
| "\tComma separated list of add-ons (no spaces)."; | "\tComma separated list of add-ons (no spaces)."; | ||||
| static int arg_handle_addons_set(int argc, const char **argv, void *data) | static int arg_handle_addons_set(int argc, const char **argv, void *data) | ||||
| { | { | ||||
| /* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */ | /* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */ | ||||
| if (argc > 1) { | if (argc > 1) { | ||||
| # ifdef WITH_PYTHON | # ifdef WITH_PYTHON | ||||
| ▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | # endif | ||||
| /* TODO, add user env vars? */ | /* TODO, add user env vars? */ | ||||
| BLI_argsAdd( | BLI_argsAdd( | ||||
| ba, 1, NULL, "--env-system-datafiles", CB_EX(arg_handle_env_system_set, datafiles), NULL); | ba, 1, NULL, "--env-system-datafiles", CB_EX(arg_handle_env_system_set, datafiles), NULL); | ||||
| BLI_argsAdd( | BLI_argsAdd( | ||||
| ba, 1, NULL, "--env-system-scripts", CB_EX(arg_handle_env_system_set, scripts), NULL); | 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, "--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 */ | /* second pass: custom window stuff */ | ||||
| BLI_argsAdd(ba, 2, "-p", "--window-geometry", CB(arg_handle_window_geometry), NULL); | 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); | BLI_argsAdd(ba, 2, "-w", "--window-border", CB(arg_handle_with_borders), NULL); | ||||
| BLI_argsAdd(ba, 2, "-W", "--window-fullscreen", CB(arg_handle_without_borders), NULL); | BLI_argsAdd(ba, 2, "-W", "--window-fullscreen", CB(arg_handle_without_borders), NULL); | ||||
| BLI_argsAdd(ba, 2, "-M", "--window-maximized", CB(arg_handle_window_maximized), NULL); | BLI_argsAdd(ba, 2, "-M", "--window-maximized", CB(arg_handle_window_maximized), NULL); | ||||
| BLI_argsAdd(ba, 2, NULL, "--no-window-focus", CB(arg_handle_no_window_focus), NULL); | BLI_argsAdd(ba, 2, NULL, "--no-window-focus", CB(arg_handle_no_window_focus), NULL); | ||||
| BLI_argsAdd(ba, 2, "-con", "--start-console", CB(arg_handle_start_with_console), NULL); | BLI_argsAdd(ba, 2, "-con", "--start-console", CB(arg_handle_start_with_console), NULL); | ||||
| BLI_argsAdd(ba, 2, "-R", NULL, CB(arg_handle_register_extension), NULL); | BLI_argsAdd(ba, 2, "-R", NULL, CB(arg_handle_register_extension), NULL); | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||
Perhaps, it doesn't make sense to advertise this one anymore. It is ignored by default now.