diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-11 18:47:46 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-11 19:30:09 +0300 |
commit | d12b3767f81d62a802411a42037d580a98923349 (patch) | |
tree | bb767c02284d671a68b145dac1d26b1ecf7204c9 /source/blender/editors/space_node | |
parent | cc1d6b849de2c237bb0079bcf5d7967528b3c504 (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/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_buttons.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index fa2fc44645a..65170c7c203 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1795,13 +1795,13 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi /* using different collection properties if multilayer format is enabled */ if (multilayer) { uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "layer_slots", ptr, "active_input_index", - NULL, 0, 0, 0, 0); + NULL, 0, 0, 0, 0, false); RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "layer_slots"), active_index, &active_input_ptr); } else { uiTemplateList(col, C, "UI_UL_list", "file_output_node", ptr, "file_slots", ptr, "active_input_index", - NULL, 0, 0, 0, 0); + NULL, 0, 0, 0, 0, false); RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "file_slots"), active_index, &active_input_ptr); } diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index c2efc548c30..0a913bcbea8 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -150,14 +150,14 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa) ot = WM_operatortype_find("NODE_OT_tree_socket_add", false); uiItemL(col, IFACE_("Inputs:"), ICON_NONE); uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input", - NULL, 0, 0, 0, 0); + NULL, 0, 0, 0, 0, false); uiItemFullO_ptr(col, ot, "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, 0, &opptr); RNA_enum_set(&opptr, "in_out", SOCK_IN); col = uiLayoutColumn(split, true); uiItemL(col, IFACE_("Outputs:"), ICON_NONE); uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output", - NULL, 0, 0, 0, 0); + NULL, 0, 0, 0, 0, false); uiItemFullO_ptr(col, ot, "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, 0, &opptr); RNA_enum_set(&opptr, "in_out", SOCK_OUT); |