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:
authorCampbell Barton <ideasman42@gmail.com>2010-08-01 19:15:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-01 19:15:57 +0400
commita3e58a951ac94741f74efa3e6a67d219216bb78d (patch)
treef11229321200e307f3957e2ba046b43d56f6a768 /source/blender
parent0be152501e515244f9e565a38dd36819fdc8d78d (diff)
set blender binary name for python
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( );