diff options
author | Dalai Felinto <dalai@blender.org> | 2021-09-13 19:40:21 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2021-09-13 20:51:46 +0300 |
commit | 3ff60bcad8cccd6c2f82ea44527f4e6ef619f0be (patch) | |
tree | ac74f69d5ccfea263a962e622ff80fc7dd6380bf /source/blender/editors/include | |
parent | 9fe6854a939169756895be680774ed1f66f206e7 (diff) |
Asset Template: Extra UI options
This allow users to show/hide:
* Library name / refresh.
* Assets names.
* Filter.
To set them in Python use:
display_options={'NO_NAMES', 'NO_FILTER', 'NO_LIBRARY'}
With contributions by Julian Eisel.
Differential Revision: https://developer.blender.org/D12476
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7211cf9f893..916105b0f8e 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2209,6 +2209,11 @@ enum uiTemplateListFlags { UI_TEMPLATE_LIST_SORT_LOCK = (1 << 1), /* Don't allow resizing the list, i.e. don't add the grip button. */ UI_TEMPLATE_LIST_NO_GRIP = (1 << 2), + /** Do not show filtering options, not even the button to expand/collapse them. Also hides the + * grip button. */ + UI_TEMPLATE_LIST_NO_FILTER_OPTIONS = (1 << 3), + /** For #UILST_LAYOUT_BIG_PREVIEW_GRID, don't reserve space for the name label. */ + UI_TEMPLATE_LIST_NO_NAMES = (1 << 4), UI_TEMPLATE_LIST_FLAGS_LAST }; @@ -2289,6 +2294,12 @@ int uiTemplateRecentFiles(struct uiLayout *layout, int rows); void uiTemplateFileSelectPath(uiLayout *layout, struct bContext *C, struct FileSelectParams *params); + +enum { + UI_TEMPLATE_ASSET_DRAW_NO_NAMES = (1 << 0), + UI_TEMPLATE_ASSET_DRAW_NO_FILTER = (1 << 1), + UI_TEMPLATE_ASSET_DRAW_NO_LIBRARY = (1 << 2), +}; void uiTemplateAssetView(struct uiLayout *layout, struct bContext *C, const char *list_id, @@ -2299,6 +2310,7 @@ void uiTemplateAssetView(struct uiLayout *layout, struct PointerRNA *active_dataptr, const char *active_propname, const struct AssetFilterSettings *filter_settings, + const int display_flags, const char *activate_opname, struct PointerRNA *r_activate_op_properties, const char *drag_opname, |