Fix building WITH_PYTHON=OFF

This commit is contained in:
Campbell Barton
2023-10-05 12:57:29 +11:00
parent d6b2b5d0c5
commit 291e54abfb
2 changed files with 7 additions and 0 deletions

View File

@@ -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 */

View File

@@ -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
}