Lines 278-283
static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
Link Here
|
278 |
|
278 |
|
279 |
printf("\n"); |
279 |
printf("\n"); |
280 |
|
280 |
|
|
|
281 |
BLI_argsPrintArgDoc(ba, "-666"); |
281 |
BLI_argsPrintArgDoc(ba, "--enable-autoexec"); |
282 |
BLI_argsPrintArgDoc(ba, "--enable-autoexec"); |
282 |
BLI_argsPrintArgDoc(ba, "--disable-autoexec"); |
283 |
BLI_argsPrintArgDoc(ba, "--disable-autoexec"); |
283 |
|
284 |
|
Lines 359-372
static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUS
Link Here
|
359 |
static int enable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) |
360 |
static int enable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) |
360 |
{ |
361 |
{ |
361 |
G.f |= G_SCRIPT_AUTOEXEC; |
362 |
G.f |= G_SCRIPT_AUTOEXEC; |
362 |
G.f |= G_SCRIPT_OVERRIDE_PREF; |
363 |
G.f &= ~G_SCRIPT_OVERRIDE_PREF; /* Enables turning G_SCRIPT_AUTOEXEC off from user prefs */ |
363 |
return 0; |
364 |
return 0; |
364 |
} |
365 |
} |
365 |
|
366 |
|
366 |
static int disable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) |
367 |
static int disable_python(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) |
367 |
{ |
368 |
{ |
368 |
G.f &= ~G_SCRIPT_AUTOEXEC; |
369 |
G.f &= ~G_SCRIPT_AUTOEXEC; |
369 |
G.f |= G_SCRIPT_OVERRIDE_PREF; |
370 |
G.f |= G_SCRIPT_OVERRIDE_PREF; /* Disables turning G_SCRIPT_AUTOEXEC on from user prefs */ |
370 |
return 0; |
371 |
return 0; |
371 |
} |
372 |
} |
372 |
|
373 |
|
Lines 1075-1082
static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
Link Here
|
1075 |
|
1076 |
|
1076 |
BLI_argsAdd(ba, 1, "-v", "--version", "\n\tPrint Blender version and exit", print_version, NULL); |
1077 |
BLI_argsAdd(ba, 1, "-v", "--version", "\n\tPrint Blender version and exit", print_version, NULL); |
1077 |
|
1078 |
|
1078 |
BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution (default)", enable_python, NULL); |
1079 |
BLI_argsAdd(ba, 1, NULL, "-666", "\n\tEnable automatic python script execution (port from CVE-2009-3850 patch to Blender 2.49b)", enable_python, NULL); |
1079 |
BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes)", disable_python, NULL); |
1080 |
BLI_argsAdd(ba, 1, "-y", "--enable-autoexec", "\n\tEnable automatic python script execution", enable_python, NULL); |
|
|
1081 |
BLI_argsAdd(ba, 1, "-Y", "--disable-autoexec", "\n\tDisable automatic python script execution (pydrivers, pyconstraints, pynodes) (default)", disable_python, NULL); |
1080 |
|
1082 |
|
1081 |
BLI_argsAdd(ba, 1, "-b", "--background", "<file>\n\tLoad <file> in background (often used for UI-less rendering)", background_mode, NULL); |
1083 |
BLI_argsAdd(ba, 1, "-b", "--background", "<file>\n\tLoad <file> in background (often used for UI-less rendering)", background_mode, NULL); |
1082 |
|
1084 |
|
1083 |
- |
|
|