forked from bartvdbraak/blender
Cleanup: move WM_init & arg parsing out of if/else branch
This commit is contained in:
parent
6445caa9b5
commit
58fc155976
@ -428,6 +428,7 @@ int main(int argc,
|
|||||||
BLI_task_scheduler_init();
|
BLI_task_scheduler_init();
|
||||||
|
|
||||||
#ifdef WITH_FFMPEG
|
#ifdef WITH_FFMPEG
|
||||||
|
/* Keep after #ARG_PASS_SETTINGS since debug flags are checked. */
|
||||||
IMB_ffmpeg_init();
|
IMB_ffmpeg_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -457,20 +458,15 @@ int main(int argc,
|
|||||||
|
|
||||||
BKE_materials_init();
|
BKE_materials_init();
|
||||||
|
|
||||||
|
#ifndef WITH_PYTHON_MODULE
|
||||||
if (G.background == 0) {
|
if (G.background == 0) {
|
||||||
#ifndef WITH_PYTHON_MODULE
|
|
||||||
BLI_argsParse(ba, ARG_PASS_SETTINGS_GUI, 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 {
|
BLI_argsParse(ba, ARG_PASS_SETTINGS_FORCE, NULL, NULL);
|
||||||
#ifndef WITH_PYTHON_MODULE
|
|
||||||
BLI_argsParse(ba, ARG_PASS_SETTINGS_FORCE, NULL, NULL);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WM_init(C, argc, (const char **)argv);
|
WM_init(C, argc, (const char **)argv);
|
||||||
}
|
|
||||||
#ifndef WITH_PYTHON
|
#ifndef WITH_PYTHON
|
||||||
printf(
|
printf(
|
||||||
"\n* WARNING * - Blender compiled without Python!\n"
|
"\n* WARNING * - Blender compiled without Python!\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user