diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-01 08:55:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-01 08:55:40 +0400 |
commit | bb3fa18a95b898cd52437d03839e531140972941 (patch) | |
tree | 9070939011fb0977a229e1bda5e7e10a720370aa /source/gameengine | |
parent | 36d0e2649ee8bc95d68e5d8e5317aee4e82e44bf (diff) |
add blendfile dirs to the sys.path without the scripts subdir
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index f5d32e36fc5..d774d8ed5f8 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -1534,7 +1534,7 @@ void setSandbox(TPythonSecurityLevel level) * - initPySysPath(main) : initializes the blendfile and library paths * - restorePySysPath() : restores sys.path from gp_OrigPythonSysPath * - * These exist so the //scripts folder can always be used to import modules from. + * These exist so the current blend dir "//" can always be used to import modules from. * the reason we need a few functions for this is that python is not only used by the game engine * so we cant just add to sys.path all the time, it would leave pythons state in a mess. * It would also be incorrect since loading blend files for new levels etc would alwasy add to sys.path @@ -1569,7 +1569,6 @@ static void initPySysPath__append(PyObject *sys_path, char *filename) char expanded[FILE_MAXDIR + FILE_MAXFILE] = "//"; BLI_convertstringcode(expanded, filename); - BLI_join_dirfile(expanded, expanded, "scripts"); /* double checked and using the dir twice is safe */ item= PyString_FromString(expanded); |