diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 16:53:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 16:55:55 +0300 |
commit | cfd11af9819433c5b83359b72f002fcd59fdc1ab (patch) | |
tree | 6b2113874e48fcf583979739f20d1dfe8f686c93 /source/blender/blenkernel/intern | |
parent | 09a8f5ebcab446758b37d5359dff77ea4edcf7d6 (diff) |
readfile: add id_tag_extra argument
This allows adding ID tags when linking/loading data.
This is needed to implement loading non 'G.main' ID data-blocks,
see D10612.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/blender_copybuffer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blender_copybuffer.c b/source/blender/blenkernel/intern/blender_copybuffer.c index 9f5e038fb82..ec8962d5f6d 100644 --- a/source/blender/blenkernel/intern/blender_copybuffer.c +++ b/source/blender/blenkernel/intern/blender_copybuffer.c @@ -94,8 +94,9 @@ bool BKE_copybuffer_read(Main *bmain_dst, } /* Here appending/linking starts. */ const int flag = 0; + const int id_tag_extra = 0; struct LibraryLink_Params liblink_params; - BLO_library_link_params_init(&liblink_params, bmain_dst, flag); + BLO_library_link_params_init(&liblink_params, bmain_dst, flag, id_tag_extra); Main *mainl = BLO_library_link_begin(&bh, libname, &liblink_params); BLO_library_link_copypaste(mainl, bh, id_types_mask); BLO_library_link_end(mainl, &bh, &liblink_params); @@ -130,6 +131,7 @@ int BKE_copybuffer_paste(bContext *C, Main *mainl = NULL; Library *lib; BlendHandle *bh; + const int id_tag_extra = 0; bh = BLO_blendhandle_from_file(libname, reports); @@ -148,7 +150,8 @@ int BKE_copybuffer_paste(bContext *C, /* here appending/linking starts */ struct LibraryLink_Params liblink_params; - BLO_library_link_params_init_with_context(&liblink_params, bmain, flag, scene, view_layer, v3d); + BLO_library_link_params_init_with_context( + &liblink_params, bmain, flag, id_tag_extra, scene, view_layer, v3d); mainl = BLO_library_link_begin(&bh, libname, &liblink_params); const int num_pasted = BLO_library_link_copypaste(mainl, bh, id_types_mask); |