=bmesh= merge from trunk at r36529
[blender.git] / source / blender / python / intern / bpy.c
index 18129af28bed921081cf2c379b4c5c348cf18de1..906f6ccbca25d8c3bd470fe13b1590325d60d00d 100644 (file)
@@ -46,7 +46,7 @@
 #include "BLI_bpath.h"
 #include "BLI_utildefines.h"
 
-
+#include "BKE_main.h"
 #include "BKE_global.h" /* XXX, G.main only */
 #include "BKE_blender.h"
 
@@ -76,12 +76,12 @@ static PyObject *bpy_script_paths(PyObject *UNUSED(self))
 {
        PyObject *ret= PyTuple_New(2);
        char *path;
-    
+
        path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:""));
        path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:""));
-    
+
        return ret;
 }
 
@@ -111,7 +111,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
 
        list= PyList_New(0);
 
-       for(BLI_bpathIterator_init(&bpi, G.main, NULL, 0); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) {
+       for(BLI_bpathIterator_init(&bpi, G.main, G.main->name, 0); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) {
                /* build the list */
                if (absolute) {
                        BLI_bpathIterator_getPathExpanded(bpi, filepath_expanded);