Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_interface.c
| Show First 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | #ifndef WITH_PYTHON_MODULE | ||||
| * so use a more relaxed error handler and enforce utf-8 since the rest of | * so use a more relaxed error handler and enforce utf-8 since the rest of | ||||
| * blender is utf-8 too - campbell */ | * blender is utf-8 too - campbell */ | ||||
| Py_SetStandardStreamEncoding("utf-8", "surrogateescape"); | Py_SetStandardStreamEncoding("utf-8", "surrogateescape"); | ||||
| /* Suppress error messages when calculating the module search path. | /* Suppress error messages when calculating the module search path. | ||||
| * While harmless, it's noisy. */ | * While harmless, it's noisy. */ | ||||
| Py_FrozenFlag = 1; | Py_FrozenFlag = 1; | ||||
| /* Only use the systems environment variables when explicitly requested. | /* Only use the systems environment variables and site when explicitly requested. | ||||
| * Since an incorrect 'PYTHONPATH' causes difficult to debug errors, see: T72807. */ | * Since an incorrect 'PYTHONPATH' causes difficult to debug errors, see: T72807. */ | ||||
| Py_IgnoreEnvironmentFlag = !py_use_system_env; | Py_IgnoreEnvironmentFlag = !py_use_system_env; | ||||
| Py_NoUserSiteDirectory = !py_use_system_env; | |||||
| Py_Initialize(); | Py_Initialize(); | ||||
| // PySys_SetArgv(argc, argv); /* broken in py3, not a huge deal */ | // PySys_SetArgv(argc, argv); /* broken in py3, not a huge deal */ | ||||
| /* sigh, why do python guys not have a (char **) version anymore? */ | /* sigh, why do python guys not have a (char **) version anymore? */ | ||||
| { | { | ||||
| int i; | int i; | ||||
| PyObject *py_argv = PyList_New(argc); | PyObject *py_argv = PyList_New(argc); | ||||
| ▲ Show 20 Lines • Show All 759 Lines • Show Last 20 Lines | |||||