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 | |
parent | 36d0e2649ee8bc95d68e5d8e5317aee4e82e44bf (diff) |
add blendfile dirs to the sys.path without the scripts subdir
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/api2_2x/Geometry.c | 2 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Geometry.c b/source/blender/python/api2_2x/Geometry.c index d568472c838..80869889af7 100644 --- a/source/blender/python/api2_2x/Geometry.c +++ b/source/blender/python/api2_2x/Geometry.c @@ -59,7 +59,7 @@ static PyObject *M_Geometry_BoxPack2D( PyObject * self, PyObject * args ); static char M_Geometry_doc[] = "The Blender Geometry module\n\n"; static char M_Geometry_PolyFill_doc[] = "(veclist_list) - takes a list of polylines (each point a vector) and returns the point indicies for a polyline filled with triangles"; static char M_Geometry_LineIntersect2D_doc[] = "(lineA_p1, lineA_p2, lineB_p1, lineB_p2) - takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None"; -static char M_Geometry_ClosestPointOnLine_doc[] = "(pt, line_p1, line_p2) - takes a point and a line and returns a (Vector, Bool) for the point on the line, and the bool so you can know if the point was between the 2 points"; +static char M_Geometry_ClosestPointOnLine_doc[] = "(pt, line_p1, line_p2) - takes a point and a line and returns a (Vector, float) for the point on the line, and the bool so you can know if the point was between the 2 points"; static char M_Geometry_PointInTriangle2D_doc[] = "(pt, tri_p1, tri_p2, tri_p3) - takes 4 vectors, one is the point and the next 3 define the triangle, only the x and y are used from the vectors"; static char M_Geometry_PointInQuad2D_doc[] = "(pt, quad_p1, quad_p2, quad_p3, quad_p4) - takes 5 vectors, one is the point and the next 4 define the quad, only the x and y are used from the vectors"; static char M_Geometry_BoxPack2D_doc[] = ""; diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index 54b48de716f..941ed5ebe12 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1584,7 +1584,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco if(pc->mode==0) uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", xco+90,yco-24,width-90, 19, &pc->text, "Blender textblock to run as a script"); else { - uiDefBut(block, TEX, 1, "", xco+90,yco-24,(width-90)-25, 19, pc->module, 0, 63, 0, 0, "Module name and function to run eg \"someModule.main\", internal texts and //scripts/*.py on the filesystem can be used"); + uiDefBut(block, TEX, 1, "", xco+90,yco-24,(width-90)-25, 19, pc->module, 0, 63, 0, 0, "Module name and function to run eg \"someModule.main\", internal texts external python files can be used"); uiDefButBitI(block, TOG, CONT_PY_DEBUG, B_REDR, "D", (xco+width)-25, yco-24, 19, 19, &pc->flag, 0, 0, 0, 0, "Continuously reload the module from disk for editing external modules without restrting"); } uiBlockEndAlign(block); 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); |