Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| # ifdef WITH_CYCLES_LOGGING | # ifdef WITH_CYCLES_LOGGING | ||||
| # include "CCL_api.h" | # include "CCL_api.h" | ||||
| # endif | # endif | ||||
| # include "DEG_depsgraph.h" | # include "DEG_depsgraph.h" | ||||
| # include "DEG_depsgraph_build.h" | # include "DEG_depsgraph_build.h" | ||||
| # include "DEG_depsgraph_debug.h" | # include "DEG_depsgraph_debug.h" | ||||
| # ifdef WITH_GTESTS | |||||
| # include "gtests_runner.h" | |||||
| # endif | |||||
| # include "creator_intern.h" /* own include */ | # include "creator_intern.h" /* own include */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Utility String Parsing | /** \name Utility String Parsing | ||||
| * \{ */ | * \{ */ | ||||
| static bool parse_int_relative(const char *str, | static bool parse_int_relative(const char *str, | ||||
| const char *str_end_test, | const char *str_end_test, | ||||
| ▲ Show 20 Lines • Show All 403 Lines • ▼ Show 20 Lines | static int arg_handle_print_version(int UNUSED(argc), | ||||
| const char **UNUSED(argv), | const char **UNUSED(argv), | ||||
| void *UNUSED(data)) | void *UNUSED(data)) | ||||
| { | { | ||||
| print_version_full(); | print_version_full(); | ||||
| exit(0); | exit(0); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| # ifdef WITH_GTESTS | |||||
| static const char arg_handle_gtests_doc[] = | |||||
| "\n\t" | |||||
| "Run tests and exit. Use --gtests --help for more info."; | |||||
| static int arg_handle_gtests(int argc, const char **argv, void *UNUSED(data)) | |||||
| { | |||||
| exit(blender_gtests_runner(argc, argv)); | |||||
| return 0; | |||||
| } | |||||
| # endif | |||||
| static const char arg_handle_print_help_doc[] = | static const char arg_handle_print_help_doc[] = | ||||
| "\n\t" | "\n\t" | ||||
| "Print this help text and exit."; | "Print this help text and exit."; | ||||
| static const char arg_handle_print_help_doc_win32[] = | static const char arg_handle_print_help_doc_win32[] = | ||||
| "\n\t" | "\n\t" | ||||
| "Print this help text and exit (windows only)."; | "Print this help text and exit (windows only)."; | ||||
| static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) | static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,530 Lines • ▼ Show 20 Lines | # define CB_EX(a, b) a##_doc_##b, a | ||||
| /* first pass: background mode, disable python and commands that exit after usage */ | /* first pass: background mode, disable python and commands that exit after usage */ | ||||
| BLI_argsAdd(ba, 1, "-h", "--help", CB(arg_handle_print_help), ba); | BLI_argsAdd(ba, 1, "-h", "--help", CB(arg_handle_print_help), ba); | ||||
| /* Windows only */ | /* Windows only */ | ||||
| BLI_argsAdd(ba, 1, "/?", NULL, CB_EX(arg_handle_print_help, win32), ba); | BLI_argsAdd(ba, 1, "/?", NULL, CB_EX(arg_handle_print_help, win32), ba); | ||||
| BLI_argsAdd(ba, 1, "-v", "--version", CB(arg_handle_print_version), NULL); | BLI_argsAdd(ba, 1, "-v", "--version", CB(arg_handle_print_version), NULL); | ||||
| # ifdef WITH_GTESTS | |||||
| BLI_argsAdd(ba, 1, NULL, "--gtests", CB(arg_handle_gtests), ba); | |||||
| # endif | |||||
| BLI_argsAdd( | BLI_argsAdd( | ||||
| ba, 1, "-y", "--enable-autoexec", CB_EX(arg_handle_python_set, enable), (void *)true); | ba, 1, "-y", "--enable-autoexec", CB_EX(arg_handle_python_set, enable), (void *)true); | ||||
| BLI_argsAdd( | BLI_argsAdd( | ||||
| ba, 1, "-Y", "--disable-autoexec", CB_EX(arg_handle_python_set, disable), (void *)false); | ba, 1, "-Y", "--disable-autoexec", CB_EX(arg_handle_python_set, disable), (void *)false); | ||||
| BLI_argsAdd(ba, 1, NULL, "--disable-crash-handler", CB(arg_handle_crash_handler_disable), NULL); | BLI_argsAdd(ba, 1, NULL, "--disable-crash-handler", CB(arg_handle_crash_handler_disable), NULL); | ||||
| BLI_argsAdd(ba, 1, NULL, "--disable-abort-handler", CB(arg_handle_abort_handler_disable), NULL); | BLI_argsAdd(ba, 1, NULL, "--disable-abort-handler", CB(arg_handle_abort_handler_disable), NULL); | ||||
| ▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines | |||||