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:57:26 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-12-04 16:07:39 +0300
commit47fa3e7b27623f85acba9161e5210507a67742f1 (patch)
treefcb4eb7d999c2350fa27dee90056e31b7660c3a4 /source/blender/windowmanager/intern/wm_files_link.c
parenta1df65c9ddd3d876904cd4d26da5c2760a52191c (diff)
parent0868a2b6109f974edcc11a35c9f1bbd0388a8864 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenloader/BLO_readfile.h source/blender/blenloader/intern/readfile.c source/blender/windowmanager/intern/wm_files_link.c
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 2086ade99d2..cd6a38cb9a8 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -159,7 +159,7 @@ typedef struct WMLinkAppendData {
LinkNodePair items;
int num_libraries;
int num_items;
- short flag;
+ int flag; /* Combines eFileSel_Params_Flag from DNA_space_types.h and BLO_LibLinkFlags from BLO_readfile.h */
/* Internal 'private' data */
MemArena *memarena;
@@ -214,8 +214,7 @@ static WMLinkAppendDataItem *wm_link_append_data_item_add(
}
static void wm_link_do(
- WMLinkAppendData *lapp_data, ReportList *reports, Main *bmain, Scene *scene, ViewLayer *view_layer,
- const bool use_placeholders, const bool force_indirect)
+ WMLinkAppendData *lapp_data, ReportList *reports, Main *bmain, Scene *scene, ViewLayer *view_layer)
{
Main *mainl;
BlendHandle *bh;
@@ -262,8 +261,7 @@ static void wm_link_do(
continue;
}
- new_id = BLO_library_link_named_part_ex(
- mainl, &bh, item->idcode, item->name, flag, scene, view_layer, use_placeholders, force_indirect);
+ new_id = BLO_library_link_named_part_ex(mainl, &bh, item->idcode, item->name, flag, scene, view_layer);
if (new_id) {
/* If the link is successful, clear item's libs 'todo' flags.
@@ -372,6 +370,8 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
scene = NULL;
}
+ /* We need to add nothing from BLO_LibLinkFlags to flag here. */
+
/* from here down, no error returns */
if (view_layer && RNA_boolean_get(op->ptr, "autoselect")) {
@@ -453,7 +453,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op)
/* XXX We'd need re-entrant locking on Main for this to work... */
/* BKE_main_lock(bmain); */
- wm_link_do(lapp_data, op->reports, bmain, scene, view_layer, false, false);
+ wm_link_do(lapp_data, op->reports, bmain, scene, view_layer);
/* BKE_main_unlock(bmain); */
@@ -653,7 +653,7 @@ static void lib_relocate_do(
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* We do not want any instanciation here! */
- wm_link_do(lapp_data, reports, bmain, NULL, NULL, do_reload, do_reload);
+ wm_link_do(lapp_data, reports, bmain, NULL, NULL);
BKE_main_lock(bmain);
@@ -814,7 +814,7 @@ void WM_lib_reload(Library *lib, bContext *C, ReportList *reports)
return;
}
- WMLinkAppendData *lapp_data = wm_link_append_data_new(0);
+ WMLinkAppendData *lapp_data = wm_link_append_data_new(BLO_LIBLINK_USE_PLACEHOLDERS | BLO_LIBLINK_FORCE_INDIRECT);
wm_link_append_data_library_add(lapp_data, lib->filepath);
@@ -924,6 +924,10 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
}
}
+ if (do_reload) {
+ lapp_data->flag |= BLO_LIBLINK_USE_PLACEHOLDERS | BLO_LIBLINK_FORCE_INDIRECT;
+ }
+
lib_relocate_do(bmain, lib, lapp_data, op->reports, do_reload);
wm_link_append_data_free(lapp_data);