Revision: 20014
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20014
Author:   campbellbarton
Date:     2009-05-01 06:55:40 +0200 (Fri, 01 May 2009)

Log Message:
-----------
add blendfile dirs to the sys.path without the scripts subdir

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Geometry.c
    trunk/blender/source/blender/src/buttons_logic.c
    trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp

Modified: trunk/blender/source/blender/python/api2_2x/Geometry.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Geometry.c      2009-04-30 
20:02:22 UTC (rev 20013)
+++ trunk/blender/source/blender/python/api2_2x/Geometry.c      2009-05-01 
04:55:40 UTC (rev 20014)
@@ -59,7 +59,7 @@
 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[] = "";

Modified: trunk/blender/source/blender/src/buttons_logic.c
===================================================================
--- trunk/blender/source/blender/src/buttons_logic.c    2009-04-30 20:02:22 UTC 
(rev 20013)
+++ trunk/blender/source/blender/src/buttons_logic.c    2009-05-01 04:55:40 UTC 
(rev 20014)
@@ -1584,7 +1584,7 @@
                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);

Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp    2009-04-30 
20:02:22 UTC (rev 20013)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp    2009-05-01 
04:55:40 UTC (rev 20014)
@@ -1534,7 +1534,7 @@
  * - 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 @@
        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);
        


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to