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:
authorAntonioya <blendergit@gmail.com>2018-11-02 19:30:09 +0300
committerAntonioya <blendergit@gmail.com>2018-11-02 21:28:36 +0300
commit982ca8c45ab6cf39cd059ed4ae0d6e60cd503bea (patch)
tree2cc65adbc22fcbeb992fe58bf93071b99a8b1a3d /source/blender/makesrna/intern/rna_ui_api.c
parentc63d133f4dc2b227c6a5e5dbb23bcceae2c2eb7f (diff)
Add hide_buttons option to template_ID_preview
When use the template in the topbar for only select an ID is very annoying to have the buttons after the name and only adds noise to the selector. This option hide the number of users, new and delete buttons to get a cleaner topbar selector. By default the parameter is disabled in order to keep all existing code/UI running.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 5b51dacec76..4d361920dcb 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -802,6 +802,7 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
RNA_def_enum(func, "filter", id_template_filter_items, UI_TEMPLATE_ID_FILTER_ALL,
"", "Optionally limit the items which can be selected");
+ RNA_def_boolean(func, "hide_buttons", false, "", "Show only list, no buttons");
func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID");
parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");