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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-12-04 15:09:13 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-12-04 15:09:13 +0300
commit0868a2b6109f974edcc11a35c9f1bbd0388a8864 (patch)
tree67779f45aa48a28efec618d083b631c6ef9f9764 /source/blender/blenloader/BLO_readfile.h
parent5c2752380883d8f2e6655bd5397871f049ee8bbb (diff)
Cleanup: link/append: get rid of booleans in func parameters.
One or two are OK, but more make it rather unreadable, and future work is likely to require more toggle specific behavior here. So switched to bitflags, switching from short to int and using 16 upper bits for 'internal' ones defined in BLO_readfile.h, combined with 'public' ones from user interaction, defined in DNA_space_types.h
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 59bd7ed74f4..4fd2e227bc5 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -109,13 +109,22 @@ void BLO_blendhandle_close(BlendHandle *bh);
bool BLO_has_bfile_extension(const char *str);
bool BLO_library_path_explode(const char *path, char *r_dir, char **r_group, char **r_name);
+/* Options controlling behavior of append/link code.
+ * Note: merged with 'user-level' options from operators etc. in 16 lower bits
+ * (see eFileSel_Params_Flag in DNA_space_types.h). */
+typedef enum BLO_LibLinkFlags {
+ /* Generate a placeholder (empty ID) if not found in current lib file. */
+ BLO_LIBLINK_USE_PLACEHOLDERS = 1 << 16,
+ /* Force loaded ID to be tagged as LIB_TAG_INDIRECT (used in reload context only). */
+ BLO_LIBLINK_FORCE_INDIRECT = 1 << 17,
+} BLO_LinkFlags;
+
struct Main *BLO_library_link_begin(struct Main *mainvar, BlendHandle **bh, const char *filepath);
struct ID *BLO_library_link_named_part(struct Main *mainl, BlendHandle **bh, const short idcode, const char *name);
struct ID *BLO_library_link_named_part_ex(
struct Main *mainl, BlendHandle **bh,
- const short idcode, const char *name, const short flag,
- struct Scene *scene, struct View3D *v3d,
- const bool use_placeholders, const bool force_indirect);
+ const short idcode, const char *name, const int flag,
+ struct Scene *scene, struct View3D *v3d);
void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, struct Scene *scene, struct View3D *v3d);
void BLO_library_link_copypaste(struct Main *mainl, BlendHandle *bh);