Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-10-27 15:50:48 +0300
committerJulian Eisel <julian@blender.org>2021-10-27 15:56:57 +0300
commitaae5f15238f73fcac762a1690e052b86fad23be1 (patch)
tree5549df5789c1b586404a2bae575f0043c56d51db /source/blender/windowmanager/WM_types.h
parent1832e11f39a36681533c148de9300b290a8c309c (diff)
Asset Browser: Support dragging catalogs to move them in the hierarchy
Uses the additions to the UI tree-view API from the previous commit to enable drag & drop of asset catalogs. The catalogs will be moved in the tree including children. A remaining issue is that a catalog with children will always be collapsed when dropping. I need to find a way to fix that in the tree-view API. There are a few improvements I can think of for the tree-item drag & drop support, but time for these is too short. These can be done as normal cleanups at some point.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 1f1b1a70685..9f427a90353 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -119,6 +119,7 @@ struct wmWindowManager;
#include "BLI_compiler_attrs.h"
#include "DNA_listBase.h"
+#include "DNA_uuid_types.h"
#include "DNA_vec_types.h"
#include "DNA_xr_types.h"
#include "RNA_types.h"
@@ -967,6 +968,7 @@ typedef void (*wmPaintCursorDraw)(struct bContext *C, int, int, void *customdata
#define WM_DRAG_VALUE 6
#define WM_DRAG_COLOR 7
#define WM_DRAG_DATASTACK 8
+#define WM_DRAG_ASSET_CATALOG 9
typedef enum wmDragFlags {
WM_DRAG_NOP = 0,
@@ -1000,6 +1002,10 @@ typedef struct wmDragAsset {
struct bContext *evil_C;
} wmDragAsset;
+typedef struct wmDragAssetCatalog {
+ bUUID drag_catalog_id;
+} wmDragAssetCatalog;
+
/**
* For some specific cases we support dragging multiple assets (#WM_DRAG_ASSET_LIST). There is no
* proper support for dragging multiple items in the `wmDrag`/`wmDrop` API yet, so this is really