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/editors/include/UI_interface.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/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3796fa51499..ae4c2ff16fd 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1370,6 +1370,8 @@ uiBut *uiDefIconTextButO_ptr(uiBlock *block, /* for passing inputs to ButO buttons */ struct PointerRNA *UI_but_operator_ptr_get(uiBut *but); +struct bContextStore *UI_but_context_get(const uiBut *but); + void UI_but_unit_type_set(uiBut *but, int unit_type); int UI_but_unit_type_get(const uiBut *but); |