Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/python/intern/bpy_interface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 901e8e8e103..d20f2a23664 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -228,9 +228,12 @@ void BPY_start_python( int argc, char **argv )
{
PyThreadState *py_tstate = NULL;
- BPY_start_python_path(); /* allow to use our own included python */
+ /* not essential but nice to set our name */
+ static wchar_t bprogname_wchar[FILE_MAXDIR+FILE_MAXFILE]; /* python holds a reference */
+ utf8towchar(bprogname_wchar, bprogname);
+ Py_SetProgramName(bprogname_wchar);
- // Py_SetProgramName(); // extern char bprogname[FILE_MAXDIR+FILE_MAXFILE];
+ BPY_start_python_path(); /* allow to use our own included python */
Py_Initialize( );