diff options
author | Thomas Dinges <blender@dingto.org> | 2012-10-01 18:02:47 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-10-01 18:02:47 +0400 |
commit | fbc056c9f5569f50797459a0430ce68d1d1b7c2f (patch) | |
tree | de6cd6011d13d910d4edfc68dd29ee263a5f9c8e | |
parent | e7089c06439014aeefd7e8e0efdb07b375eca9ad (diff) |
File Output Node:
* Small cosmetic change, move up/down buttons next to the list, instead of beneath.
* Removed redundant "uiLayout" declarations.
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 8ad02ad7d8b..1d04855666e 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2031,7 +2031,7 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C { PointerRNA imfptr = RNA_pointer_get(ptr, "format"); PointerRNA active_input_ptr, op_ptr; - uiLayout *row; + uiLayout *row, *col; int active_index; int multilayer = (RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER); @@ -2042,32 +2042,34 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C uiItemO(layout, IFACE_("Add Input"), ICON_ZOOMIN, "NODE_OT_output_file_add_socket"); + row = uiLayoutRow(layout, FALSE); + col = uiLayoutColumn(row, TRUE); + active_index = RNA_int_get(ptr, "active_input_index"); /* using different collection properties if multilayer format is enabled */ if (multilayer) { - uiTemplateList(layout, C, ptr, "layer_slots", ptr, "active_input_index", NULL, 0, 0, 0); + uiTemplateList(col, C, ptr, "layer_slots", ptr, "active_input_index", NULL, 0, 0, 0); RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "layer_slots"), active_index, &active_input_ptr); } else { - uiTemplateList(layout, C, ptr, "file_slots", ptr, "active_input_index", NULL, 0, 0, 0); + uiTemplateList(col, C, ptr, "file_slots", ptr, "active_input_index", NULL, 0, 0, 0); RNA_property_collection_lookup_int(ptr, RNA_struct_find_property(ptr, "file_slots"), active_index, &active_input_ptr); } /* XXX collection lookup does not return the ID part of the pointer, setting this manually here */ active_input_ptr.id.data = ptr->id.data; - row = uiLayoutRow(layout, TRUE); - op_ptr = uiItemFullO(row, "NODE_OT_output_file_move_active_socket", "", + col = uiLayoutColumn(row, TRUE); + op_ptr = uiItemFullO(col, "NODE_OT_output_file_move_active_socket", "", ICON_TRIA_UP, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&op_ptr, "direction", 1); - op_ptr = uiItemFullO(row, "NODE_OT_output_file_move_active_socket", "", + op_ptr = uiItemFullO(col, "NODE_OT_output_file_move_active_socket", "", ICON_TRIA_DOWN, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&op_ptr, "direction", 2); if (active_input_ptr.data) { if (multilayer) { - uiLayout *row, *col; col = uiLayoutColumn(layout, TRUE); uiItemL(col, IFACE_("Layer:"), ICON_NONE); @@ -2077,7 +2079,6 @@ static void node_composit_buts_file_output_details(uiLayout *layout, bContext *C ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY); } else { - uiLayout *row, *col; col = uiLayoutColumn(layout, TRUE); uiItemL(col, IFACE_("File Path:"), ICON_NONE); |