diff options
author | Julian Eisel <julian@blender.org> | 2021-10-04 00:58:20 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-04 00:58:20 +0300 |
commit | c4dca6522812670ab9782e4f90553c5054109f3d (patch) | |
tree | 24dc1e2c0eb55985e8e6543b131989da1ca4125e /source/blender/editors/space_file/file_panels.c | |
parent | 3b1a2430391a6c1e0ea2744cfce2cf0749c72c85 (diff) |
Asset Browser: Support dragging assets into catalogs
With this it is possible to select any number of assets in the Asset
Browser and drag them into catalogs. The assets will be moved to that
catalog then. However, this will only work in the "Current File" asset
library, since that is the only library that allows changing assets,
which is what's done here.
While dragging assets over the tree row, a tooltip is shown explaining
what's going to happen.
In preparation to this, the new UI tree-view API was already extended
with custom drop support, see 4ee2d9df428d.
----
Changes here to the `wmDrag` code were needed to support dragging multiple
assets. Some of it is considered temporary because a) a proper #AssetHandle
design should replace some ugly parts of this patch and b) the multi-item
support in `wmDrag` isn't that great yet. The entire API will have to be
written anyway (see D4071).
Maniphest Tasks: T91573
Differential Revision: https://developer.blender.org/D12713
Reviewed by: Sybren Stüvel
Diffstat (limited to 'source/blender/editors/space_file/file_panels.c')
-rw-r--r-- | source/blender/editors/space_file/file_panels.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 95aad202f1a..b530f1d0aa7 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -238,7 +238,7 @@ static void file_panel_asset_catalog_buttons_draw(const bContext *C, Panel *pane FileAssetSelectParams *params = ED_fileselect_get_asset_params(sfile); BLI_assert(params != NULL); - file_create_asset_catalog_tree_view_in_layout(asset_library, panel->layout, params); + file_create_asset_catalog_tree_view_in_layout(asset_library, panel->layout, sfile, params); } void file_tools_region_panels_register(ARegionType *art) |