diff options
author | Julian Eisel <julian@blender.org> | 2022-01-28 18:42:23 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-28 18:53:37 +0300 |
commit | 92d747b0c46e2645b7308edd31c778634c68c2c5 (patch) | |
tree | 0516b51e31fbd2c95c57d2d42cde12f6c4d1e7cf /source/blender/windowmanager/WM_types.h | |
parent | 4e93918b35facdc1ef8aa84d234c0687418006e2 (diff) |
Drag & drop: Support using context of hovered button when dropping
Buttons can hold context and it's very useful to use this as a way to
let buttons provide context for drop operators.
For example, with this D13549 can make the material slot list set the
material-slot pointer for each row, and the drop operator can just query
that.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index d1f790ce3e2..929b39715b9 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -1048,6 +1048,10 @@ typedef struct wmDragActiveDropState { * it as needed. */ struct ARegion *region_from; + /** If `active_dropbox` is set, additional context provided by the active (i.e. hovered) button. + * Activated before context sensitive operations (polling, drawing, dropping). */ + struct bContextStore *ui_context; + /** Text to show when a dropbox poll succeeds (so the dropbox itself is available) but the * operator poll fails. Typically the message the operator set with * CTX_wm_operator_poll_msg_set(). */ |