diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files_link.c | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 0e51619b50a..9af90355a79 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -466,7 +466,8 @@ static ID *wm_drag_asset_id_import(wmDragAsset *asset_drag) asset_drag->path, idtype, name, - BLO_LIBLINK_APPEND_RECURSIVE | FILE_ACTIVE_COLLECTION); + BLO_LIBLINK_APPEND_RECURSIVE | FILE_ACTIVE_COLLECTION | + BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR); case FILE_ASSET_IMPORT_APPEND_REUSE: return WM_file_append_datablock(G_MAIN, scene, @@ -476,6 +477,7 @@ static ID *wm_drag_asset_id_import(wmDragAsset *asset_drag) idtype, name, BLO_LIBLINK_APPEND_RECURSIVE | FILE_ACTIVE_COLLECTION | + BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR | BLO_LIBLINK_APPEND_LOCAL_ID_REUSE); } diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c index d193c5663f0..c88e577df6a 100644 --- a/source/blender/windowmanager/intern/wm_files_link.c +++ b/source/blender/windowmanager/intern/wm_files_link.c @@ -630,6 +630,12 @@ static void wm_append_do(WMLinkAppendData *lapp_data, const bool set_fakeuser = (lapp_data->flag & BLO_LIBLINK_APPEND_SET_FAKEUSER) != 0; const bool do_reuse_local_id = (lapp_data->flag & BLO_LIBLINK_APPEND_LOCAL_ID_REUSE) != 0; + const int make_local_common_flags = LIB_ID_MAKELOCAL_FULL_LIBRARY | + ((lapp_data->flag & BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR) != + 0 ? + LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR : + 0); + LinkNode *itemlink; /* Generate a mapping between newly linked IDs and their items, and tag linked IDs used as @@ -731,16 +737,14 @@ static void wm_append_do(WMLinkAppendData *lapp_data, BLI_strncpy(lib_id_name, id->name, sizeof(lib_id_name)); switch (item->append_action) { - case WM_APPEND_ACT_COPY_LOCAL: { - BKE_lib_id_make_local( - bmain, id, LIB_ID_MAKELOCAL_FULL_LIBRARY | LIB_ID_MAKELOCAL_FORCE_COPY); + case WM_APPEND_ACT_COPY_LOCAL: + BKE_lib_id_make_local(bmain, id, make_local_common_flags | LIB_ID_MAKELOCAL_FORCE_COPY); local_appended_new_id = id->newid; break; - } case WM_APPEND_ACT_MAKE_LOCAL: BKE_lib_id_make_local(bmain, id, - LIB_ID_MAKELOCAL_FULL_LIBRARY | LIB_ID_MAKELOCAL_FORCE_LOCAL | + make_local_common_flags | LIB_ID_MAKELOCAL_FORCE_LOCAL | LIB_ID_MAKELOCAL_OBJECT_NO_PROXY_CLEARING); BLI_assert(id->newid == NULL); local_appended_new_id = id; |