From 984cd29fdab0f3da4ad50d4df193b1c6710c904f Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 19 May 2017 19:34:15 +0200 Subject: Implement support for Append objects in Blender 2.8 Note for users ============== The active_layer option used for the filebrowser operators is now called active_collection. If there is no collections in the scenelayer or if this option is not selected we automatically create a new collection for the new objects. This is the same behaviour of trying to add a new object when there is no collection. Note for developers =================== For those cases I moved the object user count handling from readfile to the scene collection system. It's working fine for those, but we still need to re-visit this for Add objects, and Duplicate - In those cases the usercount is 2 when it should be 1. Reviewers: mont29, sergey Differential Revision: https://developer.blender.org/D2686 --- source/blender/blenkernel/intern/blender_copybuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/blender_copybuffer.c') diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c index 964825f86d3..206b0f2a8cc 100644 --- a/source/blender/blenkernel/intern/blender_copybuffer.c +++ b/source/blender/blenkernel/intern/blender_copybuffer.c @@ -118,7 +118,7 @@ bool BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Re { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - View3D *v3d = CTX_wm_view3d(C); + SceneLayer *sl = CTX_data_scene_layer(C); Main *mainl = NULL; Library *lib; BlendHandle *bh; @@ -143,7 +143,7 @@ bool BKE_copybuffer_paste(bContext *C, const char *libname, const short flag, Re BLO_library_link_copypaste(mainl, bh); - BLO_library_link_end(mainl, &bh, flag, scene, v3d); + BLO_library_link_end(mainl, &bh, flag, scene, sl); /* mark all library linked objects to be updated */ BKE_main_lib_objects_recalc_all(bmain); -- cgit v1.2.3