move bpath module from BLI to BKE, it was making many bad level calls into BKE.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2012 15:31:50 +0000 (15:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 15 Dec 2012 15:31:50 +0000 (15:31 +0000)
23 files changed:
source/blender/blenkernel/BKE_bpath.h [moved from source/blender/blenlib/BLI_bpath.h with 70% similarity]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bpath.c [moved from source/blender/blenlib/intern/bpath.c with 91% similarity]
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/speaker.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenloader/intern/writefile.c
source/blender/editors/space_info/info_ops.c
source/blender/python/intern/bpy.c

similarity index 70%
rename from source/blender/blenlib/BLI_bpath.h
rename to source/blender/blenkernel/BKE_bpath.h
index 438bffb..7c350fd 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file BLI_bpath.h
+/** \file BKE_bpath.h
  *  \ingroup bli
  *  \attention Based on ghash, difference is ghash is not a fixed size,
  *   so for BPath we don't need to malloc
  */
 
-#ifndef __BLI_BPATH_H__
-#define __BLI_BPATH_H__
+#ifndef __BKE_BPATH_H__
+#define __BKE_BPATH_H__
 
 struct ID;
 struct ListBase;
@@ -43,20 +43,20 @@ struct ReportList;
  * path has changed, and in that case, should write the result to pathOut. */
 typedef int (*BPathVisitor)(void *userdata, char *path_dst, const char *path_src);
 /* Executes 'visit' for each path associated with 'id'. */
-void BLI_bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
-void BLI_bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
-void BLI_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
-int  BLI_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
+void BKE_bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
+void BKE_bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
+void BKE_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
+int  BKE_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
 
 /* Functions for temp backup/restore of paths, path count must NOT change */
-void *BLI_bpath_list_backup(struct Main *bmain, const int flag);
-void  BLI_bpath_list_restore(struct Main *bmain, const int flag, void *ls_handle);
-void  BLI_bpath_list_free(void *ls_handle);
+void *BKE_bpath_list_backup(struct Main *bmain, const int flag);
+void  BKE_bpath_list_restore(struct Main *bmain, const int flag, void *ls_handle);
+void  BKE_bpath_list_free(void *ls_handle);
 
-#define BLI_BPATH_TRAVERSE_ABS             (1 << 0) /* convert paths to absolute */
-#define BLI_BPATH_TRAVERSE_SKIP_LIBRARY    (1 << 2) /* skip library paths */
-#define BLI_BPATH_TRAVERSE_SKIP_PACKED     (1 << 3) /* skip packed data */
-#define BLI_BPATH_TRAVERSE_SKIP_MULTIFILE  (1 << 4) /* skip paths where a single dir is used with an array of files, eg.
+#define BKE_BPATH_TRAVERSE_ABS             (1 << 0) /* convert paths to absolute */
+#define BKE_BPATH_TRAVERSE_SKIP_LIBRARY    (1 << 2) /* skip library paths */
+#define BKE_BPATH_TRAVERSE_SKIP_PACKED     (1 << 3) /* skip packed data */
+#define BKE_BPATH_TRAVERSE_SKIP_MULTIFILE  (1 << 4) /* skip paths where a single dir is used with an array of files, eg.
                                                      * sequence strip images and pointcache. in this case only use the first
                                                      * file, this is needed for directory manipulation functions which might
                                                      * otherwise modify the same directory multiple times */
@@ -64,9 +64,9 @@ void  BLI_bpath_list_free(void *ls_handle);
 /* high level funcs */
 
 /* creates a text file with missing files if there are any */
-void BLI_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports);
-void BLI_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports);
-void BLI_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
-void BLI_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void BKE_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports);
+void BKE_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports);
+void BKE_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void BKE_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
 
-#endif  /* __BLI_BPATH_H__ */
+#endif  /* __BKE_BPATH_H__ */
index 2da9b40..5799663 100644 (file)
@@ -65,6 +65,7 @@ set(SRC
        intern/bmfont.c
        intern/boids.c
        intern/booleanops_mesh.c
+       intern/bpath.c
        intern/brush.c
        intern/bullet.c
        intern/bvhutils.c
@@ -101,9 +102,9 @@ set(SRC
        intern/lamp.c
        intern/lattice.c
        intern/library.c
+       intern/mask.c
        intern/mask_evaluate.c
        intern/mask_rasterize.c
-       intern/mask.c
        intern/material.c
        intern/mball.c
        intern/mesh.c
@@ -147,6 +148,7 @@ set(SRC
        intern/world.c
        intern/writeavi.c
        intern/writeframeserver.c
+
        
        BKE_DerivedMesh.h
        BKE_action.h
@@ -234,6 +236,8 @@ set(SRC
        BKE_world.h
        BKE_writeavi.h
        BKE_writeframeserver.h
+       BKE_bpath.h
+
        depsgraph_private.h
        nla_private.h
        intern/CCGSubSurf.h
index dd27cc7..5da4f05 100644 (file)
@@ -43,7 +43,7 @@
 #include "DNA_object_types.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
index a93d728..e8dfe02 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
index 8d92396..a46a387 100644 (file)
@@ -56,7 +56,7 @@
 #include "DNA_sound_types.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
 #include "BLI_callbacks.h"
@@ -182,7 +182,7 @@ static void clean_paths(Main *main)
 {
        Scene *scene;
 
-       BLI_bpath_traverse_main(main, clean_paths_visit_cb, BLI_BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
+       BKE_bpath_traverse_main(main, clean_paths_visit_cb, BKE_BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
 
        for (scene = main->scene.first; scene; scene = scene->id.next) {
                BLI_clean(scene->r.pic);
similarity index 91%
rename from source/blender/blenlib/intern/bpath.c
rename to source/blender/blenkernel/intern/bpath.c
index c650438..9f51ddd 100644 (file)
@@ -72,7 +72,7 @@
 #include "DNA_smoke_types.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_utildefines.h"
 
 #include "BKE_font.h"
@@ -95,9 +95,9 @@ static int checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), co
 }
 
 /* high level function */
-void BLI_bpath_missing_files_check(Main *bmain, ReportList *reports)
+void BKE_bpath_missing_files_check(Main *bmain, ReportList *reports)
 {
-       BLI_bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BLI_BPATH_TRAVERSE_ABS, reports);
+       BKE_bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BKE_BPATH_TRAVERSE_ABS, reports);
 }
 
 typedef struct BPathRemap_Data {
@@ -132,7 +132,7 @@ static int makeFilesRelative_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-void BLI_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports)
+void BKE_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports)
 {
        BPathRemap_Data data = {NULL};
 
@@ -144,7 +144,7 @@ void BLI_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *re
        data.basedir = basedir;
        data.reports = reports;
 
-       BLI_bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
+       BKE_bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
 
        BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
                    "Total files %d | Changed %d | Failed %d",
@@ -174,8 +174,8 @@ static int makeFilesAbsolute_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-/* similar to BLI_bpath_relative_convert - keep in sync! */
-void BLI_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports)
+/* similar to BKE_bpath_relative_convert - keep in sync! */
+void BKE_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports)
 {
        BPathRemap_Data data = {NULL};
 
@@ -187,7 +187,7 @@ void BLI_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *re
        data.basedir = basedir;
        data.reports = reports;
 
-       BLI_bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
+       BKE_bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
 
        BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
                    "Total files %d | Changed %d | Failed %d",
@@ -298,14 +298,14 @@ static int findMissingFiles_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-void BLI_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports)
+void BKE_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports)
 {
        struct BPathFind_Data data = {NULL};
 
        data.reports = reports;
        BLI_split_dir_part(searchpath, data.searchdir, sizeof(data.searchdir));
 
-       BLI_bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
+       BKE_bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
 }
 
 /* Run a visitor on a string, replacing the contents of the string as needed. */
@@ -383,11 +383,11 @@ static int rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *ab
 }
 
 /* Run visitor function 'visit' on all paths contained in 'id'. */
-void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
-       const char *absbase = (flag & BLI_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
+       const char *absbase = (flag & BKE_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
 
-       if ((flag & BLI_BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
+       if ((flag & BKE_BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
                return;
        }
 
@@ -396,7 +396,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                {
                        Image *ima;
                        ima = (Image *)id;
-                       if (ima->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+                       if (ima->packedfile == NULL || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                                if (ELEM3(ima->source, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
                                        rewrite_path_fixed(ima->name, visit_cb, absbase, bpath_user_data);
                                }
@@ -475,7 +475,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                case ID_SO:
                {
                        bSound *sound = (bSound *)id;
-                       if (sound->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+                       if (sound->packedfile == NULL || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                                rewrite_path_fixed(sound->name, visit_cb, absbase, bpath_user_data);
                        }
                        break;
@@ -488,7 +488,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                case ID_VF:
                {
                        VFont *vfont = (VFont *)id;
-                       if (vfont->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+                       if (vfont->packedfile == NULL || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                                if (BKE_vfont_is_builtin(vfont) == FALSE) {
                                        rewrite_path_fixed(((VFont *)id)->name, visit_cb, absbase, bpath_user_data);
                                }
@@ -555,7 +555,7 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                                                        int len = MEM_allocN_len(se) / sizeof(*se);
                                                        int i;
 
-                                                       if (flag & BLI_BPATH_TRAVERSE_SKIP_MULTIFILE) {
+                                                       if (flag & BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) {
                                                                /* only operate on one path */
                                                                len = MIN2(1, len);
                                                        }
@@ -604,26 +604,26 @@ void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
        }
 }
 
-void BLI_bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BKE_bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
        ID *id;
        for (id = lb->first; id; id = id->next) {
-               BLI_bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
+               BKE_bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
        }
 }
 
-void BLI_bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BKE_bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
        ListBase *lbarray[MAX_LIBARRAY];
        int a = set_listbasepointers(bmain, lbarray);
        while (a--) {
-               BLI_bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
+               BKE_bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
        }
 }
 
 /* Rewrites a relative path to be relative to the main file - unless the path is
  * absolute, in which case it is not altered. */
-int BLI_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
+int BKE_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
 {
        /* be sure there is low chance of the path being too short */
        char filepath[(FILE_MAXDIR * 2) + FILE_MAXFILE];
@@ -700,23 +700,23 @@ static int bpath_list_restore(void *userdata, char *path_dst, const char *path_s
 }
 
 /* return ls_handle */
-void *BLI_bpath_list_backup(Main *bmain, const int flag)
+void *BKE_bpath_list_backup(Main *bmain, const int flag)
 {
        ListBase *ls = MEM_callocN(sizeof(ListBase), __func__);
 
-       BLI_bpath_traverse_main(bmain, bpath_list_append, flag, ls);
+       BKE_bpath_traverse_main(bmain, bpath_list_append, flag, ls);
 
        return ls;
 }
 
-void BLI_bpath_list_restore(Main *bmain, const int flag, void *ls_handle)
+void BKE_bpath_list_restore(Main *bmain, const int flag, void *ls_handle)
 {
        ListBase *ls = ls_handle;
 
-       BLI_bpath_traverse_main(bmain, bpath_list_restore, flag, ls);
+       BKE_bpath_traverse_main(bmain, bpath_list_restore, flag, ls);
 }
 
-void BLI_bpath_list_free(void *ls_handle)
+void BKE_bpath_list_free(void *ls_handle)
 {
        ListBase *ls = ls_handle;
        BLI_assert(ls->first == NULL);  /* assumes we were used */
index 3e5dee5..7bcb9b4 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "RNA_access.h"
 
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_rand.h"
index 4b4ca1c..c9f084a 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
index c4ce17c..f1f9667 100644 (file)
@@ -68,7 +68,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_threads.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "BKE_bmfont.h"
 #include "BKE_colortools.h"
index 86b82c3..7f3e43c 100644 (file)
@@ -37,7 +37,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
index eb0612a..855e2d4 100644 (file)
@@ -71,7 +71,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "BKE_animsys.h"
 #include "BKE_camera.h"
@@ -136,9 +136,9 @@ void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
 {
        char *bpath_user_data[2] = {bmain->name, lib->filepath};
 
-       BLI_bpath_traverse_id(bmain, id,
-                             BLI_bpath_relocate_visitor,
-                             BLI_BPATH_TRAVERSE_SKIP_MULTIFILE,
+       BKE_bpath_traverse_id(bmain, id,
+                             BKE_bpath_relocate_visitor,
+                             BKE_BPATH_TRAVERSE_SKIP_MULTIFILE,
                              bpath_user_data);
 }
 
index ea31795..e4a938e 100644 (file)
@@ -52,7 +52,7 @@
 #include "BLI_math.h"          
 #include "BLI_listbase.h"              
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_string.h"
 
 #include "BKE_animsys.h"
index 805e77c..fdd0c50 100644 (file)
@@ -50,7 +50,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 
 #include "BKE_global.h"
index 7550441..e12c3bc 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "BLI_utildefines.h"
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
 #include "BLI_scanfill.h"
index 425990d..85ad718 100644 (file)
@@ -59,7 +59,7 @@
 #include "DNA_object_types.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_pbvh.h"
 #include "BLI_utildefines.h"
index 97d8b06..000545d 100644 (file)
@@ -55,7 +55,7 @@
 #include "BLI_rand.h"
 #include "BLI_threads.h"
 #include "BLI_linklist.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "BKE_anim.h"
 #include "BKE_animsys.h"
index 0944059..4594445 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "BKE_animsys.h"
 #include "BKE_global.h"
index 6d0313f..b78d23c 100644 (file)
@@ -42,7 +42,7 @@
 #include "BLI_math.h"
 #include "BLI_kdopbvh.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "DNA_key_types.h"
 #include "DNA_object_types.h"
index 4bde895..ef5ad43 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "BLI_listbase.h"
 #include "BLI_utildefines.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 
 #include "BKE_animsys.h"
 #include "BKE_global.h"
index 8a3b1c9..f1f70a7 100644 (file)
@@ -50,7 +50,6 @@ set(SRC
        intern/BLI_mempool.c
        intern/DLRB_tree.c
        intern/boxpack2d.c
-       intern/bpath.c
        intern/callbacks.c
        intern/cpu.c
        intern/dynlib.c
@@ -101,7 +100,6 @@ set(SRC
        BLI_bitmap.h
        BLI_blenlib.h
        BLI_boxpack2d.h
-       BLI_bpath.h
        BLI_callbacks.h
        BLI_cpu.h
        BLI_dlrbTree.h
index cee6185..f82883a 100644 (file)
 #include "BLI_bitmap.h"
 #include "BLI_blenlib.h"
 #include "BLI_linklist.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
@@ -3031,7 +3031,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
 
        /* path backup/restore */
        void     *path_list_backup = NULL;
-       const int path_list_flag = (BLI_BPATH_TRAVERSE_SKIP_LIBRARY | BLI_BPATH_TRAVERSE_SKIP_MULTIFILE);
+       const int path_list_flag = (BKE_BPATH_TRAVERSE_SKIP_LIBRARY | BKE_BPATH_TRAVERSE_SKIP_MULTIFILE);
 
        /* open temporary file, so we preserve the original in case we crash */
        BLI_snprintf(tempname, sizeof(tempname), "%s@", filepath);
@@ -3044,7 +3044,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
 
        /* check if we need to backup and restore paths */
        if (UNLIKELY((write_flags & G_FILE_RELATIVE_REMAP) && (G_FILE_SAVE_COPY & write_flags))) {
-               path_list_backup = BLI_bpath_list_backup(mainvar, path_list_flag);
+               path_list_backup = BKE_bpath_list_backup(mainvar, path_list_flag);
        }
 
        /* remapping of relative paths to new file location */
@@ -3067,7 +3067,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
                                 * we should not have any relative paths, but if there
                                 * is somehow, an invalid or empty G.main->name it will
                                 * print an error, don't try make the absolute in this case. */
-                               BLI_bpath_absolute_convert(mainvar, G.main->name, NULL);
+                               BKE_bpath_absolute_convert(mainvar, G.main->name, NULL);
                        }
                }
        }
@@ -3075,15 +3075,15 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
        write_user_block= write_flags & G_FILE_USERPREFS;
 
        if (write_flags & G_FILE_RELATIVE_REMAP)
-               BLI_bpath_relative_convert(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
+               BKE_bpath_relative_convert(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
 
        /* actual file writing */
        err= write_file_handle(mainvar, file, NULL, NULL, write_user_block, write_flags, thumb);
        close(file);
 
        if (UNLIKELY(path_list_backup)) {
-               BLI_bpath_list_restore(mainvar, path_list_flag, path_list_backup);
-               BLI_bpath_list_free(path_list_backup);
+               BKE_bpath_list_restore(mainvar, path_list_flag, path_list_backup);
+               BKE_bpath_list_free(path_list_backup);
        }
 
        if (err) {
index 48b5eaf..e902a4e 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_math.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_utildefines.h"
 
 #include "BKE_context.h"
@@ -204,7 +204,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       BLI_bpath_relative_convert(bmain, bmain->name, op->reports);
+       BKE_bpath_relative_convert(bmain, bmain->name, op->reports);
 
        /* redraw everything so any changed paths register */
        WM_main_add_notifier(NC_WINDOW, NULL);
@@ -237,7 +237,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       BLI_bpath_absolute_convert(bmain, bmain->name, op->reports);
+       BKE_bpath_absolute_convert(bmain, bmain->name, op->reports);
 
        /* redraw everything so any changed paths register */
        WM_main_add_notifier(NC_WINDOW, NULL);
@@ -266,7 +266,7 @@ static int report_missing_files_exec(bContext *C, wmOperator *op)
        Main *bmain = CTX_data_main(C);
 
        /* run the missing file check */
-       BLI_bpath_missing_files_check(bmain, op->reports);
+       BKE_bpath_missing_files_check(bmain, op->reports);
        
        return OPERATOR_FINISHED;
 }
@@ -291,7 +291,7 @@ static int find_missing_files_exec(bContext *C, wmOperator *op)
 {
        Main *bmain = CTX_data_main(C);
        const char *searchpath = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
-       BLI_bpath_missing_files_find(bmain, searchpath, op->reports);
+       BKE_bpath_missing_files_find(bmain, searchpath, op->reports);
        MEM_freeN((void *)searchpath);
 
        return OPERATOR_FINISHED;
index 3ed662f..876e2b2 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "BLI_path_util.h"
 #include "BLI_string.h"
-#include "BLI_bpath.h"
+#include "BKE_bpath.h"
 #include "BLI_utildefines.h"
 
 #include "BKE_main.h"
@@ -127,13 +127,13 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
                return NULL;
        }
 
-       if (absolute) flag |= BLI_BPATH_TRAVERSE_ABS;
-       if (!packed)  flag |= BLI_BPATH_TRAVERSE_SKIP_PACKED;
-       if (local)    flag |= BLI_BPATH_TRAVERSE_SKIP_LIBRARY;
+       if (absolute) flag |= BKE_BPATH_TRAVERSE_ABS;
+       if (!packed)  flag |= BKE_BPATH_TRAVERSE_SKIP_PACKED;
+       if (local)    flag |= BKE_BPATH_TRAVERSE_SKIP_LIBRARY;
 
        list = PyList_New(0);
 
-       BLI_bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
+       BKE_bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
 
        return list;
 }