Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_bpath.h')
-rw-r--r--source/blender/blenlib/BLI_bpath.h54
1 files changed, 20 insertions, 34 deletions
diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h
index 72489a171b9..2200ec70789 100644
--- a/source/blender/blenlib/BLI_bpath.h
+++ b/source/blender/blenlib/BLI_bpath.h
@@ -1,4 +1,4 @@
-/**
+/*
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,54 +26,40 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/* Based on ghash, difference is ghash is not a fixed size,
- * so for BPath we dont need to malloc */
+/** \file BLI_bpath.h
+ * \ingroup bli
+ * \attention Based on ghash, difference is ghash is not a fixed size,
+ * so for BPath we dont need to malloc
+ */
#ifndef BLI_BPATH_H
#define BLI_BPATH_H
-struct BPathIteratorSeqData {
- int totseq;
- int seq;
- struct Sequence **seqar; /* Sequence */
- struct Scene *scene; /* Current scene */
-};
-
-struct BPathIterator {
- char* path;
- char* lib;
- char* name;
- void* data;
- int len;
- int type;
-
- void (*setpath_callback)(struct BPathIterator *, char *);
- void (*getpath_callback)(struct BPathIterator *, char *);
-
- char* base_path; /* base path, the directry the blend file is in - normally G.sce */
+struct BPathIterator;
+struct ReportList;
+struct Main;
- /* only for seq data */
- struct BPathIteratorSeqData seqdata;
-};
-
-void BLI_bpathIterator_init (struct BPathIterator *bpi, char *base_path);
+void BLI_bpathIterator_init (struct BPathIterator **bpi, struct Main *bmain, const char *basedir, const int flag);
void BLI_bpathIterator_free (struct BPathIterator *bpi);
-char* BLI_bpathIterator_getLib (struct BPathIterator *bpi);
-char* BLI_bpathIterator_getName (struct BPathIterator *bpi);
+const char* BLI_bpathIterator_getLib (struct BPathIterator *bpi);
+const char* BLI_bpathIterator_getName (struct BPathIterator *bpi);
int BLI_bpathIterator_getType (struct BPathIterator *bpi);
int BLI_bpathIterator_getPathMaxLen (struct BPathIterator *bpi);
+const char* BLI_bpathIterator_getBasePath (struct BPathIterator *bpi);
void BLI_bpathIterator_step (struct BPathIterator *bpi);
int BLI_bpathIterator_isDone (struct BPathIterator *bpi);
void BLI_bpathIterator_getPath (struct BPathIterator *bpi, char *path);
void BLI_bpathIterator_getPathExpanded (struct BPathIterator *bpi, char *path_expanded);
-void BLI_bpathIterator_setPath (struct BPathIterator *bpi, char *path);
+void BLI_bpathIterator_setPath (struct BPathIterator *bpi, const char *path);
/* high level funcs */
/* creates a text file with missing files if there are any */
-void checkMissingFiles(char *basepath, ReportList *reports);
-void makeFilesRelative(char *basepath, ReportList *reports);
-void makeFilesAbsolute(char *basepath, ReportList *reports);
-void findMissingFiles(char *basepath, char *str);
+void checkMissingFiles(struct Main *bmain, struct ReportList *reports);
+void makeFilesRelative(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void makeFilesAbsolute(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void findMissingFiles(struct Main *bmain, const char *str);
+
+#define BPATH_USE_PACKED 1
#endif // BLI_BPATH_H