From d12b3767f81d62a802411a42037d580a98923349 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Thu, 11 Oct 2018 17:47:46 +0200 Subject: 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. --- source/blender/blenkernel/BKE_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_screen.h') diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index aaaaf620afa..58058d1e134 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -238,7 +238,7 @@ typedef void (*uiListDrawItemFunc)( /* Draw the filtering part of an uiList */ typedef void (*uiListDrawFilterFunc)( - struct uiList *ui_list, struct bContext *C, struct uiLayout *layout); + struct uiList *ui_list, struct bContext *C, struct uiLayout *layout, bool reverse); /* Filter items of an uiList */ typedef void (*uiListFilterItemsFunc)( -- cgit v1.2.3