From c4dca6522812670ab9782e4f90553c5054109f3d Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sun, 3 Oct 2021 23:58:20 +0200 Subject: Asset Browser: Support dragging assets into catalogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- doc/python_api/sphinx_doc_gen.py | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index aa0f79646e6..ec636036f95 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1101,6 +1101,7 @@ context_type_map = { "scene": ("Scene", False), "sculpt_object": ("Object", False), "selectable_objects": ("Object", True), + "selected_asset_files": ("FileSelectEntry", True), "selected_bones": ("EditBone", True), "selected_editable_bones": ("EditBone", True), "selected_editable_fcurves": ("FCurve", True), -- cgit v1.2.3