From bb3fa18a95b898cd52437d03839e531140972941 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 May 2009 04:55:40 +0000 Subject: add blendfile dirs to the sys.path without the scripts subdir --- source/gameengine/Ketsji/KX_PythonInit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp') 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); -- cgit v1.2.3