Fix building WITH_PYTHON=OFF
This commit is contained in:
@@ -433,8 +433,12 @@ void WM_init_splash(bContext *C)
|
||||
/** Load add-ons & app-templates once on startup. */
|
||||
static void wm_init_scripts_extensions_once(bContext *C)
|
||||
{
|
||||
#ifdef WITH_PYTHON
|
||||
const char *imports[] = {"bpy", nullptr};
|
||||
BPY_run_string_eval(C, imports, "bpy.utils.load_scripts_extensions()");
|
||||
#else
|
||||
UNUSED_VARS(C);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* free strings of open recent files */
|
||||
|
||||
@@ -2537,6 +2537,9 @@ void main_args_setup(bContext *C, bArgs *ba, bool all)
|
||||
# ifdef WITH_PYTHON
|
||||
/* Use for Python to extract help text (Python can't call directly - bad-level call). */
|
||||
BPY_python_app_help_text_fn = main_args_help_as_string;
|
||||
# else
|
||||
/* Quiet unused function warning. */
|
||||
(void)main_args_help_as_string;
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user