diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-13 04:15:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-13 04:15:14 +0300 |
commit | 25a2eb4675f8e1fcf8b990bc345aac694dba8228 (patch) | |
tree | 3570f9494687a37e874339f215f69e34fefc3528 /source/blender/blenloader/BLO_readfile.h | |
parent | 60a299443588f38a9d0a22a5bb45d6142e5afd43 (diff) |
py/library api: raise an error if a requested member isn't found.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index bbe444eff5c..891dc47b4ae 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -208,7 +208,19 @@ int BLO_has_bfile_extension(char *str); int BLO_is_a_library(const 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, const char *name, int idcode, short flag); + +/** + * Link/Append a named datablock from an external blend file. + * + * @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 name 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. + */ +int BLO_library_append_named_part(const struct bContext *C, struct Main *mainl, BlendHandle** bh, const 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 */ |