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-10-11 18:47:46 +0300
committerAntonioya <blendergit@gmail.com>2018-10-11 19:30:09 +0300
commitd12b3767f81d62a802411a42037d580a98923349 (patch)
treebb767c02284d671a68b145dac1d26b1ecf7204c9 /source/blender/makesrna/intern/rna_ui_api.c
parentcc1d6b849de2c237bb0079bcf5d7967528b3c504 (diff)
Add new parameter to reverse UIList items
Now, it was possible to invert the order of the UIlist using the filter, but it was impossible to know if the list was inverted or not. The problem with this is that any other element depending of this value could not be adjusted. See https://devtalk.blender.org/t/how-to-access-uilist-properties/2268 The new parameter allows to set the reverse order by default. When the list is set as reverse, it cannot be inverted again, so the invert button is removed of the filter. This change is needed to fix a requested feature for Grease Pencil (T56985) and because a lot of 2D softwares use the drawing layers in the inverse order used in Blender.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index f2d97833bd9..4adf10fedee 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -1024,7 +1024,8 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Default maximum number of rows to display", 0, INT_MAX);
RNA_def_enum(func, "type", rna_enum_uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use");
RNA_def_int(func, "columns", 9, 0, INT_MAX, "", "Number of items to display per row, for GRID layout", 0, INT_MAX);
-
+ RNA_def_boolean(func, "reverse", false, "", "Display items in reverse order");
+
func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);