diff options
author | Bastien Montagne <bastien@blender.org> | 2021-09-23 14:46:55 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-09-23 14:48:41 +0300 |
commit | 4d2ca33a8a7d08897a273031099da9b7bcaa11ff (patch) | |
tree | 65ee3094fb3c1c7ecee28f39f501e10a651a8cc9 /source/blender/windowmanager/intern/wm_dragdrop.c | |
parent | aadb7ef0718af9c54fa97d0ce10e3967a80cea2e (diff) |
LibLink: Modify WM API to link/append one ID to take flag parameter.
There is no reason to lock behavior into a specific configuration in
those calls, make them properly configurable like the rest of the
link/append code.
This also enable users of those functions to activate 'ID reuse'
behavior.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_dragdrop.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 6585349c83c..f3a57b72095 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -43,6 +43,8 @@ #include "BKE_idtype.h" #include "BKE_lib_id.h" +#include "BLO_readfile.h" + #include "GPU_shader.h" #include "GPU_state.h" #include "GPU_viewport.h" @@ -392,9 +394,10 @@ static ID *wm_drag_asset_id_import(wmDragAsset *asset_drag) switch ((eFileAssetImportType)asset_drag->import_type) { case FILE_ASSET_IMPORT_LINK: - return WM_file_link_datablock(G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name); + return WM_file_link_datablock(G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, 0); case FILE_ASSET_IMPORT_APPEND: - return WM_file_append_datablock(G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name); + return WM_file_append_datablock( + G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, BLO_LIBLINK_APPEND_RECURSIVE); } BLI_assert_unreachable(); |