diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-27 00:45:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-27 00:45:19 +0400 |
commit | 06fea1a0ff01590e88ef210edd2314615e077400 (patch) | |
tree | ce2a9530afaa9d1b3d069c2072b9ec819137851a /source/blender/blenloader/BLO_readfile.h | |
parent | 78d41d061bb0bd1a16f533d1f5f0664d27556db6 (diff) |
split BLO_library_append_named_part into 2 function, one that adds objects into the scene and another that just links/appends.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index d9594f7da75..85d4b936c51 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -213,18 +213,32 @@ int BLO_is_a_library(const char *path, char *dir, char *group); struct Main* BLO_library_append_begin(const struct bContext *C, BlendHandle** bh, const char *filepath); + /** * Link/Append a named datablock from an external blend file. * + * @param mainl The main database to link from (not the active one). + * @param bh The blender file handle. + * @param idname The name of the datablock (without the 2 char ID prefix) + * @param idcode The kind of datablock to link. + * @return the appended ID when found. + */ +struct ID *BLO_library_append_named_part(struct Main *mainl, BlendHandle** bh, const char *idname, const int idcode); + +/** + * Link/Append a named datablock from an external blend file. + * optionally instance the object in the scene when the flags are set. + * * @param C The context, when NULL instancing object in the scene isnt done. * @param mainl The main database to link from (not the active one). * @param bh The blender file handle. * @param idname The name of the datablock (without the 2 char ID prefix) * @param idcode The kind of datablock to link. * @param flag Options for linking, used for instancing. - * @return Boolean, 0 when the datablock could not be found. + * @return the appended ID when found. */ -struct ID *BLO_library_append_named_part(const struct bContext *C, struct Main *mainl, BlendHandle** bh, const char *idname, int idcode, short flag); +struct ID *BLO_library_append_named_part_ex(const struct bContext *C, struct Main *mainl, BlendHandle** bh, const char *idname, const int idcode, const short flag); + void BLO_library_append_end(const struct bContext *C, struct Main *mainl, BlendHandle** bh, int idcode, short flag); void *BLO_library_read_struct(struct FileData *fd, struct BHead *bh, const char *blockname); |