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:
authorCampbell Barton <ideasman42@gmail.com>2018-12-18 08:23:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-18 08:23:38 +0300
commit372fd07a8e13613e0e4ecfda2951fc0d2747d8d4 (patch)
tree771decf933c1892dced629d844e4e43463c7da88 /source/blender/windowmanager/intern/wm_files_link.c
parentafc4cd1e678b2e0717115d03910af58456f4a038 (diff)
Fix paste/append w/ local-view
Paste in local-view wasn't setting local-view bits.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 0b1ba6cf32d..bc21276ff45 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -210,7 +210,8 @@ 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)
+ WMLinkAppendData *lapp_data, ReportList *reports, Main *bmain,
+ Scene *scene, ViewLayer *view_layer, const View3D *v3d)
{
Main *mainl;
BlendHandle *bh;
@@ -262,7 +263,9 @@ static void wm_link_do(
continue;
}
- new_id = BLO_library_link_named_part_ex(mainl, &bh, item->idcode, item->name, flag, bmain, scene, view_layer);
+ new_id = BLO_library_link_named_part_ex(
+ mainl, &bh, item->idcode, item->name, flag, bmain,
+ scene, view_layer, v3d);
if (new_id) {
/* If the link is successful, clear item's libs 'todo' flags.
@@ -272,7 +275,7 @@ static void wm_link_do(
}
}
- BLO_library_link_end(mainl, &bh, flag, bmain, scene, view_layer);
+ BLO_library_link_end(mainl, &bh, flag, bmain, scene, view_layer, v3d);
BLO_blendhandle_close(bh);
}
}
@@ -449,7 +452,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);
+ wm_link_do(lapp_data, op->reports, bmain, scene, view_layer, CTX_wm_view3d(C));
/* BKE_main_unlock(bmain); */
@@ -647,7 +650,7 @@ static void lib_relocate_do(
BKE_main_id_tag_all(bmain, LIB_TAG_PRE_EXISTING, true);
/* We do not want any instantiation here! */
- wm_link_do(lapp_data, reports, bmain, NULL, NULL);
+ wm_link_do(lapp_data, reports, bmain, NULL, NULL, NULL);
BKE_main_lock(bmain);