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:
authorCampbell Barton <ideasman42@gmail.com>2018-01-03 16:09:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-03 16:09:10 +0300
commitf20bb6c63f40a3944ceaf976d5c8aa6613477132 (patch)
treeca98f0e90fdc11c233df314bdec844b5f419d820 /source/blender/makesrna/intern/rna_ui_api.c
parentbe403891652a375e5a0ac61b493342ca6d39afb7 (diff)
parentffb2c40176e4ff5026dc493c969af58b23d7f212 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 9263395cd66..5fc263ae171 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -454,6 +454,12 @@ void RNA_api_ui_layout(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
+ static const EnumPropertyItem id_template_filter_items[] = {
+ {UI_TEMPLATE_ID_FILTER_ALL, "ALL", 0, "All", ""},
+ {UI_TEMPLATE_ID_FILTER_AVAILABLE, "AVAILABLE", 0, "Available", ""},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static float node_socket_color_default[] = { 0.0f, 0.0f, 0.0f, 1.0f };
/* simple layout specifiers */
@@ -685,7 +691,9 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block");
RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block");
RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block");
-
+ RNA_def_enum(func, "filter", id_template_filter_items, UI_TEMPLATE_ID_FILTER_ALL,
+ "", "Optionally limit the items which can be selected");
+
func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
@@ -694,7 +702,9 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block");
RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX);
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");
+
func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID");
parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);