diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-09-12 23:54:39 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-09-12 23:54:39 +0400 |
commit | 9a25d22326060395b09cd6d81d7b4ac080bafb8f (patch) | |
tree | eb9ef68ff4b155f69d3d8beedc221b72d92ea83c /source/blender/blenloader/BLO_readfile.h | |
parent | c1e2e3fea2dd1b22cf22a9dca4d88bde2d280ab6 (diff) |
2.5 filebrowser
Appending and Linking
* Linking Operator, invokes filebrowser for Append/Link
* Separated the append/link function into three parts:
** BLO_library_append_begin finds main for appending
** BLO_library_append_named_part appends one Object,Group, Material, ...
** BLO_library_append_end actually reads and expands the libraries
NOTE 1:
I also changed the returned properties for the filebrowser operators to the following convention:
"path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser
"directory" - the content of the directory button in filebrowser
"filename" - the content of the filename button in filebrowser
Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately.
Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 4fafac29a6f..6e2772efea4 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -36,7 +36,6 @@ extern "C" { struct bScreen; struct direntry; -struct FileList; struct LinkNode; struct Main; struct MemFile; @@ -45,6 +44,7 @@ struct Scene; struct SpaceFile; struct SpaceImaSel; struct UserDef; +struct bContext; typedef struct BlendHandle BlendHandle; @@ -197,12 +197,23 @@ BLO_blendhandle_close( /***/ -char *BLO_gethome(void); +#define GROUP_MAX 32 + int BLO_has_bfile_extension(char *str); -void BLO_library_append(BlendHandle **libfiledata, struct direntry* filelist, int totfile, - char *dir, char* file, short flag, int idcode, struct Main *mainvar, struct Scene *scene, struct ReportList *reports); +/* return ok when a blenderfile, in dir is the filename, + * in group the type of libdata + */ +int BLO_is_a_library(char *path, char *dir, char *group); + +struct Main* BLO_library_append_begin(const struct bContext *C, BlendHandle** bh, char *dir); +void BLO_library_append_named_part(const struct bContext *C, struct Main *mainl, BlendHandle** bh, char *name, int idcode, short flag); +void BLO_library_append_end(const struct bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag); + +/* deprecated */ +#if 0 void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, int idcode, short flag, struct Main *mainvar, struct Scene *scene, struct ReportList *reports); +#endif BlendFileData* blo_read_blendafterruntime(int file, char *name, int actualsize, struct ReportList *reports); |