diff options
author | Thomas Dinges <blender@dingto.org> | 2014-02-04 16:21:30 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2014-02-04 16:21:30 +0400 |
commit | 5f99f8bee7825d2a49b286f9fbaf3db3d60a6391 (patch) | |
tree | fa6513e4203e7c551736c46755997f8d3aac65ee /source/blender/editors | |
parent | 605910f060c774c7d2396c1659b560a26ad2cdcf (diff) |
Node UI: Improved layout for the Shader Mapping node, to match UI guidelines better (top -> bottom layout).
Patch by Sebastian König. Thanks!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index b3d29c7bbdd..558fc160cf9 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -699,29 +699,37 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { - uiLayout *row; - + uiLayout *row, *col, *sub; + uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - uiItemL(layout, IFACE_("Location:"), ICON_NONE); - row = uiLayoutRow(layout, TRUE); - uiItemR(row, ptr, "translation", 0, "", ICON_NONE); - - uiItemL(layout, IFACE_("Rotation:"), ICON_NONE); - row = uiLayoutRow(layout, TRUE); - uiItemR(row, ptr, "rotation", 0, "", ICON_NONE); - - uiItemL(layout, IFACE_("Scale:"), ICON_NONE); - row = uiLayoutRow(layout, TRUE); - uiItemR(row, ptr, "scale", 0, "", ICON_NONE); - - row = uiLayoutRow(layout, TRUE); - uiItemR(row, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE); - uiItemR(row, ptr, "min", 0, "", ICON_NONE); - - row = uiLayoutRow(layout, TRUE); - uiItemR(row, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE); - uiItemR(row, ptr, "max", 0, "", ICON_NONE); + row = uiLayoutRow(layout, FALSE); + + col = uiLayoutColumn(row, TRUE); + uiItemL(col, IFACE_("Location:"), ICON_NONE); + uiItemR(col, ptr, "translation", 0, "", ICON_NONE); + + col = uiLayoutColumn(row, TRUE); + uiItemL(col, IFACE_("Rotation:"), ICON_NONE); + uiItemR(col, ptr, "rotation", 0, "", ICON_NONE); + + col = uiLayoutColumn(row, TRUE); + uiItemL(col, IFACE_("Scale:"), ICON_NONE); + uiItemR(col, ptr, "scale", 0, "", ICON_NONE); + + row = uiLayoutRow(layout, FALSE); + + col = uiLayoutColumn(row, TRUE); + uiItemR(col, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE); + sub = uiLayoutColumn(col, TRUE); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); + uiItemR(sub, ptr, "min", 0, "", ICON_NONE); + + col = uiLayoutColumn(row, TRUE); + uiItemR(col, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE); + sub = uiLayoutColumn(col, TRUE); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); + uiItemR(sub, ptr, "max", 0, "", ICON_NONE); } static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) |