Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_dragdrop.c
| Show First 20 Lines • Show All 392 Lines • ▼ Show 20 Lines | static ID *wm_drag_asset_id_import(wmDragAsset *asset_drag) | ||||
| ID_Type idtype = asset_drag->id_type; | ID_Type idtype = asset_drag->id_type; | ||||
| switch ((eFileAssetImportType)asset_drag->import_type) { | switch ((eFileAssetImportType)asset_drag->import_type) { | ||||
| case FILE_ASSET_IMPORT_LINK: | case FILE_ASSET_IMPORT_LINK: | ||||
| return WM_file_link_datablock(G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, 0); | return WM_file_link_datablock(G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, 0); | ||||
| case FILE_ASSET_IMPORT_APPEND: | case FILE_ASSET_IMPORT_APPEND: | ||||
| return WM_file_append_datablock( | return WM_file_append_datablock( | ||||
| G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, BLO_LIBLINK_APPEND_RECURSIVE); | G_MAIN, NULL, NULL, NULL, asset_drag->path, idtype, name, BLO_LIBLINK_APPEND_RECURSIVE); | ||||
| case FILE_ASSET_IMPORT_APPEND_REUSE: | |||||
| return WM_file_append_datablock(G_MAIN, | |||||
| NULL, | |||||
| NULL, | |||||
| NULL, | |||||
| asset_drag->path, | |||||
| idtype, | |||||
| name, | |||||
| BLO_LIBLINK_APPEND_RECURSIVE | | |||||
| BLO_LIBLINK_APPEND_LOCAL_ID_REUSE); | |||||
| } | } | ||||
| BLI_assert_unreachable(); | BLI_assert_unreachable(); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| /** | /** | ||||
| * When dragging a local ID, return that. Otherwise, if dragging an asset-handle, link or append | * When dragging a local ID, return that. Otherwise, if dragging an asset-handle, link or append | ||||
| ▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines | |||||